File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 1+ - make Trans::toreal do nothing if given real-typed data
2+
130.432 2025-01-04
24- uses PDL 2.096+ lib/*.pd format for quicker builds
35
Original file line number Diff line number Diff line change @@ -850,13 +850,13 @@ sub PDL::acoth($) {my $tmp = 1/pdl($_[0]) ; $tmp->atanh}
850850
851851my $_tol = 9.99999999999999e-15;
852852
853- sub toreal{
854- return $_[0 ] if $_[0]->isempty ;
855- $_tol = $_[1 ] if defined $_[1] ;
856- my ($min, $max, $tmp);
857- ($min, $max) = $_[0]->im->minmax;
858- return $_[0]->re->sever unless (abs($min) > $_tol || abs($max) > $_tol);
859- $_[0];
853+ sub toreal {
854+ $_tol = $_[1 ] if defined $_[1] ;
855+ return $_[0 ] if $_[0]->isempty or $_[0]->type->real ;
856+ my ($min, $max, $tmp);
857+ ($min, $max) = $_[0]->im->minmax;
858+ return $_[0]->re->sever unless (abs($min) > $_tol || abs($max) > $_tol);
859+ $_[0];
860860}
861861
862862=head2 mlog
You can’t perform that action at this time.
0 commit comments