Add exp(), ln(), and some other functions to numeric-functions table.
authorTom Lane
Mon, 20 Mar 2000 04:20:52 +0000 (04:20 +0000)
committerTom Lane
Mon, 20 Mar 2000 04:20:52 +0000 (04:20 +0000)
doc/src/sgml/func.sgml

index 5c7529b7293ff53e4fa566e3a096ec34f958e4ff..7fa24ec365ba3d01eaf6d9c76c0c4283789fd444 100644 (file)
     COALESCE(list) 
     non-NULL 
     return first non-NULL value in list 
-    COALESCE(r"le>, 
-     class="parameter">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 
        
       
      
       
       
        
-    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) 
      
     
    
+
+   
+   Most of the functions listed for FLOAT8 are also available for
+   type NUMERIC.
+