"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "t/ops.t" between
PDL-2.081.tar.gz and PDL-2.082.tar.gz

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

ops.t  (PDL-2.081):ops.t  (PDL-2.082)
skipping to change at line 166 skipping to change at line 166
{ {
my $pa = pdl 1; my $pa = pdl 1;
my $sq2 = sqrt 2; # perl sqrt my $sq2 = sqrt 2; # perl sqrt
$pa->inplace->plus(1); $pa->inplace->plus(1);
ok(all( approx($pa, pdl 2)), 'inplace plus'); ok(all( approx($pa, pdl 2)), 'inplace plus');
my $warning_shutup = sqrt $pa->inplace; my $warning_shutup = sqrt $pa->inplace;
ok(all( approx( $pa, pdl($sq2))), 'inplace pdl sqrt vs perl scalar sqrt'); ok(all( approx( $pa, pdl($sq2))), 'inplace pdl sqrt vs perl scalar sqrt');
my $pb = pdl 4; my $pb = pdl 4;
ok(all( approx( 2, sqrt($pb->inplace))),'perl scalar vs inplace pdl sqrt'); ok(all( approx( 2, sqrt($pb->inplace))),'perl scalar vs inplace pdl sqrt');
$pa .= 1;
eval {(my $tmp = $pa->inplace) += 1};
is $@, '', 'inplace += worked';
is $pa.'', 2, 'inplace += right value after';
} }
{ {
# log10 now uses C library # log10 now uses C library
# check using scalars and ndarrays # check using scalars and ndarrays
{ {
my $pa = log10(110); my $pa = log10(110);
my $pb = log(110) / log(10); my $pb = log(110) / log(10);
note "a: $pa [ref(\$pa)='", ref($pa),"']\n"; note "a: $pa [ref(\$pa)='", ref($pa),"']\n";
note "b: $pb\n"; note "b: $pb\n";
 End of changes. 1 change blocks. 
0 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)