[DM15L] trig functions

If you think you've found a bug in one of these machines, post about it here indicating the steps you perform in order to reproduce it.

Please prefix your topic with the model number in question and firmware version this way:

[DM16 V22] CHS gives unexpected results
Post Reply
M3katr0nix
Posts: 3
Joined: Sun Apr 25, 2021 6:06 pm

[DM15L] trig functions

Post by M3katr0nix »

Hello, I have the DM15L and I love to use it for my college work. However I noticed an issue using Sine. When I type 2>pi>×>SIN using the Radian angular display the result is not 0 (zero). Instead, its 8.2E-10. Granted this is a very small number, "roundable" to zero, I would assume that the calculator would display exactly 0. I am not sure it this is a bug or if this is an calculator precision limitations issues. Please enlighten me if am mistaken. I would also like to mention that I HAVE updated the firmware version to V32.
Please forgive me, for I do not know the proper math and programming lingo
reavy
Posts: 96
Joined: Tue Feb 06, 2018 9:08 pm
Location: Phoenix, AZ

Re: [DM15L] trig functions

Post by reavy »

My 15C gives -4.1E-10 for SIN(pi) in radians.
rprosperi
Posts: 1160
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: [DM15L] trig functions

Post by rprosperi »

The DM15 returns the exact same result for SIN(2*pi) in radians as a genuine HP-15C, 8.20 E-10, as this is the actually calculated result using the algorithm in the original HP code. It is effectively the same as zero of course for most practical caculations, but note that HP's machines will return the actual calculated results, even if slightly inaccurate, rather than lie and give you some 'fake' result because it is what you think it should be.

If you want exact answers, you should be using a calculator with a CAS, which are typically much harder to use for normal scientific calculations, which is what the 15C was designed for.
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
grsbanks
Posts: 1122
Joined: Tue Apr 25, 2017 11:23 am
Location: Preston, Lancs, UK
Contact:

Re: [DM15L] trig functions

Post by grsbanks »

M3katr0nix wrote:
Wed Sep 22, 2021 9:43 am
When I type 2>pi>×>SIN using the Radian angular display the result is not 0 (zero). Instead, its 8.2E-10.
That's because you don't get exactly 2\(\pi\) when you type [2] [PI] [x]. What you get is a number that's correct to 10 decimal places, so close to 2\(\pi\) but not equal to 2\(\pi\). You're then attempting to calculate the sine of something that's close to 2\(\pi\), so you're getting a result that's close to zero but not equal to zero.
There are only 10 kinds of people in the world: those who understand binary and those who do not.
User avatar
Walter
Posts: 1998
Joined: Tue May 02, 2017 11:13 am
Location: Close to FRA, Germany

Re: [DM15L] trig functions

Post by Walter »

grsbanks wrote:
Wed Sep 22, 2021 8:23 pm
M3katr0nix wrote:
Wed Sep 22, 2021 9:43 am
When I type 2>pi>×>SIN using the Radian angular display the result is not 0 (zero). Instead, its 8.2E-10.
That's because you don't get exactly 2\(\pi\) when you type [2] [PI] [x]. What you get is a number that's correct to 10 decimal places, so close to 2\(\pi\) but not equal to 2\(\pi\). You're then attempting to calculate the sine of something that's close to 2\(\pi\), so you're getting a result that's close to zero but not equal to zero.
For comparison: On the WP43S, numbers have 34 decimal places. Thus, [2] [pi] [x] [sin] returns 2E-34, not zero. Same principle, just another number of digits.
DM42 SN: 00041 β
WP 43S running on this device

HP-35, HP-45, ..., HP-35S; WP 34S & WP 31S for obvious reasons; DM16L
Post Reply