SQRTF Function

Purpose

Identical to SQRT with the following exceptions:

  • If allowed by hardware architecture, SQRTF results are calculated inline.
  • An invalid argument can cause a hardware exception
  • Hardware dictates the accuracy of the result
Note: SQRTF does not support FLOAT DFP.

Syntax

SQRTF(x)

Parameters

x is a positive or zero floating-point value.

Description

The SQRTF function returns the positive square root of x. The result has the same data type as x.

Examples

SQRTF(4.0)    /* returns 2.0 */

Restrictions

An SQRTF operation on floating-point decimal data is actually performed using the floating-point binary operation. Thus, the range of the operands and the result of the operation are limited to the ranges for floating-point binary numbers.