![]() |
【转帖】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. |