Merge pull request #4717 from bartoldeman/zscal-float-inf-fix

Replace use of FLT_MAX in x86_64 zscal.c by isinf()
This commit is contained in:
Martin Kroeker 2024-05-26 12:26:41 +02:00 committed by GitHub
commit 772116879d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -394,7 +394,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r, FLOAT da_i,
}
}
else if (da_r < -FLT_MAX || da_r > FLT_MAX) {
else if (isinf(da_r)) {
while(j < n)
{
x[i]= NAN;
@ -410,7 +410,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r, FLOAT da_i,
while(j < n)
{
temp0 = -da_i * x[i+1];
if (x[i] < -FLT_MAX || x[i] > FLT_MAX)
if (isinf(x[i]))
temp0 = NAN;
x[i+1] = da_i * x[i];
if ( x[i] == x[i]) //preserve NaN