dbl to hex

any example that converts -float,+float to hex?. such as converting a number in (-55.99 , +55.99) range to hex.
[113 byte] By [ikcha] at [2007-11-20 11:24:16]
# 1 Re: dbl to hex
What exactly do you intend to use this for? Considering you did not specify IEEE 754 or some other standard, I'm guessing it would not be meaningful to you to output the number's binary representation in hex, yet that is what you seem to be asking for.

Say you were given the float value -20.0f. What would you expect the "hex" to be for that number?
Hermit at 2007-11-9 1:25:37 >
# 2 Re: dbl to hex
number's binary representation in hex as you said.
ikcha at 2007-11-9 1:26:29 >
# 3 Re: dbl to hex
Do you mean 20.75 (base 10) should become 14.C0 (base 16) ?
Zaccheus at 2007-11-9 1:27:39 >
# 4 Re: dbl to hex
try ftoa?
Mitsukai at 2007-11-9 1:28:39 >