RE: [Algorithms] _ftol and CPU controlword
Brought to you by:
vexxed72
From: <ja...@re...> - 2000-12-15 16:44:22
|
It's actually worse than that, because any function that changes the rounding mode will keep it that way until it's changed again. So two calls of the same function with the same inputs could yield different outputs depending on the state of your program and what other FPU calls you've made. Evil. Jack -----Original Message----- From: Nicolas Serres [mailto:nic...@ch...] Sent: Friday, December 15, 2000 9:29 AM To: gda...@li... Subject: Re: [Algorithms] _ftol and CPU controlword If win32 code was compiled with "/qifist" option, you probably ended up with "nearest" rounding under win32, instead of C-standard "truncate" that x86 fpu also supports, and that you'll get under linux. Round-to-nearest mode is a legacy of the past (ms-dos days). Also, most apps/d3d drivers/etc tend to sent internal fpu mantissa precision to 24 bits (="float", even when expanded to the 80bits of a pseudo-register if the x87 stack). Nicolas ----- Original Message ----- From: "Bernd Kreimeier" <bk...@lo...> To: <gda...@li...> Sent: Friday, December 15, 2000 2:57 AM Subject: [Algorithms] _ftol and CPU controlword > > > I am trying to track down some float inconsistencies > between Win32 and Linux. I would very much appreciate > if somebody happens to have the actual assembly > instructions of Win32's _ftol, in particular whether > it sets a specific FPU control word (PC, RC fields), > or expects a specific control word (iff, which one). _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |