ILE COBOL Language Reference

Exponential Expressions

If an exponential expression is evaluated as both a positive and a negative number, the result will always be the positive number. The square root of 4, for example, always results in +2.

If the value of an expression to be raised to a power is zero, the exponent must have a value greater than zero. Otherwise, the size error condition exists. In any case where no real number exists as the result of the evaluation, the size error condition exists.

Unless the exponent is a literal integer with a value of 2, the results of exponentiation are truncated after the thirteenth fractional digit. The results of exponentiation when the exponent is noninteger are accurate to seven digits.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]