The dangers of "Trunc"
From: Bram (spamdustbin_at_yahoo.com)
Date: 02/24/05
- Previous message: Raptor: "Re: Suggestions for decoupling units?"
- Next in thread: alanglloyd_at_aol.com: "Re: The dangers of "Trunc""
- Reply: alanglloyd_at_aol.com: "Re: The dangers of "Trunc""
- Reply: Rob Kennedy: "Re: The dangers of "Trunc""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 24 Feb 2005 05:16:58 -0800
I recently stumbled over something interesting. When your application works
with calls to external APIs that process blocks of reals you have to set the
coprocessor's controlword using Set8087CW(NewCW: Word) in order to
prevent seemingly random EInvalidOp exceptions. For example, you'd do this
when working with OpenGL libraries.
However, some of Delphi's standard functions reset the coprocessor's
controlword, unadvertently reintroducing the EInvalidOp problem. One
of these functions is "Trunc". Does anyone know of other Delphi functions
causing the FPU to reset its controlword?
Thanks!
Bram
- Previous message: Raptor: "Re: Suggestions for decoupling units?"
- Next in thread: alanglloyd_at_aol.com: "Re: The dangers of "Trunc""
- Reply: alanglloyd_at_aol.com: "Re: The dangers of "Trunc""
- Reply: Rob Kennedy: "Re: The dangers of "Trunc""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]