| Index: runtime/lib/double.dart
|
| diff --git a/runtime/lib/double.dart b/runtime/lib/double.dart
|
| index ade4b9317bcd75c3c5150c78372a803f8630516d..34d780341d79f5626343c093d839ea07332d3f95 100644
|
| --- a/runtime/lib/double.dart
|
| +++ b/runtime/lib/double.dart
|
| @@ -277,4 +277,11 @@ class _Double implements double {
|
| return LESS;
|
| }
|
| }
|
| +
|
| + static const int _FRACTIONAL_BITS = // Bits to keep after the decimal point.
|
| + const int.fromEnvironment("doubleFractionalBits", defaultValue: 20);
|
| + static const double _BIAS = 1.5 * (1 << (52 - _FRACTIONAL_BITS));
|
| +
|
| + // Returns this with only _FRACTIONAL_BITS bits after the decimal point.
|
| + double get p => this + _BIAS - _BIAS;
|
| }
|
|
|