Skip to content

Probably missing coverage for ECMA-402 ToIntlMathematicalValue #4933

@gibson042

Description

@gibson042

ToIntlMathematicalValue requires that every non-bigint input for which RoundMVResult produces an infinite result is treated as that infinity, but I'm seeing implementation nonconformance which suggests lack of test262 coverage.

Decimal input (nonconformance in GraalJS):

$ eshost -se '(new Intl.NumberFormat("en-US")).format( (BigInt(Number.MAX_VALUE) * BigInt(2) + BigInt(1)).toString() )'
#### GraalJS
359,538,626,972,463,141,629,054,847,463,408,713,596,141,135,051,689,993,197,834,953,606,314,521,560,057,077,521,179,117,265,533,756,343,080,917,907,028,764,928,468,642,653,778,928,365,536,935,093,407,075,033,972,099,821,153,102,564,152,490,980,180,778,657,888,151,737,016,910,267,884,609,166,473,806,445,896,331,617,118,664,246,696,549,595,652,408,289,446,337,476,354,361,838,599,762,500,808,052,368,249,716,737

#### JavaScriptCore, LibJS, SpiderMonkey, V8

Non-decimal input (nonconformance in GraalJS, JavaScriptCore, and V8):

$ eshost -se '(new Intl.NumberFormat("en-US")).format( "0x" + (BigInt(Number.MAX_VALUE) * BigInt(2) + BigInt(1)).toString(16) )'
#### GraalJS, JavaScriptCore, V8
359,538,626,972,463,141,629,054,847,463,408,713,596,141,135,051,689,993,197,834,953,606,314,521,560,057,077,521,179,117,265,533,756,343,080,917,907,028,764,928,468,642,653,778,928,365,536,935,093,407,075,033,972,099,821,153,102,564,152,490,980,180,778,657,888,151,737,016,910,267,884,609,166,473,806,445,896,331,617,118,664,246,696,549,595,652,408,289,446,337,476,354,361,838,599,762,500,808,052,368,249,716,737

#### LibJS, SpiderMonkey


$ eshost -se '(new Intl.NumberFormat("en-US")).format( "0b" + (BigInt(Number.MAX_VALUE) * BigInt(2) + BigInt(1)).toString(2) )'
#### GraalJS, JavaScriptCore, V8
359,538,626,972,463,141,629,054,847,463,408,713,596,141,135,051,689,993,197,834,953,606,314,521,560,057,077,521,179,117,265,533,756,343,080,917,907,028,764,928,468,642,653,778,928,365,536,935,093,407,075,033,972,099,821,153,102,564,152,490,980,180,778,657,888,151,737,016,910,267,884,609,166,473,806,445,896,331,617,118,664,246,696,549,595,652,408,289,446,337,476,354,361,838,599,762,500,808,052,368,249,716,737

#### LibJS, SpiderMonkey


$ eshost -se '(new Intl.NumberFormat("en-US")).format( "0o" + (BigInt(Number.MAX_VALUE) * BigInt(2) + BigInt(1)).toString(8) )'
#### GraalJS, JavaScriptCore, V8
359,538,626,972,463,141,629,054,847,463,408,713,596,141,135,051,689,993,197,834,953,606,314,521,560,057,077,521,179,117,265,533,756,343,080,917,907,028,764,928,468,642,653,778,928,365,536,935,093,407,075,033,972,099,821,153,102,564,152,490,980,180,778,657,888,151,737,016,910,267,884,609,166,473,806,445,896,331,617,118,664,246,696,549,595,652,408,289,446,337,476,354,361,838,599,762,500,808,052,368,249,716,737

#### LibJS, SpiderMonkey

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions