My calculator gives wrong values

  • Context: Undergrad 
  • Thread starter Thread starter zorro
  • Start date Start date
  • Tags Tags
    Calculator Casio
Click For Summary

Discussion Overview

The discussion revolves around the unexpected outputs from calculators when computing the sine of multiples of π in radian mode. Participants explore the potential reasons for discrepancies in results, particularly at high values, and consider the implications of rounding errors and internal representations of numbers.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • One participant notes that their Casio fx-991MS calculator gives unexpected sine values for large multiples of π, suggesting a potential issue with how the calculator handles these calculations.
  • Another participant proposes that rounding errors in the internal representation of π might lead to inaccuracies when calculating sine for large values.
  • Some participants mention that certain high values, like 6000π, yield a result of 0, which could be coincidental based on the calculator's output.
  • There are discussions about how calculators might convert large inputs to a more manageable range, potentially affecting the sine calculation.
  • One participant shares experiences with a different calculator, the Sharp EL-520W, noting it consistently returns 0 for sine of multiples of π, raising questions about the limits of calculator precision.
  • Several participants clarify the distinction between sin(π * n) and sin(n * π), discussing how calculators interpret these expressions differently.
  • There is a suggestion that the calculator's handling of large numbers can lead to overflow errors, affecting the sine results.

Areas of Agreement / Disagreement

Participants express various hypotheses regarding the behavior of calculators with sine functions at high values, but no consensus is reached on a definitive explanation. Multiple competing views on the causes of discrepancies remain present.

Contextual Notes

Limitations include the potential for rounding errors, the dependence on the internal representation of irrational numbers, and the unresolved nature of how calculators process large inputs. Specific mathematical steps and assumptions about calculator behavior are not fully explored.

zorro
Messages
1,378
Reaction score
0
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.
 
Mathematics news on Phys.org
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?
 
Well that might be a possible explanation but sine of some still higher values like 6000π is shown 0.
 
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
 
Rounding errors.

That's just another name for what was already suggested.
 
Last edited:
sjb-2812 said:
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.
 
Thanks!
 
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.[/itex]
 
zgozvrm said:
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.[/itex]
[itex] <br /> 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.[/itex]
 
  • #10
zgozvrm said:
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.[/itex]
[itex] <br /> Did you try in Radian mode?[/itex]
 
  • #11
CRGreathouse said:
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)
 
  • #12
... and, yes, this was in Radian mode.
 
  • #13
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?
 
  • #14
Abdul Quadeer said:
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:

[tex]\sin \pi * (1201) = 0 * (1201) = 0[/tex]

Your calculator evaluates [itex]\sin(\pi)[/tex] first.<br /> Note that [itex]\sin(xy)[/tex] does not necessarily equal [itex]\sin(x)*y[/tex][/itex][/itex][/itex]
 
  • #15
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.
 
  • #16
D H said:
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:

[tex]\sin(\pi X) = \sin(X \pi) = 0[/tex]

for all values of X such that [itex]0 \le X \le 555,555[/tex][/itex]
 
  • #17
D H said:
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.

zgozvrm said:
In that case, I get the same result:

[tex]\sin(\pi X) = \sin(X \pi) = 0[/tex]

for all values of X such that [itex]0 \le X \le 555,555[/tex][/itex]
[itex] <br /> Only integer values of X <img src="https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f600.png" class="smilie smilie--emoji" loading="lazy" width="64" height="64" alt=":biggrin:" title="Big Grin :biggrin:" data-smilie="8"data-shortname=":biggrin:" />[/itex]
 
  • #18
Abdul Quadeer said:
Only integer values of X :biggrin:

Yes, of course.
 
  • #19
zgozvrm said:
In that case, I get the same result:

[tex]\sin(\pi X) = \sin(X \pi) = 0[/tex]

for all values of X such that [itex]0 \le X \le 555,555[/tex][/itex]
[itex] Wow, I can't believe you tried every value in that range! <img src="https://www.physicsforums.com/styles/physicsforums/xenforo/smilies/oldschool/bugeye.gif" class="smilie" loading="lazy" alt=":bugeye:" title="Bug Eye :bugeye:" data-shortname=":bugeye:" /><br /> <blockquote data-attributes="" data-quote="Abdul Quadeer" data-source="post: 2975383" class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote js-expandWatch"> <div class="bbCodeBlock-title"> Abdul Quadeer said: </div> <div class="bbCodeBlock-content"> <div class="bbCodeBlock-expandContent js-expandContent "> Only integer values of X <img src="https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f600.png" class="smilie smilie--emoji" loading="lazy" width="64" height="64" alt=":biggrin:" title="Big Grin :biggrin:" data-smilie="8"data-shortname=":biggrin:" /> </div> </div> </blockquote>Hmmm, okay, but still...[/itex]
 

Similar threads

Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
8
Views
2K
Replies
3
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K