Just a curious mathematical result
|
03-05-2018, 10:54 PM
Post: #1
|
|||
|
|||
Just a curious mathematical result
Hi all,
Just to let you know about a curious mathematical result I discovered recently. In radians: Sin(9*(Sin(1) + Cos(40))) = 0.999999999999999830826985368... which differs from the integer 1 by about 1e16. If you compute it on a 12-digit machine (such as the HP-71B) y will probable get evaluated as exactly 1. The correct value requires more than 12 digits, in a pinch the Windows calculator will do. ¿ Nice, isn't it ? V. . All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
03-05-2018, 11:33 PM
Post: #2
|
|||
|
|||
RE: Just a curious mathematical result
This little problem makes me appreciate Longfloat and newRPL very much.
|
|||
03-05-2018, 11:33 PM
(This post was last modified: 03-06-2018 12:12 AM by Valentin Albillo.)
Post: #3
|
|||
|
|||
RE: Just a curious mathematical result
(03-05-2018 11:08 PM)Mike (Stgt) Wrote: Should be added here. (sorry for the typos there in my original post, virtual keyboards can be a chore and I didn't have time to properly proofread) Yes, I think you're right so I've just contacted the people in charge of the web page you mentioned to let them know and perhaps consider including it there. By the way, Mike, did you have a look at the PDF document I suggested in my reply to your post on Namir's thread, namely: AMS - Computing square root of 2 to 1,000,000 digits The document discusses algorithms used in the past to compute square roots to thousands of digits and in particular the one used to reach 1,000,000 digits. Also, to check your very own implementation simply google "square root of 2 to 1 million digits" and you'll immediately find a link to the full result. Regards. V. . All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
03-06-2018, 07:07 AM
Post: #4
|
|||
|
|||
RE: Just a curious mathematical result
A question would be. How did you get that formula in the first place? It is not a common one.
Wikis are great, Contribute :) |
|||
03-06-2018, 01:59 PM
Post: #5
|
|||
|
|||
RE: Just a curious mathematical result
Works on SM DM42 but gives "1" in Prime "home" rpn and "1." in Prime CAS
Esben 15C CE, 28s, 35s, 49G+, 50G, Prime G2 HW D, SwissMicros DM32, DM42, DM42n, WP43 Pilot Elektronika MK-52 & MK-61 |
|||
03-06-2018, 02:10 PM
Post: #6
|
|||
|
|||
RE: Just a curious mathematical result
(03-06-2018 01:59 PM)DA74254 Wrote: Works on SM DM42 but gives "1" in Prime "home" rpn and "1." in Prime CAS Well, it's the correct answer given the HP Prime's number of digits / bits in the two modes. Software Failure: Guru Meditation -- Antonio IU2KIY |
|||
03-06-2018, 03:02 PM
Post: #7
|
|||
|
|||
RE: Just a curious mathematical result
...and the WP-34S in double-precision mode yields
0.9999999999999998308269853686957601 Jake |
|||
03-06-2018, 03:05 PM
Post: #8
|
|||
|
|||
RE: Just a curious mathematical result
(03-06-2018 02:10 PM)TheKaneB Wrote:(03-06-2018 01:59 PM)DA74254 Wrote: Works on SM DM42 but gives "1" in Prime "home" rpn and "1." in Prime CAS Yes, I'm aware of that. But if you calculate a large number, say; 99^20, you may hit "view" and you can obtain a number 100's of digits long. Then 1/x and you get a resiprocal of that large number. Though, the "1." in CAS is absolute. You won't be able to evaluate it, only obtain the approx version of the formula stated by OP. Esben 15C CE, 28s, 35s, 49G+, 50G, Prime G2 HW D, SwissMicros DM32, DM42, DM42n, WP43 Pilot Elektronika MK-52 & MK-61 |
|||
03-06-2018, 04:15 PM
(This post was last modified: 03-06-2018 04:32 PM by jebem.)
Post: #9
|
|||
|
|||
RE: Just a curious mathematical result
(03-06-2018 01:59 PM)DA74254 Wrote: Works on SM DM42 but gives "1" in Prime "home" rpn and "1." in Prime CAS Yes, HP Prime on CAS mode gives me 1. for approx(SIN(9*(SIN(1)+COS(40)))) However doing 1-Ans gives me 3.5527136788 E-15 So, not exactly the same answer of absolute 1 as got on Home mode, where 1-Ans gives exactly 0. Further quick searching on google shows a few answers for the above CAS result of 3.5527136788 E-15 for instance here. Apparently this value corresponds to 8 ^ -16 or 16 ^ -12 or -64 ^ -8 (i didn't take the time to check it). Tim and Cyrille have been posting some information on the numbers internal representation being different on Home and on CAS modes, and that can explain the different results when trying to get the hidden guard digits on each mode. Jose Mesquita RadioMuseum.org member |
|||
03-06-2018, 04:35 PM
Post: #10
|
|||
|
|||
RE: Just a curious mathematical result
(03-06-2018 03:05 PM)DA74254 Wrote:(03-06-2018 02:10 PM)TheKaneB Wrote: Well, it's the correct answer given the HP Prime's number of digits / bits in the two modes. Hi, The Prime can do large integers, but for floating point numbers will always be 12 digit accuracy (actually CAS is double precision floating point, which could be 15 digits - but i'm not sure the developers will guarantee this). . |
|||
03-06-2018, 04:44 PM
(This post was last modified: 03-06-2018 04:51 PM by BartDB.)
Post: #11
|
|||
|
|||
RE: Just a curious mathematical result
(03-06-2018 04:15 PM)jebem Wrote:(03-06-2018 01:59 PM)DA74254 Wrote: Works on SM DM42 but gives "1" in Prime "home" rpn and "1." in Prime CAS 1 - sin(9*sin(1)+cos(40))) should yield 1.69173...E-16, so the Prime is quite wrong. CAS approx. is double precision floating point which gives 15 digit accuracy (17 at most, but for Prime CAS I have found it to be seldom better than 15). However, as you have demonstrated, more digits can be found by subtracting the more significant digits - but I have found they are usually wrong. So I would not rely on it. . |
|||
03-06-2018, 04:49 PM
(This post was last modified: 03-06-2018 04:54 PM by BartDB.)
Post: #12
|
|||
|
|||
RE: Just a curious mathematical result
(03-05-2018 11:08 PM)Mike (Stgt) Wrote:(03-05-2018 10:54 PM)Valentin Albillo Wrote: Hi all, These type of equations should be called "Rube Goldberg methods of obtaining almost integers" . |
|||
03-06-2018, 05:53 PM
Post: #13
|
|||
|
|||
RE: Just a curious mathematical result
Or weird approximations of pi.
18*(sin(1) + cos(40)) ~= pi |
|||
03-07-2018, 11:42 AM
Post: #14
|
|||
|
|||
RE: Just a curious mathematical result | |||
03-07-2018, 02:23 PM
Post: #15
|
|||
|
|||
RE: Just a curious mathematical result | |||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 8 Guest(s)