Navigation Menu

Skip to content

Commit

Permalink
fixup: badval could be NaN even if BADVAL_USENAN = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
zmughal committed Jul 10, 2016
1 parent 7123a3b commit 42942d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Basic/Core/pdlcore.c.PL
Expand Up @@ -1100,7 +1100,7 @@ PDL_Indx pdl_kludge_copy_$type(PDL_Indx poff, // Offset into the dest data array
my $type_usenan = $PDL::Types::typehash{$switch_type}{usenan};

my $comp_for_nan =
$usenan && $type_usenan
$type_usenan
# if not equal, check if both are NaN
? "( !finite( (($ctype *)pptr)[i] ) && !finite(source_badval.value.$ppsym) )"
# otherwise it must be false
Expand Down

0 comments on commit 42942d6

Please sign in to comment.