@@ -340,6 +340,21 @@ L<Logarithm|https://en.wikipedia.org/wiki/Logarithm> to base C<$base>, or to
340
340
base C < e > (Euler's Number) if no base was supplied
341
341
(L < Natural logarithm|https://en.wikipedia.org/wiki/Natural_logarithm > .
342
342
343
+ say (e*e).log; # 2
344
+
345
+ = head2 routine log10
346
+
347
+ multi method log10()
348
+ multi sub log10(Cool(Numeric))
349
+
350
+ Coerces the invocant (or in the sub form, the invocant) to
351
+ L < Numeric|/type/Numeric > , and returns its
352
+ L < Logarithm|https://en.wikipedia.org/wiki/Logarithm > to base 10, that is, a
353
+ number that approximatly produces the original number when raised to the power
354
+ of 10.
355
+
356
+ say log10(1001); # 3.00043407747932
357
+
343
358
= head2 method exp
344
359
345
360
multi method exp(Cool:D: Cool:D $base?)
@@ -671,7 +686,7 @@ Coerces the invocant to L<IO::Path>.
671
686
672
687
= begin comment
673
688
674
- TODO: sech, asech, cosech, acosech, cotanh, acotanh, cis, roots, log10,
689
+ TODO: sech, asech, cosech, acosech, cotanh, acotanh, cis, roots,
675
690
unpolar, truncate, fmt, substr-rw,
676
691
trans, index, rindex,
677
692
match, comb, lines, subst, sprintf, printf, samecase,
0 commit comments