Post Reply 
New guy and programming problem
09-01-2018, 02:16 PM
Post: #28
RE: New guy and programming problem
(09-01-2018 12:23 PM)Thomas Klemm Wrote:  
(08-28-2017 06:13 PM)Dieter Wrote:  On a 10-digit machine this already happens for 89,9995°...90,0005°.

We can use this difference-to-product formula to calculate e.g. \(1-\sin(89.9995°)=\sin(90°)-\sin(89.9995°)\) ...

Another way, rearrange 1 - sin(x), so more accurate for x close to right angle.

1 - sin(x)
= (1 - sin(x)) * (1 + sin(x)) / (1 + sin(x))
= cos(x)^2 / (1 + sin(x))

1 - sin(89.9995°) ~ cos(89.9995°)^2 / 2 ~ 3.807717747e-11
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: New guy and programming problem - Albert Chan - 09-01-2018 02:16 PM
RE: New guy and programming problem - sasa - 09-01-2018, 03:18 PM
RE: New guy and programming problem - sasa - 09-01-2018, 05:33 PM



User(s) browsing this thread: 1 Guest(s)