Re: WP34s Functionality Poll Message #10 Posted by Dieter on 3 Apr 2011, 2:30 p.m., in response to message #9 by Walter B
Hallo, Walter 
Quote:
I count this as your suggestion.
The addition of earlier dates than 15Oct1582, yes. The calculator should be able to handle dates both before and after this date. So that, for example, ddays(4.10.1582, 15.10.1582) will return 1 in Gregorian mode and 11 in Julian mode.
Quote:
Where's the beef? What do you want implemented differently?
There are issues with some functions regarding numeric accuracy. I expect a quality calculator to return results within 1 ULP. Otherwise this has to be documented and the result should be rounded to the number of actually valid digits. Back in the Seventies, my first calculator could evaluate all transcendent functions to not more than 5 significant digits. So it returned lg 2 as "0,30103"  and not one single digit more. At least an honest answer. It didn't pretend to be more precise than it actually was. ;)
I haven't checked all more or less exotic functions on the 34s, but I took a closer look at the normal distribution. With 39 internal digits a 16digit result should be no major problem, even with the quantile function. Right now this function returns good results in the far tails (the values I checked were correct within 1 ULP), but there is a problem with common values in the range p = 0,01 ... 0,2. Here, the emulator sometimes requires up to one whole second (!) on a 1,8 GHz system before it returns a result with not more than 1112 valid digits:
p exact zquantile WP34s result
0,01 2,326 3478 7404 0841 2,326 3478 7404 0841 so far,
0,03 1,880 7936 0815 1251 1,880 7936 0815 1251 so good. ;)
0,05 1,644 8536 2695 1473 1,644 8536 2697 9906 but then...
0,10 1,281 5515 6554 4600 1,281 5515 6554 8626
0,15 1,036 4333 8949 3790 1,036 4333 8949 4112
0,20 ,8416 2123 3572 9142 ,8416 2123 3574 9220
The problem already starts with the simple CDF:
x exact CDF WP34s result
0,5 3,085 3753 8725 9869 E1 3,085 3753 8726 0659 E1
0,8 2,118 5539 8583 3967 E1 2,118 5539 8583 5966 E1
1,0 1,586 5525 3931 4571 E1 1,586 5525 3932 2540 E1
1,5 6,680 7201 2688 5807 E2 6,680 7201 2717 4097 E2 (!)
2,0 2,275 0131 9481 7921 E2 2,275 0131 9481 7921 E2
I also tried some calculations with Student's distribution  with similar results.
p df exact tquantile WP34s result
0,01 3 4,540 7028 5856 8134 4,540 7028 5856 8325
0,05 5 2,015 0483 7333 3024 2,015 0483 7333 3021
0,10 5 1,475 8840 4882 4481 1,475 8840 4882 4385
t df exact CDF WP34s result
1 5 0,1816 0873 3824 5613 0,1816 0873 3823 9048
2 7 0,0428 0966 4281 48803 0,0428 0966 4281 48889
So the precision is something between 10 and 16 digits. I just noticed that the latest 34sversion uses only the displayed 12 digits when "copy number" is used (instead of all 16 before). This makes some sense... ;)
Dieter
Edit: correction because of cdf and pdf confusion. ;)
Edited: 4 Apr 2011, 2:28 p.m. after one or more responses were posted
