## "Fossies" - the Fresh Open Source Software Archive

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

skipping to change at line 836 skipping to change at line 836
Inplace => 1, Inplace => 1,
/* note: not quite the normal check since set b bad within Code */ /* note: not quite the normal check since set b bad within Code */
/* we propagate the bad flag even if a was originally bad since */ /* we propagate the bad flag even if a was originally bad since */
/* there is no easy way to pass this information around */ /* there is no easy way to pass this information around */
if ( a == b && \$ISPDLSTATEBAD(b) ) if ( a == b && \$ISPDLSTATEBAD(b) )
}, },
Code => q[ Code => q[
int flag = 0; int flag = 0;
if ( PDL_ISNAN_\$PPSYM()(\$a()) ) { if ( PDL_ISNAN_\$PPSYM()(\$a()) ) {
flag = 1; flag = 1;
} }
else { else {
\$b() = \$a(); \$b() = \$a();
} }
%} %}
], ],
skipping to change at line 890 skipping to change at line 890
Inplace => 1, Inplace => 1,
/* note: not quite the normal check since set b bad within Code */ /* note: not quite the normal check since set b bad within Code */
/* we propagate the bad flag even if a was originally bad since */ /* we propagate the bad flag even if a was originally bad since */
/* there is no easy way to pass this information around */ /* there is no easy way to pass this information around */
if ( a == b && \$ISPDLSTATEBAD(b) ) if ( a == b && \$ISPDLSTATEBAD(b) )
}, },
Code => q[ Code => q[
int flag = 0; int flag = 0;
if ( !PDL_ISFINITE_\$PPSYM()(\$a()) && !PDL_ISNAN_\$PPSYM()(\$a()) ) { if ( !PDL_ISFINITE_\$PPSYM()(\$a()) && !PDL_ISNAN_\$PPSYM()(\$a()) ) {
flag = 1; flag = 1;
} }
else { else {
\$b() = \$a(); \$b() = \$a();
} }
%} %}
], ],
skipping to change at line 944 skipping to change at line 944
Inplace => 1, Inplace => 1,
/* note: not quite the normal check since set b bad within Code */ /* note: not quite the normal check since set b bad within Code */
/* we propagate the bad flag even if a was originally bad since */ /* we propagate the bad flag even if a was originally bad since */
/* there is no easy way to pass this information around */ /* there is no easy way to pass this information around */
if ( a == b && \$ISPDLSTATEBAD(b) ) if ( a == b && \$ISPDLSTATEBAD(b) )
}, },
Code => q[ Code => q[
int flag = 0; int flag = 0;
if ( !PDL_ISFINITE_\$PPSYM()(\$a()) ) { if ( !PDL_ISFINITE_\$PPSYM()(\$a()) ) {
flag = 1; flag = 1;
} }
else { else {
\$b() = \$a(); \$b() = \$a();
} }
%} %}
], ],
skipping to change at line 1041 skipping to change at line 1041
values are copied with no replacement. values are copied with no replacement.
=cut =cut
Inplace => 1, Inplace => 1,
Code => '\$b() = \$a();', Code => '\$b() = \$a();',
\$GENERIC(b) replace = (\$GENERIC(b)) \$COMP(newval); \$GENERIC(b) replace = (\$GENERIC(b)) \$COMP(newval);
\$GENERIC(b) a_val; \$GENERIC(b) a_val;