Sin(Pi) in Radians - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: Sin(Pi) in Radians (/thread-62301.html) |
Sin(Pi) in Radians - Mike - 08-27-2004 I know the sine of pi in radians should be zero. However,
41CX -4.100 E-10 I undererstand it has something to do with rounding, but the 30 does not calculate pi to infinity, does it round the answer instead?
What about other models?
Re: Sin(Pi) in Radians - John Limpert - 08-27-2004 On the HP-28C and HP-48GX, sin(pi) results in zero (exactly).
Re: Sin(Pi) in Radians - Bram - 08-27-2004 11C: same answer as 41CX
Edited: 27 Aug 2004, 12:45 p.m. after one or more responses were posted
Re: Sin(Pi) in Radians - JMH - 08-27-2004 HP 97 same as the 41 and 11C -4.100 E-10
Re: Sin(Pi) in Radians - Barry Schwartz - 08-27-2004 In the manual for the 15C, it is explained that the value returned by using the PI key on the calculator is good to 10 significant digits. Thus the value returned for sin(PI) is the same as for the 41CX since it is the sin of a 10 digit approximation to PI rather than PI itself. Some calculators carry more than 10 digits in their calculations and thus will produce sin(PI) = 0 when they round to 10 digits. For example, the TI-83 produces sin(PI)=0 because it carries internal calculations to 14 digits. If one calculates sin(PI) on the TI-83 with the same 10 digit approximation used on the 15C, then the same result as the 15C is generated.
Re: Sin(Pi) in Radians - Trent Moseley - 08-27-2004 Of all the different calcs that I have only the 25C and the 31E give exactly zero.
tm
Re: Sin(Pi) in Radians - James M. Prange (Michigan) - 08-27-2004 Yes, on the RPL calculators, replacing 'SIN(pi)' by 0 is one of the many built-in simplifications, as long as pi is symbolic. Of course, evaluating SIN(3.14159265359) quite correctly returns a non-zero result. To get the 0, clear both flag -2 (Constant -> symb) and flag -3 (Function -> symb).
Regards, Re: Sin(Pi) in Radians - Gordon Dyer - 08-27-2004 Here are my results: Re: Sin(Pi) in Radians - Emmanuel, France - 08-27-2004 Casio FX-880P : 0 Re: Sin(Pi) in Radians - Wlodek Mier-Jedrzejowicz - 08-27-2004 How about approaching this as a mathematical problem? sin (pi-delta) = sin (delta) If delta is small and in radians then sin (delta) = delta, to a very good approximation.
Now, no calculator can store pi completely
So, any calculator that does not round, or
Those calculators that do give zero are doing one
Treating "pi" as a symbolic value, and
Obtaining a non-zero value, but then
Rounding a small value to exactly zero. Some
There is one other possibility - that in the Hope this helps!
Wlodek
Re: Sin(Pi) in Radians - Palmer O. Hanson, Jr. - 08-27-2004 More on funny arithmetic On an HP-41 in radian mode: sin (pi) = - 4.1E-10 sin (-pi) = + 4.1E-10 sin (pi/4) - cos (pi/4) = 2.0E-10 On an HP-41 in degree mode: sin (180) = 0 sin (-180) = 0 sin (45) - cos (45) = 0 On a TI-59 in radian mode sin (pi) = 0 sin (-pi) = 0 sin (pi/4) - cos (pi/4) = 7.0E-13 On a TI-59 in degree mode: sin (180) = 0 sin (-180) = 0 sin (45) - cos (45) = 7.0E-13 On a TI-59: (pi x e) - (e x pi) = pi x 1 INV lnx - 1 INV lnx x pi = -2.8E-11, but pi / 1 INV lnx 1/x - 1 INV lnx x pi 1/x = -1.0E-12 It's enough to make one want to go back to one's slide rule where one KNEW that three digit accuracy was about the best one could do.
Re: Sin(Pi) in Radians - J-F Garnier - 08-28-2004 Actually, all Saturn-based machines know the pi value with double precision, and it's easy to get the extra pi digits thanks to the non-rounding behavior: SIN(3.1415926535) gives 8.97932384626e-11, which are the next pi digits: pi=3.1415926535897932384626...
J-F
Re: Sin(Pi) in Radians - Jordi Hidalgo - 08-28-2004 On the HP 9s, the sine of a number x such that 3.1415926535 <= x <= 3.1415926536 is zero in Radian mode. IMHO this is And the same goes for the 9g and the 30S, with different intervals, though.
Jordi
Re: Sin(Pi) in Radians - Vieira, Luiz C. (Brazil) - 08-28-2004 Hello Wlodek, guys; just one single question, "bitte". I remember, when studying Calculus (long time ago), that: sin(delta) = deltabut I cannot help remembering the math considerations/approaches and to what extent sin(delta) = deltaI mean, how small should delta be so it is true. If sin(delta) = deltais true, then sin(delta) becomes a straight line and it cannot be asymptotic. Is it a math consideration or a numerical approach, what is, in fact, closer to computers? Just a doubt of mine. Cheers.
Luiz (Brazil)
other sin problems - hugh steers - 08-28-2004 as you know, when you press pi on your hp then sin, most models return a non-zero answer. the manuals rather smugly point out that the answer returned is exactly the right answer for the pi approximation used by the machine. you know this. but, here is my swift kick in the pants for hp: how about getting the right answer for large arguments. for example, the 48gx gives sin(1e50) = 0.08683927... which is *completely* wrong, the correct answer being, -0.7.8967249342931008271028953...
so there.
Re: other sin problems - Mike - 08-28-2004 sin is an offense to God, not HP, sine is something different
Limit of 'delta' - Tizedes Csaba [Hungary] - 08-28-2004 Dear Luiz, I hope I understood your question correctly.
The Taylor-serie is:
Best wishes: Edited: 28 Aug 2004, 5:22 p.m.
Re: Sin(Pi) in Radians - Dave Shaffer (Arizona) - 08-28-2004 Note, also, that lim [sin(x)/x] = 1 as x-> 0
In other words, it IS linear the closer you get to zero.
Re: other sin problems - Dave Shaffer (Arizona) - 08-28-2004 Hugh,
re: "the 48gx gives sin(1e50) = 0.08683927... which is
Unless you are doing arithmetic to 50 digits, the poor calculator can't do this correctly. Without checking any actual algorithms, I strongly suspect that any calculator has to basically do MOD arithmetic to determine how many complete turns it has to subtract from x, and then determine the sine of the leftover. If the number of (implied) digits exceeds the calculator's number of sig figs, then the answer will be wrong. Your 1e50 means the calculator has to do 50 digit math to get the correct modulo remainder.
Re: Sin(Pi) in Radians - Garth Wilson - 08-28-2004 > It's enough to make one want to go back to one's slide
The 3-4 digits of the slide rule were usually adequate for real applications too. Trying to guess at the width of the hairline impressed upon us how insignificant further digits really were. Without that reference, people now use a calculator with 10 digits or more, and are not satisfied that accuracy does not always match the extreme precision. Short of positioning a satelite, I can't think of anything that has any use for that many digits.
Re: Sin(Pi) in Radians - Garth Wilson - 08-28-2004 To really understand what's going on, sometimes it's better to scrap all the mathematical proofs and just draw, in this case a right triangle with a very slim angle. You'll also see that as the angle approaches zero, the tangent will be the same as the sine. The equations are much more meaningful after we understand what they're representing.
Thanks, Tzedes and Dave - Vieira, Luiz C. (Brazil) - 08-28-2004 Hi, guys; I saw your post, Tizedes, and the Taylor-Series considerations brought some memories back... Thanks! Also, Dave's remark about the limits is precise: (sin(X))/X tends to be a straight line as X gets closer to zero. So, both numerical and analytical ways lead to a common situation. Thanks! This is the kind of thread that worth reading head to tail.
Luiz (Brazil) Edited: 28 Aug 2004, 6:18 p.m.
Re: Dave: Your post give me a new sight in calculus, thanks! [NT] - Tizedes Csaba [Hungary] - 08-28-2004 . Edited: 28 Aug 2004, 7:07 p.m.
Range Reduction - John Limpert - 08-28-2004 It does bring up an issue with some implementations of trig. functions. Not all of them do a good job at range reduction. I ran across a mention of this problem while reading a book on computational astronomy (J. Meeus). The book uses the sine of 360000030 degrees as an example. The correct answer is 0.5.
Re: other sin problems - hugh steers - 08-28-2004 not true. i had this problem already myself. you need a pi lookup table and you extract the appropriate 10 digit part (for 10 digit results). ok, you need to store the digits, but you dont need 50 digit math.
Re: Sin(Pi) in Radians - Jordi Hidalgo - 08-29-2004 FWIW, here are the intervals around pi for which the sine function returns zero on the HP 30S: [3.141592653589793237976281, 3.141592653589793238945133] and on the HP 9g: [3.14159265358979323798, 3.14159265358979323894] Jordi
Re: other sin problems - Eddie Shore - 08-29-2004 I get 8.68392788E-2 for the HP20S. My TIs 89T and 36X both return ERROR.
Pi on Saturn-based calc's - Karl Schneider - 08-29-2004 J-F Garnier posted,
Quote: Ya lost me, there. I cannot obtain this result on any Pioneer, or RPL-based (28/48/49) calc that I have. I get -2.0676157357 x 10^(-13) when taking sine of the 12-digit approximation of pi on these calc's.
When I convert 'pi' to a number on the RPL models and start "chipping away" the digits (Frac part, 10x, etc...), I stil find that only 12 digits of accuracy are present.
Re: Pi on Saturn-based calc's - J-F Garnier - 08-30-2004 Try SIN(3.1415926535), not SIN(3.14159265359) ...
J-F
Re: Range Reduction - gordon - 08-30-2004 The HP-42S does give sin(360000030)=0.5 !
Re: Sin(Pi) in Radians - Palmer O. Hanson, Jr. - 08-30-2004 I recall that in my old pre-calculus courses such as advanced algebra and trigonometry where the concept of limits and Taylor series had hardly been introduced there was a drawing of a sector defined by a radius R at an acute angle theta from the x axis, the length R along the x axis, and the arc of length R times theta. Then a vertical line was drawn from the intersection of the radius with the arc downward to the x axis (length is R sin theta) and another vertical line was drawn from the point (R,0) upward to connect with the extension of the radius (length is R tan theta). In this diagram the arc length is "squeezed" between the R sin theta segment and the R tan theta segment as the angle is decreased, showing that as the angle approaches zero the sin theta and the tan theta approach the angle theta.
It's a lot easier to draw that than to write it, but I haven't learned how to post drawings.
Re: Sin(Pi) in Radians and Rounding - Palmer O. Hanson, Jr. - 08-30-2004 You state "Rounding a small value to exactly zero. Some calculators do this "unthinkingly", which is Bad News, since many other calculations give small but non-zero values. That is why HP calculators do not round. Other calcs have code built in to recognize that certain types of calculation can reasonably be rounded, for example if an integer is followed by a string of zeros, and then a very small value. Casio and TI routinely do this sort of thing." I am fairly familiar with the TI product line but not familiar with that. I know that the HP product carried guard digits and rounded results to ten digits. I also know that the TI product line routinely carried more digits in its results than were available in the display and rounded to the display. The internal results were typically truncated not rounded. TI switched to rounded internal results somewhere in the 1980's with the introduction of the TI-68 and TI-95.
Can you give me some specific examples of the rounding that you describe?
Re: Pi on Saturn-based calc's - Karl Schneider - 08-31-2004 J-F -- Mea culpa! OK, now I'm getting your results on the Saturn-based machines I mentioned in my last post. I had failed to follow your instructions exactly. In fact, it can be taken one digit further:
sin (3.14159265358) = 9.79323846264 E-12 However, I believe that your mild "contradiction" of Wlodek:
Quote: is not strictly correct. This exercise proves only that the Saturn-based HP calculators' algorithm for sine can be used to calculate 12 additional significant digits of pi. It does not prove that the machines "know" the value of pi to 24 significant digits. As Wlodek stated,
Quote: So, when the first N correct digits of pi are entered in "radians" mode, the sine function will yield the next 12 missing digits accurately (for 7 <= N <= 12, as it turns out). That is, the machines will crunch out the Taylor series (or whatever method it uses) accurately to 12 sigificant digits. Since there is no range overlap between the input and the output for this problem, up to the 24th significant digit can be obtained. This indicates, to me, a well-written algorithm that minimizes roundoff error. The algorithm could be:
sin (x) = x - x3/3! + x5/5! - x7/7! + ... Good problem! -- KS
Edited: 31 Aug 2004, 1:22 a.m.
Re: Sin(Pi) in Radians and Rounding - Jordi Hidalgo - 08-31-2004 Palmer O. Hanson, Jr wrote:
Quote: He might be referring to this posting by John H. Meyers (also in Datafile V15N6p30).
Jordi
|