Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add Numeric.log10 which simply calls self.log(10) -- remove resulting…
… unneeded log10s from Complex and Num.
  • Loading branch information
colomon committed Apr 6, 2010
1 parent 3b1d348 commit c06062d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
8 changes: 0 additions & 8 deletions src/core/Complex.pm
Expand Up @@ -155,10 +155,6 @@ class Complex does Numeric {
$.log / $base.log;
}
multi method log10() {
$.log / 10.log;
}
multi method polar() {
$.abs, atan2($.im, $.re);
}
Expand Down Expand Up @@ -336,10 +332,6 @@ multi sub log(Complex $x) {
$x.log()
}

multi sub log10(Complex $x) {
$x.log10;
}

multi sub sign(Complex $x) { $x.sign }

multi sub sqrt(Complex $x) {
Expand Down
4 changes: 0 additions & 4 deletions src/core/Num.pm
Expand Up @@ -79,10 +79,6 @@ augment class Num does Real {
$.log / $base.log;
}

multi method log10() {
pir::log10__Nn(self);
}

multi method perl() {
~self;
}
Expand Down
4 changes: 3 additions & 1 deletion src/core/Numeric.pm
@@ -1,3 +1,5 @@
role Numeric {
# no methods yet
method log10(Numeric $x:) {
self.log(10);
}
}

0 comments on commit c06062d

Please sign in to comment.