Open
Description
Feature
Correct representation of the maximum possible float64.
When I run the following code in RustPython, it gives an "inf", but in CPython it gives the correct maximum possible float64. I ran into this on Wikifunctions (documented here https://www.wikifunctions.org/wiki/Talk:Z21420) where we use RustPython and are trying to correctly implement a new data type for float64.
exponent = int("1023")
significand = int("4503599627370495")
mantissa = 1 + significand/2**52
positive = 1
import math
val = math.ldexp(mantissa/2.0, exponent+1) * (1 if positive else -1)
print(str(val))