In Cool§

See primary documentation in context for routine log10

multi method log10()
multi sub log10(Numeric $x)
multi sub log10(Cool    $x)

Coerces the invocant (or in the sub form, the argument) to Numeric (or uses it directly if it's already in that form), and returns its Logarithm in base 10, that is, a number that approximately produces the original number when 10 is raised to its power. Returns -Inf for 0.

say log10(1001);            # OUTPUT: «3.00043407747932␤»

Returns NaN for negative arguments. As of 6.e language version (early implementation exists in Rakudo compiler 2023.02+), will return a Complex value for negative arguments.

In role Numeric§

See primary documentation in context for routine log10

multi sub    log10(Numeric:D  --> Numeric:D)
multi method log10(Numeric:D: --> Numeric:D)

Calculates the logarithm to base 10. Returns -Inf for 0.

Returns NaN for negative arguments. As of 6.e language version (early implementation exists in Rakudo compiler 2023.02+), will return a Complex value for negative arguments.