You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arbitrary Precision algorithms is what windows calculator uses to maintain accuracy in its calculations and avoids the floating point inaccuracies and make this an option not the rule.
Making this optional can provide performance when needed or accuracy when its needed.
Arbitrary precision has several algorithms with different pros and cons. I propose we try them all and run tests to see how they would benefit us. Maybe even make it a setting to choose which to use for performance reasons.
Arbitrary Precision algorithms is what windows calculator uses to maintain accuracy in its calculations and avoids the floating point inaccuracies and make this an option not the rule.
Making this optional can provide performance when needed or accuracy when its needed.
Arbitrary precision has several algorithms with different pros and cons. I propose we try them all and run tests to see how they would benefit us. Maybe even make it a setting to choose which to use for performance reasons.
Here is the Karatsuba algorithm (pseudo code)
http://en.wikipedia.org/wiki/Karatsuba_algorithm
procedure karatsuba(num1, num2)
if (num1 < 10) or (num2 < 10)
return num1_num2
/_ calculates the size of the numbers /
m = max(size(num1), size(num2))
low1, low2 = lower half of num1, num2
high1, high2 = higher half of num1, num2
/ 3 calls made to numbers approximately half the size _/
z0 = karatsuba(low1,low2)
z1 = karatsuba((low1+high1),(low2+high2))
z2 = karatsuba(high1,high2)
return (z2_10^(m))+((z1-z2-z0)*10^(m/2))+(z0)
The text was updated successfully, but these errors were encountered: