The smallest positive usable number


In python to get the smallest positive usable number for a float you can use:


Julia implement the function eps, but I don’t see nothing similar to tiny.



What does usable mean? Do you mean eps(0.0)?


I don’t know what’s means “mean”. But it’s not the same as eps(0.0).


Out[1]: 2.2250738585072014e-308


julia> eps(0.0)

I’m translating code from python and this tiny function is use in a max function as a minimum value for a variable.


Hmm, the numpy docs really do say that.

More precisely, this is the smallest magnitude normal floating point number, which is available in Julia via realmin(Float64).


It makes sense.



The positive normal Float64 value of least magnitude is
realmin(Float64) == 2.2250738585072014e-308;
the least negative normal Float64 is -realmin(Float64).

These are smallest Float64 values that are normally represented.
They are not the smallest Float64 values that are usable. Those are
subnormal (values with less precision used for the significand).

The most pos subnormal Float64 is 2.2250738585072009e-308.
The least pos subnormal Float64 is 4.9406564584124654e-324.
There are corresponding negative values.