mIRC Home    About    Download    Register    News    Help

Print Thread
Poll: How many people think this is useless? #131749
04/10/05 09:18 AM
04/10/05 09:18 AM
Joined: Dec 2002
Posts: 198
Ohio, USA
T
Talon Offline OP
Vogon poet
Talon  Offline OP
Vogon poet
T

Joined: Dec 2002
Posts: 198
Ohio, USA
ok we all know, or most have found out that $calc will only reproduce a number to the 6th decimal place.. example.. x.xxxxxx, so why does mIRC have identifiers that return numbers larger than 6 decimal places? For those of you who know a little math, one method for solving for pi is the Atangent of 1 multiplied by 4... example... echo -s $calc($Atan(1) * 4)
you should see 3.141592
$pi returns a much larger number.
3.14159265358979323846
whats the purpose of stopping there? or why even go that far? why not make it longer then? like
31415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679 (which truely is a piece of "Pi")

Re: Poll: How many people think this is useless? #131750
04/10/05 10:20 AM
04/10/05 10:20 AM
Joined: Aug 2004
Posts: 7,252
Ontario, Canada
R
RusselB Offline
Hoopy frood
RusselB  Offline
Hoopy frood
R

Joined: Aug 2004
Posts: 7,252
Ontario, Canada
I agree that limiting numbers/calculations to 6 decimal places is a bit ridiculous. I have a simple hand held calculator that gives me more precision than that. I don't know why Khaled stopped at 6 decimal places, but I, for one, would love to see it expanded to, say, 15...For the work that I do, 15 decimal places would be quite sufficient.

Re: Poll: How many people think this is useless? #131751
04/10/05 12:54 PM
04/10/05 12:54 PM
Joined: Oct 2004
Posts: 8,327
MA, USA
Riamus2 Offline
Hoopy frood
Riamus2  Offline
Hoopy frood

Joined: Oct 2004
Posts: 8,327
MA, USA
It is not useless in that you still use those extra places when doing the calculation. The final output can only be 6 places, but the internal calculations can be greater.

Try out something simple:

//echo -a $calc(1.0000004 + 1.0000004 + 1.0000004)
3.000001

If it ignored or rounded the 7th digit above, then it would give 3 as the output. Note that I used 4 at the end rather than using two of those with a 5 at the end so there is no confusion about those being rounded.

This really is the same as most calculators, as well. Regardless of the number of places it can output, it will usually do calculations using many more places and then give the result in X number of places.

Although it does use those digits internally to give an accurate output (to 6 places), I agree that we should get the same number of places as a standard FLOAT output or DOUBLE or whatever.


Invision Support
#Invision on irc.irchighway.net
Re: Poll: How many people think this is useless? #131752
06/10/05 12:04 AM
06/10/05 12:04 AM
Joined: Sep 2004
Posts: 200
where i am.
I
IR_n00b Offline
Fjord artisan
IR_n00b  Offline
Fjord artisan
I

Joined: Sep 2004
Posts: 200
where i am.
what I think would be good, would be $calc(calculations,N) where N is the # of decimal places you want it to output, if no decimal place is given, it assumes 6.

Re: Poll: How many people think this is useless? #131753
06/10/05 12:44 PM
06/10/05 12:44 PM
Joined: Oct 2004
Posts: 8,327
MA, USA
Riamus2 Offline
Hoopy frood
Riamus2  Offline
Hoopy frood

Joined: Oct 2004
Posts: 8,327
MA, USA
Yes, it would be good to have that option.


Invision Support
#Invision on irc.irchighway.net
Re: Poll: How many people think this is useless? [Re: Talon] #257996
01/06/16 11:22 AM
01/06/16 11:22 AM
Joined: Jun 2016
Posts: 2
H
Hurfie Offline
Bowl of petunias
Hurfie  Offline
Bowl of petunias
H

Joined: Jun 2016
Posts: 2
this thing is still not fixed
what a shame
many calculations dont work without this

Re: Poll: How many people think this is useless? [Re: Hurfie] #258080
08/06/16 11:11 AM
08/06/16 11:11 AM
Joined: Feb 2015
Posts: 243
Greece
O
OrFeAsGr Offline
Fjord artisan
OrFeAsGr  Offline
Fjord artisan
O

Joined: Feb 2015
Posts: 243
Greece
http://forums.mirc.com/ubbthreads.php/topics/256988/$calc_bugs?#Post256988
There is not something to fix as this happens by default. Check this post for Khaled's answer.

Last edited by OrFeAsGr; 08/06/16 01:45 PM.