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 (0.0 == da)
if (0) //if (0.0 == da )
{
v2f64 zero_v = {0.0, 0.0};
@ -243,9 +243,11 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x,
if (da == 0.0)
{
for (i = n; i--;)
{
*x = 0.0;
{
if (isfinite(*x))
*x = 0.0;
else
*x = NAN;
x += inc_x;
}
}