workaround fault with ssq=inf,scale=0
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Sat, 2 Jul 2022 21:47:17 +0000 (23:47 +0200)
committerGitHub <noreply@github.com>
Sat, 2 Jul 2022 21:47:17 +0000 (23:47 +0200)
kernel/arm64/dznrm2_thunderx2t99.c

index fba2fe8..e342b0b 100644 (file)
@@ -404,6 +404,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
 #else
        nrm2_compute(n, x, inc_x, &ssq, &scale);
 #endif
+       if (fabs(scale) <1.e-300) return 0.;
        ssq = sqrt(ssq) * scale;
 
        return ssq;