Changeset 867 for cpp/common/nonstd_math.cpp
- Timestamp:
- 04/21/19 16:36:22 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/nonstd_math.cpp
r835 r867 7 7 RandomGenerator& rndGetInstance() 8 8 { 9 static RandomGenerator rnd(0);10 return rnd;9 static RandomGenerator rnd(0); 10 return rnd; 11 11 } 12 12 … … 50 50 void fpExceptEnable() 51 51 { 52 feclearexcept(FE_DIVBYZERO);53 feenableexcept(FE_DIVBYZERO);52 feclearexcept(FE_DIVBYZERO); 53 feenableexcept(FE_DIVBYZERO); 54 54 } 55 55 56 56 void fpExceptDisable() 57 57 { 58 fedisableexcept(FE_DIVBYZERO);58 fedisableexcept(FE_DIVBYZERO); 59 59 } 60 60 … … 83 83 //unsigned int was=_clear87(); 84 84 //logPrintf("","fpExceptInit",LOG_INFO,"control87 status before clear was %08x", was); 85 fp_control_word_std =_control87(0, 0); //4978 = 100110111001085 fp_control_word_std = _control87(0, 0); //4978 = 1001101110010 86 86 // Make the new fp env same as the old one, except for the changes we're going to make 87 87 fp_control_word_muted = fp_control_word_std | EM_INVALID | EM_DENORMAL | EM_ZERODIVIDE | EM_OVERFLOW | EM_UNDERFLOW | EM_INEXACT; //4991 = 1001101111111 … … 90 90 void fpExceptEnable() 91 91 { 92 unsigned int was =_clear87(); //trzeba czyscic zeby nie bylo exception...92 unsigned int was = _clear87(); //trzeba czyscic zeby nie bylo exception... 93 93 //logPrintf("","fpExceptEnable ",LOG_INFO,"control87 status before clear was %08x", was); 94 94 _control87(fp_control_word_std, 0xffffffff); … … 98 98 void fpExceptDisable() 99 99 { 100 unsigned int was =_clear87(); //trzeba czyscic zeby nie bylo exception...100 unsigned int was = _clear87(); //trzeba czyscic zeby nie bylo exception... 101 101 //logPrintf("","fpExceptDisable",LOG_INFO,"control87 status before clear was %08x", was); 102 102 _control87(fp_control_word_muted, 0xffffffff); … … 116 116 void fpExceptDisable() {} 117 117 #endif 118
Note: See TracChangeset
for help on using the changeset viewer.