looking for some solutions? You are welcome.

SOLVED: Why does numpy's float128 only have 63 bits mantissa?

Paul Panzer:

I'm sure this is a daft question but I'm genuinely puzzled:

>>> import numpy as np
>>> 
>>> f1, f2, f64 = map(np.float128, (1, 2, -64))
>>> f1 + f2**f64 == f1
True

Or more directly:

>>> np.finfo(np.float128).nmant
63

Exponent appears to have 15 bits, so where are all those missing bits?



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
Share:

No comments:

Recent