[WP34s] RSD function Message #1 Posted by Dieter on 27 Jan 2013, 10:22 a.m.
The 34s features a very useful function that rounds a value to a certain number of significant digits  the RSD function. Some time ago I wrote a short program based on the "calculator forensics" routine that determines the perfect result an ndigit calculator should return:
001 LBL A
002 STO 00
003 9
004 SIN
005 RSD>00
006 COS
007 RSD>00
008 TAN
009 RSD>00
010 ATAN
011 RSD>00
012 ACOS
013 RSD>00
014 ASIN
015 RSD>00
016 RTN
Enter a number of digits (n), run the program (preferably in double precision) and the perfect result for a perfect ndigit machine will be returned.
12 [A] 8,99999864267
10 [A] 9,000417403
6 [A] 9,32631
3 [A] 0
Now try this...
0 [A]
...and see what you get.
Then singlestep through the program and see what happens at step 012/013 where ACOS returns 90 degrees which is then rounded to 0 significant digits.
Finally try the same directly from the keyboard:
90 RSD 0
and compare the result with the previous one.
Which leads to the question: what is RSD 0 supposed to return?
Dieter
