Re: Floating point behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Am 07.09.2008 um 12:00 schrieb Vincent Lefevre:

On 2008-09-04 02:00:59 -0700, Brian Dessent wrote:
eool wrote:
Basically, the reason given in the FAQ is that the result of
cos(x) (intermediate, higher precision value) will be stored in a
register and thus truncated. Then the result of cos(y) is directly
compared with the truncated value located in a register, resulting
in this strange (?) behavior.

There could be other reasons in practice, e.g. the cos() function
wasn't the same one. For instance, this can happen when one of them
is evaluated at compilation time because the argument value was
known.


Indeed - all trigonometric functions are only aproximations. I only recently had a good look into it.

http://uiq3.sourceforge.net/wiki/index.php/Office/FX-602P/Diff#Arithmetic_Libraries

Martin
- --
Martin Krischik
krischik@xxxxxxxxxxxxxxxxxxxxx

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iD8DBQFIw6xqijwKaHyem9cRAtLoAJ4g+aPY/QD5Wz+tGRQ+HSI9W9kOEwCbBC7u
o6rTCrX9wMuv3nm27U4r2P8=
=1opA
-----END PGP SIGNATURE-----

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux