PDA

View Full Version : My calculator gives wrong values!


Abdul Quadeer
Nov7-10, 08:57 AM
I use a Casio fx-991MS calculator.
I observed this strange thing during some calculations.
Setting up the calculator in radian mode, I found out the sines of various angles (multiples of π) display showed 0 for lower values.
However when I entered angles from 1201π onwards, the answers were like-
sin(1201π) = 1.59 x 10-9
sin(1202π) = 4.82 x 10-9
sin(1203π) = -1.23 x 10-9
sin(1204π) = -2.36 x 10-9

I got 0 for sin(1220π) and some other numbers but mostly unexpected values for higher numbers.

I would like to find out if there is any different method in which a calculator finds out the value of sine of multiples of π in radian mode.

sjb-2812
Nov7-10, 09:16 AM
Could it be that the internal representation of pi is getting rounded off and at these high values it's not be exact enough to be re-recognised as a multiple, so in effect you are calculating sin(0.00000001) (by taking away 2pi until it's in an acceptable range) or similar?

Abdul Quadeer
Nov7-10, 09:57 AM
Well that might be a possible explanation but sine of some still higher values like 6000π is shown 0.

Office_Shredder
Nov7-10, 11:19 AM
It could just be luck of the draw that the number it's ouputting for 6000 pi is small enough to come up as zero

Borek
Nov7-10, 11:52 AM
Rounding errors.

That's just another name for what was already suggested.

D H
Nov7-10, 12:16 PM
Could it be that the internal representation of pi is getting rounded off and at these high values it's not be exact enough to be re-recognised as a multiple
Bingo! Pi is an irrational number; your calculator cannot represent it exactly. Your calculator cannot even represent 1/3 exactly. When you multiply 1201*pi on your calculator you do not get 1201*pi; you get something close to it.

Suppose you ask the calculator to calculate the sine of some number, call it x. The first thing your calculator is going to do is convert x to (pi/2) * some integer plus a remainder between -pi/4 and pi/4. If your calculator was exact it would get 2402*(pi/2)+0 for 1201*pi. Since your calculator is not exact it will instead get 2402*(pi/2) + some small number.

Abdul Quadeer
Nov7-10, 02:36 PM
Thanks!

zgozvrm
Nov8-10, 01:18 PM
I have a $20 Sharp EL-520W that I've been using for about 15 years now. I can't find a multiple of [itex]\pi[/tex] that gives a non-zero result for SIN.

CRGreathouse
Nov8-10, 01:41 PM
I have a $20 Sharp EL-520W that I've been using for about 15 years now. I can't find a multiple of [itex]\pi[/tex] that gives a non-zero result for SIN.

It may calculate to more decimals than it shows. But I imagine if you go large enough you can still fool it; pi * 10^20, for example.

Abdul Quadeer
Nov8-10, 02:35 PM
I have a $20 Sharp EL-520W that I've been using for about 15 years now. I can't find a multiple of [itex]\pi[/tex] that gives a non-zero result for SIN.

Did you try in Radian mode?

zgozvrm
Nov8-10, 02:46 PM
It may calculate to more decimals than it shows. But I imagine if you go large enough you can still fool it; pi * 10^20, for example.

There you go. SIN(Pi * 10^20) results in an overflow error on my calculator, as does any power of 10 greater than 7.
In other words, SIN(Pi * 10^8) results in overflow, but SIN(Pi * 10^7) = 0.

BUT ... SIN(Pi * (10^7 + 1)) = SIN(Pi * 10,000,001) = 0.000001745 (approx)
and SIN(Pi * (10^7 - 1)) = SIN(Pi * 9,999,999) = 0.000001745 (approx)


It seems to start breaking down after SIN(Pi * 555,555)

zgozvrm
Nov8-10, 02:58 PM
... and, yes, this was in Radian mode.

Abdul Quadeer
Nov8-10, 02:59 PM
I found something new again-
Input - sin(1201π) = 1.59 x 10-9
But sinπ(1201) = 0!!!
If I write any value this way (no matter how high), it shows 0!!!

@zgozvrm
Can you try this thing in your calculator?

zgozvrm
Nov8-10, 03:05 PM
I found something new again-
Input - sin(1201π) = 1.59 x 10-9
But sinπ(1201) = 0!!!
If I write any value this way (no matter how high), it shows 0!!!

@zgozvrm
Can you try this thing in your calculator?

That one's easy:

\sin \pi * (1201) = 0 * (1201) = 0

Your calculator evaluates [itex]\sin(\pi)[/tex] first.



Note that [itex]\sin(xy)[/tex] does not necessarily equal [itex]\sin(x)*y[/tex]

D H
Nov8-10, 03:20 PM
I take it from Abdul's post that he is asking you to calculate sin(pi*1201) versus sin(1201*pi).

Hint: a*b-b*a is not necessarily zero on your calculator or on a computer.

zgozvrm
Nov8-10, 03:27 PM
I take it from Abdul's post that he is asking you to calculate sin(pi*1201) versus sin(1201*pi).

Hint: a*b-b*a is not necessarily zero on your calculator or on a computer.

In that case, I get the same result:

\sin(\pi X) = \sin(X \pi) = 0

for all values of X such that [itex]0 \le X \le 555,555[/tex]

Abdul Quadeer
Nov8-10, 03:45 PM
I take it from Abdul's post that he is asking you to calculate sin(pi*1201) versus sin(1201*pi).

Hint: a*b-b*a is not necessarily zero on your calculator or on a computer.

Yes I meant that but I thought the calculator will understand sinπ(1201) as sin(π1201) which is wrong.

In that case, I get the same result:

\sin(\pi X) = \sin(X \pi) = 0

for all values of X such that [itex]0 \le X \le 555,555[/tex]

Only integer values of X :biggrin:

zgozvrm
Nov8-10, 03:47 PM
Only integer values of X :biggrin:

Yes, of course.

Redbelly98
Nov9-10, 09:42 PM
In that case, I get the same result:

\sin(\pi X) = \sin(X \pi) = 0

for all values of X such that [itex]0 \le X \le 555,555[/tex]
Wow, I can't believe you tried every value in that range! :bugeye:

Only integer values of X :biggrin:
Hmmm, okay, but still...