You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
toStringAsFixed, toStringAsExponential and toStringAsPrecision are defined on the num-interface. When invoked on integers should/can they convert to double first, or do they need to be implemented on integer?
The text was updated successfully, but these errors were encountered:
I believe the right solution would be to move toStringAsFixed, toStringAsExponential and toStringAsPrecision from num to double interface, but that is not possible while int/double duality is not solved in the Javascript Dart compilers.
Consequently, I believe we should translate anu num to double before invoking toStringAsFixed, toStringAsExponential and toStringAsPrecision.
We currently convert to double. That seems useful, since we don't give a way to parse the result back to an integer.
We could allow toStringAsExponential to work on integers that cannot be represented as doubles, but for now I think we should leave it as-is. I'll document this.
Correct.
As of the latest discussions we tend to favor 'toDouble()' inside toStringAs* even though that means that bignums will potentially converted to "Infinity".
toStringAsFixed, toStringAsExponential and toStringAsPrecision are defined on the num-interface. When invoked on integers should/can they convert to double first, or do they need to be implemented on integer?
The text was updated successfully, but these errors were encountered: