I want to find, programmatically, and portably, the smallest Float possible.
By smallest I mean the smallest > 0 Float. Any way to achieve that ?
Looking up the documentation for Float
I found: Float.leastNonzeroMagnitude
The least positive number.
This value compares less than or equal to all positive numbers, but greater than zero. If the type supports subnormal values,
leastNonzeroMagnitude
is smaller thanleastNormalMagnitude
; otherwise they are equal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With