From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.unit0.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: hreba Newsgroups: comp.lang.ada Subject: Re: Trigonometric operations on x86 and x64 CPUs Date: Sun, 18 Dec 2016 16:45:43 +0100 Message-ID: References: <8d0f7f03-9324-4702-9100-d6b8a1f16fc5@googlegroups.com> <295c603e-920d-4405-afb6-084d3d165112@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net etYBeROw7IlPtQs+kWH2cAPh/BHHo6sv44W5405ObDsmreiH4M Cancel-Lock: sha1:TCm7l0Gx6LAhzyXayxHQam/ARF8= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 In-Reply-To: <295c603e-920d-4405-afb6-084d3d165112@googlegroups.com> Xref: news.eternal-september.org comp.lang.ada:32911 Date: 2016-12-18T16:45:43+01:00 List-Id: On 12/18/2016 03:19 PM, Robert Eachus wrote: > On Sunday, December 18, 2016 at 5:09:55 AM UTC-5, already...@yahoo.com wrote: > > I am one of those other users. In paricular tangents near Pi/4 (90 degrees) have very large swings for small errors. A bad value of Pi can result in a very large negative value for the tangent instead of a very large positive value. This seems to be a bad mathematical formulation of some problem, as it is often the case when a very high numerical precision of a numerical function is demanded. But tell me if I am wrong. Close to Pi/4 the following relation holds: tan (Pi/4 + phi) -> -1/phi, for phi -> 0, so an approximation like this should be used for values close to Pi/4. Is the angle really known with a precision which justifies a special implementation of the trigonometric functions? -- Frank Hrebabetzky +49 / 6355 / 989 5070