mIRC Home    About    Download    Register    News    Help

Print Thread
$calc problem? #136601 30/11/05 06:44 PM
Joined: Oct 2005
Posts: 21
P
poiuy_qwert Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Oct 2005
Posts: 21
When i do:
Code:
//echo -a $calc(10008162643314973000 - 10008162643314972967)

and got 0, even thought the numbers are obviously different. I thought at first that mIRC was having trouble with large numbers, so i tried:
Code:
//echo -a $calc(100081626433149730123123 - 10008162643314972967)

and got 100071618270506410000000. Just to check, i went into Calculator and checked what it gave me. Calculator said that the answere was 100071618270506415150156.

Edit: If you do a calculation with 15 digits(999999999999999 - 999999999999998) you get the correct answere, but when you use 16 digits, its wrong(not totally test!).

Last edited by poiuy_qwert; 30/11/05 06:56 PM.

- poiuy_qwert
Re: $calc problem? #136602 30/11/05 06:55 PM
Joined: Jan 2003
Posts: 249
C
ClickHeRe Offline
Fjord artisan
Offline
Fjord artisan
C
Joined: Jan 2003
Posts: 249
there is a rounding in $calc and all mIRC operations at a certain digit, I think you can search on these forums for an answer

edit: found it
http://forums.mirc.com/s...;o=&fpart=1

Last edited by ClickHeRe; 30/11/05 06:59 PM.
Re: $calc problem? #136603 30/11/05 06:59 PM
Joined: Oct 2005
Posts: 21
P
poiuy_qwert Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Oct 2005
Posts: 21
Hmm i couldn't find it, but im guessing it cuts at 15 digits. But that really sucks because now i cant do the calculations i need D:!

Edit: Geez we keep posting/editing at the same time blush

Last edited by poiuy_qwert; 30/11/05 07:00 PM.

- poiuy_qwert