Is there any macro or function to construct a float (double) from a given sign, mantissa and exponent (all binary or decimal) that either returns a valid float (double) number or returns NaN if the number specified by input is not representable as float (double)?
The function you're looking for is ldexp
.
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