Smallest positive float64 number
2^-1075 is the smallest positive float. 2^-1075 = 5.10^-324
Use np.nextafter
.
>>> import numpy as np
>>> np.nextafter(0, 1)
4.9406564584124654e-324
>>> np.nextafter(np.float32(0), np.float32(1))
1.4012985e-45
2^-1075 is the smallest positive float. 2^-1075 = 5.10^-324
Use np.nextafter
.
>>> import numpy as np
>>> np.nextafter(0, 1)
4.9406564584124654e-324
>>> np.nextafter(np.float32(0), np.float32(1))
1.4012985e-45