ANTILOG

The ANTILOG function returns the anti-logarithm (base 10) of a number. The ANTILOG and LOG functions are inverse operations.

ANTILOG(expression)
expression
An expression that returns a value of any built-in numeric, character-string, or graphic-string data type. A string argument is cast to double-precision floating point before evaluating the function. For more information about converting strings to double-precision floating point, see DOUBLE_PRECISION or DOUBLE.

If the data type of the argument is DECFLOAT(n), the result is DECFLOAT(n). Otherwise, the data type of the result is double-precision floating point. If the argument can be null, the result can be null; if the argument is null, the result is the null value.

Note

Results involving DECFLOAT special values: For decimal floating-point values the special values are treated as follows:
  • ANTILOG(NaN) returns NaN.
  • ANTILOG(-NaN) returns -NaN.
  • ANTILOG(Infinity) returns Infinity.
  • ANTILOG(-Infinity) returns 0.
  • ANTILOG(sNaN) and ANTILOG(-sNaN) return a warning or error. 1

Example

  • Assume the host variable ALOG is a DECIMAL(10,9) host variable with a value of 1.499961866.
        SELECT ANTILOG(:ALOG)
          FROM SYSIBM.SYSDUMMY1
    Returns the approximate value 31.62.
1 If *YES is specified for the SQL_DECFLOAT_WARNINGS query option, NaN and -NaN are returned respectively with a warning.