Shop OBEX P1 Docs P2 Docs Learn Events
Floating point var size — Parallax Forums

Floating point var size

TJHJTJHJ Posts: 243
edited 2008-06-20 03:27 in Propeller 1
A quick one is there a alternate method when placing a floating point number into a variable to use a word size?
It seems that I have to use long variables when using floating point, is this correct?

TJ

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-20 03:27
    Floating point values are 32 bits (a long). There are very few floating point implementations that use less than 32 bits. The exponent takes up quite a few bits which leaves little for the mantissa. You'd be lucky to get 3 significant digits.
Sign In or Register to comment.