Re: [WP34s] Parallel function Message #20 Posted by Dieter on 5 Nov 2012, 3:09 p.m., in response to message #18 by Werner
Great - I knew there was a better way to do this. ;-) However, the code may behave differently depending on the order of the two arguments, i.e. whether X or Y is the larger value. Since par(x,y) = par(y,x) I think this should be avoided. I am not quite sure, but maybe the code works best if X is the larger value (avoids underflow here and there). A simple x<y? x<>y could do the trick. At least it returns consistent results for par(x,y) and par(y,x).
BTW - during these tests with very large numbers like 106000 I noticed a quite ..."special behaviour" of the 10x function. Usually integer arguments should return exact powers of ten, but somewhere there is a point where - in DP mode - this is no longer guaranteed:
500 [10x] => 1.00000...0 E+500
999 [10x] => 1.00000...0 E+999
2000 [10x] => 9.99999...9 E+1999
6000 [10x] => 9.99999...8 E+5999
Dieter
|