mIRC Home    About    Download    Register    News    Help

Print Thread
#3479 25/12/02 10:14 PM
Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
hey, i am having a little bit of trouble when i call calc....for example, if i do this:

//echo -a $calc(5599395841418 - 500)

it echos this:
5599395840917.999616

when it should just return:

5599395840918

500 less then what it was, why am i getting 501 less then what it was, PLUS a dot and more numbers after it :|

i dont need the dot, and whatever is after it, all thats doing it causing problems for what i'm doing, any ideas?

#3480 25/12/02 10:22 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
Couldn't reproduce grin


Code:
//if ( khaled isgod ) echo yes | else echo no
#3481 25/12/02 11:11 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
There was a post about this before, it was suggested the problem was linked to processor type, but I don't know if a definitive reason was ever found.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#3482 25/12/02 11:47 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
I have the same problem (Windows XP Home SP1, Athlon XP 1900+)

#3483 26/12/02 12:07 AM
Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
soooo, i am going to guess that there isnt a way to fix this little problem?

#3484 26/12/02 12:23 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Tried /var %var = 5599395841418 - 500 ?

#3485 26/12/02 12:32 AM
Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
Does The Same Thing unfortunately

but i not doing anything with vars, so even if it did work, it wouldnt help me much, cause sure, i can set the variable to that, but then i still end up having to calc the var again later, which would end up returning the "samething"

perhaps a bug khaled will have to look at for the next version possibly?

#3486 26/12/02 04:08 AM
Joined: Dec 2002
Posts: 103
Vogon poet
Offline
Vogon poet
Joined: Dec 2002
Posts: 103
The number you used is too big. Most languages allow integers of around 2^32, and some 2^64. Seeing how this is a windows 32bit program I'm guessing the largest number you should use is 2^32.

#3487 26/12/02 07:53 AM
Joined: Dec 2002
Posts: 271
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
might i ask what the heck 2^32 means?

and i cant really set the largest number, cause its part of a game, and it add their points bassed on what they win,,,,,know what i mean

#3488 26/12/02 12:37 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
^ is the exponent operator. 2^32 means 2 to the power of 32.

Pasmal: I don't think that's the problem though, the calculation works perfectly for me on a pentium3 (500mhz) with Win98SE and an Athlon XP2400+ with WinXP Home SP1. It's a rather bizarre problem but doesn't seem to be tied to anything system related - my 2nd system seems to be pretty close to Collective's, yet he gets the problem and I don't. Strange indeed.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#3489 27/12/02 07:00 PM
Joined: Dec 2002
Posts: 103
Vogon poet
Offline
Vogon poet
Joined: Dec 2002
Posts: 103
hm I think you're right, I just tested on a p3 500 & a XP 1800, both worked fine.

#3490 28/12/02 08:56 AM
Joined: Dec 2002
Posts: 9
G
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
G
Joined: Dec 2002
Posts: 9
Calculated it is 4294967296 wink

Your calculations gives no problems on my PI 233


______________________________
Twistification IRC
#3491 28/12/02 11:20 PM
Joined: Dec 2002
Posts: 3
K
Self-satisified door
Offline
Self-satisified door
K
Joined: Dec 2002
Posts: 3
5599395840917.999616 here too...

cpu: 1-AMD K6/2, 450MHz
os: Windows 2000 Professional, Service Pack 3 (5.0 - 2195)


Link Copied to Clipboard