几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】floating point control flags getting cleared (http://www.dimcax.com/hust/showthread.php?t=16326)

yang686526 2009-05-05 11:00 AM

【转帖】floating point control flags getting cleared
 
floating point control flags getting cleared
floating point control flags getting cleared
we are using borland c++ with the dd-1.9 libraries.
when an oderror exception ("invalid index") is thrown from:
77e73887 c:\windows\system32\kernel32.dll
00e7e407 ___raisedebuggerexception
00e7e780 ___raisedebuggerexception
00e7e85a _throwexceptionldtc
009e18f8 oddbmtextimpl::composeforload
00ba6468 oddwgfileloader::loadobject
00ba5ad1 oddwgfileloader::loadobject
00ba3cb5 odobjloadresolver::queryx
00811a99 oddbobjectid::openobject
00811d6e oddbobjectid::safeopenobject
006007d0 dwgtosite::processentity(this=:0012f878, obj={ { { :00f755d4, null }, null }, :09c91500 })
the floating point control flags are cleared:
precision control (pc) from 2 to 0
rounding control from x to 0
infinity control from 1 to 0
this causes all floating point calculations to use single precision (pc=0)
instead of double (pc=2), so all our calculations are wrong.
strange. dd does not access fp processor flags. only odamfcapp::initinstance() sets them to cause "invalid double" exceptions in debug mode.
sergey slezkin


所有的时间均为北京时间。 现在的时间是 06:02 PM.