unsigned to float and back

  • Thread starter Gerhard Hoffmann
  • Start date
G

Gerhard Hoffmann

Dear all,


is there a canonical way to convert between slv or UNSIGNED and float?
i.e. (2**32)-1 --> 4.295e9

If I do it via integer, signed behaviour seems to sneak in.
Are there more standard packages than math_real that define
floating point operators?

A function round/floor etc with _real_ return value looks wierd
and is probably not what most expect/want. I would not
expect them to work exactly the same way for args like 4711.50000000001
on different machines / compilers.

thank you very much,
Gerhard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top