[Include] Numlib - Math library for huge numbers (larger than 32-bits)
#3

No, floatadd/floatsub/floatmul are not able to deal with as large numbers as this library is.

I ran this code:
pawn Код:
printf("%f", floatadd(5847309582938543028530492543895348504854390, 542384320000000000000000000000000000));
printf("%s", add("5847309582938543028530492543895348504854390", "542384320000000000000000000000000000"));
The output was:
Код:
[19:09:30] -502366336.000000
[19:09:30] 5847310125322863028530492543895348504854390
Adding two positive numbers rarely end up in negative solution, which is what happened with floatadd.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)