| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Floating point feature w |
TA>> trig functions break with large argument values. Try sin(1e30) -- TA>> the result isn't between -1 and 1! DN> The issue arises over the uncertainty in the argument exceeding the DN> full cycle from 0 to 2*pi, which means that any value in the range -1 DN> to 1 could be returned as being valid. TS> If you have a look at the graph of f(x)=sin(x) you will TS> notice that it returns a value between [-1,+1] for each TS> argument, no matter how large it is. Technically, sin(inf) is undefined. TS> This is either a hardware bug of the FPU or an implementation bug. The FPU has just defined about 1e18 (or something like that) as "approximately infinity". (Infinity, in practice, always being a relative number - relative to an ant, we're infinitely tall, for example.) This doesn't make it any better, just an explanation from the theoretical standpoint. :-) --- Maximus/2 3.01* Origin: Tanktalus' Tower BBS (PVT) (1:342/708) 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: 342/5015 61 3615/50 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™.