disable the fast path for inc=1, alpha=0 as it does not handle x=NaN or Inf

This commit is contained in:
Martin Kroeker 2024-06-23 10:37:55 +02:00 committed by GitHub
parent c08113c279
commit 541e1b6959
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 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)
{ {
v4f32 zero_v = {0.0, 0.0, 0.0, 0.0}; v4f32 zero_v = {0.0, 0.0, 0.0, 0.0};
@ -259,7 +259,10 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x,
{ {
for (i = n; i--;) for (i = n; i--;)
{ {
*x = 0; if (isfinite(*x)
*x = 0;
else
*x = NAN;
x += inc_x; x += inc_x;
} }
} }