fix special cases of x= NAN or INF

This commit is contained in:
Martin Kroeker 2024-06-23 01:12:33 +02:00 committed by GitHub
parent bd47630bcf
commit c08113c279
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 4 deletions

View File

@ -42,7 +42,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x,
if (1 == inc_x) if (1 == inc_x)
{ {
if (0.0 == da) if (0) //if (0.0 == da )
{ {
v2f64 zero_v = {0.0, 0.0}; v2f64 zero_v = {0.0, 0.0};
@ -244,8 +244,10 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x,
{ {
for (i = n; i--;) for (i = n; i--;)
{ {
if (isfinite(*x))
*x = 0.0; *x = 0.0;
else
*x = NAN;
x += inc_x; x += inc_x;
} }
} }