TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Thomas Seeling
date: 1997-01-23 14:44:20
subject: Re: Floating point feature with optimization

* Crossposted in OS2PROG
* Crossposted in OS2.PROG.GER
* Crossposted in OS2NET.PROGRAMMIERUNG.GER

======================================================================
* Forwarded von Thomas Seeling (2:244/1130.42)
* Area : emx
======================================================================
From: Holger Veit 


> I discovered that if you use the inline function optimization, trig
> functions break with large argument values. Try sin(1e30) -- the result
> isn't between -1 and 1!

Ever heard about the polynomial algorithms that implement trigonometric
functions? They are not made for such large arguments. The 486 data sheet
(and I have no doubts the Pentium/PPro data sheets as well) talks about
clock penalties if an argument is larger than PI/4, a clear sign that
it has to rescale the operand first if it is outside the guaranteed accuracy
range of the used Taylor polynome. A double precision variable has
about 14-15 significant digits, with 1e30 you are 15 powers of 10 away.

Garbage in - garbage out.

--
         Dr.-Ing. Holger Veit             | INTERNET: Holger.Veit{at}gmd.de
|  |   / GMD - German National Research   | Phone: (+49) 2241 14 2448 or 2039
|__|  /  Center for Information Technology| Fax:   (+49) 2241 14 2242
|  | /   Schloss Birlinghoven             |     XFree86/OS2 goes public!
|  |/    D-53754 Sankt Augustin, Germany  |    V3.2 from ftp.xfree86.org
         WWW: http://borneo.gmd.de/~veit/ |  /pub/XFree86/3.2/binaries/OS2
-------------
To unsubscribe send a message to majordomo{at}IAEhv.nl with in the body:
unsubscribe emx 
Report serious problems at: emx-owner{at}.IAEhv.nl.
======================================================================

--- E3-32/1.11-32/2.51+
* Origin: Die TeX-Box +49-6034-930021 V.34 -930022 ISDN 24h (2:244/1130.42)
SEEN-BY: 50/99 54/99 270/101 620/243 625/110 160 711/401 413 430 808 934
SEEN-BY: 712/311 407 505 506 517 623 624 704 713/317 800/1
@PATH: 244/1130 1634 24/888 396/1 270/101 712/624 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.