Max & Min Float value
#1

Can i ask, what is the maximum and minimum size of a float for PAWN ?
Reply
#2

0.0001 I believe or 0.001
Reply
#3

You mean -0.0001 ? i think it's more complicated

i try
pawn Code:
printf("Float: %f", cellmin - 1);
printf("Float: %f", cellmin);
printf("Float: %f", cellmin + 1);
but i get some strange results:
Float: NaN
Float: 0.000000
Float: -0.000000
Reply
#4

Quote:
Originally Posted by wikipedia
Hence (for the example parameters) the smallest non-zero positive number that can be represented is 1Ч10−101 and the largest is 9999999Ч1090 (9.999999Ч1096), and the full range of numbers is −9.999999Ч1096 through 9.999999Ч1096. The numbers −b1−emax and b1−emax (here, −1Ч10−95 and 1Ч10−95) are the smallest (in magnitude) normal numbers; non-zero numbers between these smallest numbers are called subnormal numbers.
http://en.wikipedia.org/wiki/IEEE_754-2008

I think that is relevant.

If you download the pawno toolkit from compuphase there is a PDF that comes with it called Floating Point Support.pdf that has more info about floats in PAWN.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)