This site is supported by donations to The OEIS Foundation.
Template:Log 10
From OeisWiki
The following documentation is located at Template:Log 10/doc. [<Edit> Template:Log 10/doc]
[⧼Purge⧽ Template:Log 10]
[⧼Purge⧽ Template:Log 10]
The {{log_10}} mathematical function template returns the common logarithm of , where is a positive real number.
Contents
Usage
- {{log_10|a positive real number}}
Valid input
- A positive real number as argument.
Examples
Examples with valid input
Code Result {{log_10|0.1}} -1 {{log_10|1}} 0 {{log_10|1.5}} 0.17609125905568 {{log_10|10}} 1 {{log_10|150}} 2.1760912590557 {{log_10|1000}} 3 {{log_10|10^40}} 40 {{log_10|10^25 * 10^40}} 65
Examples with invalid input (returns an error message)
Code Result {{log_10|i}} Log_10 error: Argument must be a positive real number {{log_10|-1}} Log_10 error: Argument must be a positive real number {{log_10|0}} Log_10 error: Argument must be a positive real number
Code
{{ifnum| {{{1|not a number}}} | {{#ifexpr: ({{{1}}}) > 0 | {{#expr: ln ({{{1}}}) / ln 10 }} | {{error| Log_10 error: Argument must be a positive real number }} }} | {{error| Log_10 error: Argument must be a positive real number }} }}