Skip to content

Commit 30f8f0a

Browse files
committed
log10; examples
1 parent 624920c commit 30f8f0a

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

lib/Type/Cool.pod

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,21 @@ L<Logarithm|https://en.wikipedia.org/wiki/Logarithm> to base C<$base>, or to
340340
base C<e> (Euler's Number) if no base was supplied
341341
(L<Natural logarithm|https://en.wikipedia.org/wiki/Natural_logarithm>.
342342
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+
343358
=head2 method exp
344359
345360
multi method exp(Cool:D: Cool:D $base?)
@@ -671,7 +686,7 @@ Coerces the invocant to L<IO::Path>.
671686
672687
=begin comment
673688
674-
TODO: sech, asech, cosech, acosech, cotanh, acotanh, cis, roots, log10,
689+
TODO: sech, asech, cosech, acosech, cotanh, acotanh, cis, roots,
675690
unpolar, truncate, fmt, substr-rw,
676691
trans, index, rindex,
677692
match, comb, lines, subst, sprintf, printf, samecase,

0 commit comments

Comments
 (0)