Portable version of signbit.
| 378 | #ifndef _MSC_VER |
| 379 | // Portable version of signbit. |
| 380 | inline int getsign(double x) { |
| 381 | // When compiled in C++11 mode signbit is no longer a macro but a function |
| 382 | // defined in namespace std and the macro is undefined. |
| 383 | # ifdef signbit |
| 384 | return signbit(x); |
| 385 | # else |
| 386 | return std::signbit(x); |
| 387 | # endif |
| 388 | } |
| 389 | |
| 390 | // Portable version of isinf. |
| 391 | # ifdef isinf |