LOG10 in JS
Last updated
Last updated
Returns the base 10 logarithm of a number (JavaScript LOG10 function Documentation).
Math.log10( expression )
expression
: Numeric expression. It must be positive, otherwise returns NaN.
Same data type sent through parameter as a numeric expression.
CREATE OR REPLACE FUNCTION compute_log10(argument float)
RETURNS float
LANGUAGE JAVASCRIPT
AS
$$
return Math.log10(ARGUMENT);
$$
;
SELECT COMPUTE_LOG10(7.5);