From b9a990d8a88cc96b6555952e82629d7647f42e34 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 20 Mar 2000 04:20:52 +0000 Subject: [PATCH] Add exp(), ln(), and some other functions to numeric-functions table. --- doc/src/sgml/func.sgml | 64 +++++++++++++++++++++++++++++++++++------- 1 file changed, 54 insertions(+), 10 deletions(-) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 5c7529b7293..7fa24ec365b 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -41,20 +41,23 @@ COALESCE(list) non-NULL return first non-NULL value in list - COALESCE(r"le>, c2 + 5, 0) + COALESCE(rle, c2 + 5, 0) NULLIF(input,value) input or NULL - return NULL if input = value - NULLIF(c1, 'N/A') + return NULL if + input = + value, + else input + + NULLIF(c1, 'N/A') CASE WHEN expr THEN expr [...] ELSE expr END expr - return expression for first true clause - CASE WHEN c1 = 1 THEN 'match' ELSE 'no match' END + return expression for first true WHEN clause + CASE WHEN c1 = 1 THEN 'match' ELSE 'no match' END @@ -79,16 +82,52 @@ - dexp(float8) + abs(float8) + float8 + absolute value + abs(-17.4) + + + sqrt(float8) + float8 + square root + sqrt(2.0) + + + exp(float8) float8 raise e to the specified exponent - dexp(2.0) + exp(2.0) - dpow(float8,float8) + ln(float8) + float8 + natural logarithm + ln(2.0) + + + log(float8) + float8 + base 10 logarithm + log(2.0) + + + pow(float8,float8) float8 raise a number to the specified exponent - dpow(2.0, 16.0) + pow(2.0, 16.0) + + + round(float8) + float8 + round to nearest integer + round(42.4) + + + trunc(float8) + float8 + truncate (towards zero) + trunc(42.4) float(int) @@ -112,6 +151,11 @@ + + + Most of the functions listed for FLOAT8 are also available for + type NUMERIC. + -- 2.39.5