Is there either (1) a crafty, cross-platform way of doing this or (2) a function in a standard library that does this that I somehow missed? If there is no such function, what are your thoughts on me implementing such a thing and submitting it to Phobos, probably similar to how frexp is implemented (elseifs for each FP format)?
Split Real / Float into Mantissa, Exponent, and Base
Jonathan M. Wilbur via Digitalmars-d-learn Fri, 03 Mar 2017 10:11:39 -0800
I have tried to come up with a good way to get the mantissa,
exponent, and base from a real number, and I just can't come up
with a good cross-platform way of doing it. I know about
std.math.frexp(), but that function only gives you another real
as the mantissa. I need an integral mantissa, exponent, and base.
- Split Real / Float into Mantiss... Jonathan M. Wilbur via Digitalmars-d-learn
- Re: Split Real / Float int... pineapple via Digitalmars-d-learn
- Re: Split Real / Float int... Marc Schütz via Digitalmars-d-learn