We trigger a (deliberate) floating point exception in the CGAL (header)
library:
```
// The multiplications could produce some NaN, with 0 * inf. Replacing it with inf is safe.
// min(x,y) (the order is essential) returns its second argument when the first is NaN.
// An IEEE 754-2019 maximum could help.
__m128d big = IA::largest().simd();
-> __m128d x1 = _mm_mul_pd(aa,bz); // {-ai*bi,as*bs}
//x1 = _mm_min_pd(x1,big); // no NaN
__m128d x2 = _mm_mul_pd(aa,c); // {-ai*bs,as*bi}
x2 = _mm_min_pd(x2,big); // no NaN
__m128d x3 = _mm_mul_pd(ap,bz); // {-as*bi,ai*bs}
//x3 = _mm_min_pd(x3,big); // no NaN
__m128d x4 = _mm_mul_pd(ap,c); // {-as*bs,ai*bi}
x4 = _mm_min_pd(x4,big); // no NaN
```
Thus, disable floating point exceptions for the test.
int
main()
{
+ // CGAL uses hand-optimized AVX instructions for certain performance
+ // critical operations that can create (temporary) signalling NaNs and
+ // trigger a spurious floating point exception. Thus disable FE_INVALID:
+#if defined(DEBUG) && defined(DEAL_II_HAVE_FP_EXCEPTIONS)
+ fedisableexcept(FE_INVALID);
+#endif
+
initlog();
test();
}
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams