BigInt.toDouble() produces Infinity instead of -Infinity on large negative values. #36105
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
library-core
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
BigInt.toDouble()
fails to convert large negative values to-Infinity
. Instead, it producesInfinity
for both positive and negative values. A small repro:This breaks constant folding in
dart2js
and may cause issues elsewhere. (Confirmed this behavior for the VM anddart2js
backends; unsure about others.)Dart VM version: 2.2.0-dev.2.1+google3-v2.2.0.dev.2.1 (google3) on "linux_x64"
The text was updated successfully, but these errors were encountered: