Changeset 1055
- Timestamp:
- 12/27/20 19:39:44 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/similarity/SVD/lapack.cpp
r389 r1055 59 59 #include <stdint.h> //uint8_t 60 60 #include "lapack.h" 61 #include <common/log.h> 61 62 62 63 … … 296 297 else 297 298 { 298 c = (_Tp)std::sqrt((gamma + beta) / (gamma * 2)); 299 s = (_Tp)(p / (gamma * c * 2)); 299 if (gamma == 0) //MK 2020-12: workaround for embarcadero compiler 300 { 301 #ifndef __BORLANDC__ //It happens so often in embarcadero-produced executables that don't even bother the user with messages. Visual c++ and gcc/clang do not experience this problem. 302 logPrintf("Lapack", "JacobiSVD", LOG_ERROR, "Numerical instability in JacobiSVDImpl_(), likely 0.0/0.0, specific to floating point handling by this particular compiler. p=%.17g, gamma=%.17g, beta=%.17g. Recovering with bogus results.", p, gamma, beta); 303 #endif 304 c = s = 0; 305 } 306 else 307 { 308 c = (_Tp)std::sqrt((gamma + beta) / (gamma * 2)); 309 s = (_Tp)(p / (gamma * c * 2)); 310 } 300 311 } 301 312
Note: See TracChangeset
for help on using the changeset viewer.