unsigned to float and back

  • Thread starter Gerhard Hoffmann
  • Start date
G

Gerhard Hoffmann

Guest
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
 

Welcome to EDABoard.com

Sponsor

Back
Top