mIRC Home    About    Download    Register    News    Help

Topic Options
#131749 - 04/10/05 10:18 AM Poll: How many people think this is useless?
Talon Offline
Vogon poet

Registered: 09/12/02
Posts: 192
Loc: 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")

Top
#131750 - 04/10/05 11:20 AM Re: Poll: How many people think this is useless?
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: 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.

Top
#131751 - 04/10/05 01:54 PM Re: Poll: How many people think this is useless?
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: NC, 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

Top
#131752 - 06/10/05 01:04 AM Re: Poll: How many people think this is useless?
IR_n00b Offline
Fjord artisan

Registered: 01/10/04
Posts: 200
Loc: 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.

Top
#131753 - 06/10/05 01:44 PM Re: Poll: How many people think this is useless?
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: NC, USA
Yes, it would be good to have that option.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#257996 - 01/06/16 12:22 PM Re: Poll: How many people think this is useless? [Re: Talon]
Hurfie Offline
Bowl of petunias

Registered: 01/06/16
Posts: 2
this thing is still not fixed
what a shame
many calculations dont work without this

Top
#258080 - 08/06/16 12:11 PM Re: Poll: How many people think this is useless? [Re: Hurfie]
OrFeAsGr Offline
Fjord artisan

Registered: 01/02/15
Posts: 243
Loc: 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.


Edited by OrFeAsGr (08/06/16 02:45 PM)
_________________________
Humanity Bot Services Download & mIRC Scripting Help
http://humanity.ucoz.com

Top