more fixes for infinite x

This commit is contained in:
Martin Kroeker 2024-05-31 14:34:49 +02:00 committed by GitHub
parent a16f8249ba
commit ab13cfef93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -258,13 +258,17 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r, FLOAT da_i,
temp0 = NAN;
else
temp0 = -da_i * x[i+1];
x[i+1] = da_i * x[i];
if (!isinf(x[i+1]))
x[i+1] = da_i * x[i];
else x[i+1] = NaN;
x[i] = temp0;
if (isnan(x[i+inc_x]) || isinf(x[i+inc_x]))
temp1 = NAN;
else
temp1 = -da_i * x[i+1+inc_x];
x[i+1+inc_x] = da_i * x[i+inc_x];
if (!isinf(x[i+1+inc_x]))
x[i+1+inc_x] = da_i * x[i+inc_x];
else x[i+1+inc_x] = NaN;
x[i+inc_x] = temp1;
i += 2*inc_x ;
j+=2;