13.11.2012, 15:53
No, floatadd/floatsub/floatmul are not able to deal with as large numbers as this library is.
I ran this code:
The output was:
Adding two positive numbers rarely end up in negative solution, which is what happened with floatadd.
I ran this code:
pawn Код:
printf("%f", floatadd(5847309582938543028530492543895348504854390, 542384320000000000000000000000000000));
printf("%s", add("5847309582938543028530492543895348504854390", "542384320000000000000000000000000000"));
Код:
[19:09:30] -502366336.000000 [19:09:30] 5847310125322863028530492543895348504854390