Browse Source

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

Replace use of FLT_MAX in x86_64 zscal.c by isinf()
tags/v0.3.28^2
Martin Kroeker GitHub 1 year ago
parent
commit
772116879d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      kernel/x86_64/zscal.c

+ 2
- 2
kernel/x86_64/zscal.c 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


Loading…
Cancel
Save