mIRC Home    About    Download    Register    News    Help

Print Thread
Page 4 of 4 1 2 3 4
Re: $calc(-2^2) == INCORRECT #112816 17/05/05 08:14 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Lol. Though, mIRC should probably be correct in how it handles orders of operation. Still, it isn't hard to correct if you really need it. smile


Invision Support
#Invision on irc.irchighway.net
Re: $calc(-2^2) == INCORRECT #112817 17/05/05 08:23 PM
Joined: Dec 2002
Posts: 208
H
Hrung Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
The point is just that it is unambiguously wrong.


If I knew now what I will know then... maybe things will have been different...
Re: $calc(-2^2) == INCORRECT #112818 22/05/05 04:53 AM
Joined: Jan 2005
Posts: 20
C
C45P3R Offline
Ameglian cow
Offline
Ameglian cow
C
Joined: Jan 2005
Posts: 20
If you will notice you have -2-2 not -2^2 = -4 on your calculator Raccoon.
the second 0-2^2 becomes 0-(2^2) because the minus sign is an operator.
And in -(2^2) well the - is applied after the exponent is worked out.
but in the case of just -2^2 it is not a minus operator but infact signifying it as a negitive number. the +/- button makes it -2^2 become (-2)^2 invisibly because minus was not used but a negitive to the base number.

But in the end yes in mIRC and programming that don't have +/- to signifiy the number/base as negitive it is in fact a minus so -2^2 = -4, But calcaulators -2(negative two) is the same as (-2) when programming.

Calculator:
[+/-] [2] [^] [2] [=] 4
[-] [ 2] [^] [2] [=] -4

Programs:
-2^2=-4

Simple no?

Page 4 of 4 1 2 3 4