File tree 2 files changed +9
-7
lines changed
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
+
1
3
0.432 2025-01-04
2
4
- uses PDL 2.096+ lib/*.pd format for quicker builds
3
5
Original file line number Diff line number Diff line change @@ -850,13 +850,13 @@ sub PDL::acoth($) {my $tmp = 1/pdl($_[0]) ; $tmp->atanh}
850
850
851
851
my $_tol = 9.99999999999999e-15;
852
852
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];
860
860
}
861
861
862
862
=head2 mlog
You can’t perform that action at this time.
0 commit comments