Posted By: Talon
Poll: How many people think this is useless? - 04/10/05 09:18 AM
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.
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")
Posted By: RusselB
Re: Poll: How many people think this is useless? - 04/10/05 10:20 AM
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.
Posted By: Riamus2
Re: Poll: How many people think this is useless? - 04/10/05 12:54 PM
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)
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.
Posted By: IR_n00b
Re: Poll: How many people think this is useless? - 06/10/05 12:04 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.
Posted By: Riamus2
Re: Poll: How many people think this is useless? - 06/10/05 12:44 PM
Yes, it would be good to have that option.
Posted By: Hurfie
Re: Poll: How many people think this is useless? - 01/06/16 11:22 AM
this thing is still not fixed
what a shame
many calculations dont work without this
Posted By: OrFeAsGr
Re: Poll: How many people think this is useless? - 08/06/16 11:11 AM
There is not something to fix as this happens by default. Check this post for Khaled's answer.