From: "John Herbster" Newsgroups: borland.public.delphi.objectpascal References: <3C4747A3.5F295536@bellatlantic.net> Subject: Re: sin(1E19) ? Date: Thu, 17 Jan 2002 19:49:40 -0600 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 208.191.147.135 Message-ID: <3c478060$1_1@dnews> X-Trace: dnews 1011318880 208.191.147.135 (17 Jan 2002 17:54:40 -0800) Path: dnews Xref: dnews borland.public.delphi.objectpascal:224242 "Ben Crain" wrote > D5's math unit correctly returns sin(1E18), > but not sin(1E19) or above. Why not? The specs for the 387 FPU says that for the sine function the magnitude of the input cannot exceed 2^63 which is about 9.22337E+18. The 387 is similar to the Pentium FPU and both are based on specification IEEE-754. Also of note is that the resolution of the numbers out near 1e18 gets rather course. While taking the sin(1e18) gives about -0.99282, the sin(1e18 - delta) where delta is the smallest decrement possible on an extended type number the size of 1e18 gives about -0.99835. That means the radians are taking big steps and the sine function is by no means continuous out there. So my advice is don't depend on the sine of extreme numbers to be very useful. Regards, JohnH