log10 - This function computes the base 10 logarithm of a number.
log10(argument)
This mathematical function allows the user to compute the base 10 logarithm of a number. This logarithm has the number 10 as its base. In litterature, you might find the log10 written as only log, since it is most commonly used for computations than the natural logarithm. The logarithm of a number x is the exponent y to which 10 must be raised to give x. This function is defined in the first and fourth quadrant, meaning that 0<x<INF and -INF<y<INF.
Note: In the followings examples, the _ between the { should be removed to make it work.
One can use this function with integers: test(q(res={_{log10(45);}}.),q(res=1.65321.)); With floats: test(q(res={_{log10(4.5);}}.),q(res=.653213.)); With another variable: test(q(res={_{ %include "/includes/extenso.sn"; a=3; log10(a); }}.), q(res=.477121.)); With a trigonometric function: test(q(res={_{ %include "/includes/extenso.sn"; a=cos(0); log10(a); }}.), q(res=0.)); With the limits: test(q(res={_{ %include "/includes/extenso.sn"; log10(0); }}.), q(res=INF.)); With an array: test(q(res={_{log10(1,3,4.5);}}.),q(res=\[0,.477121,.653213\].)); But not with negative numbers: test(q(res={_{log10(-1);}}.),q(res=NAN.)); Since this function is defined in the first and fourth quadrant, the x must always be positive. However, this returns an imaginary number, 1.36*i.
Written by Caroline Laplante, <claplante@sednove.com>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com