Skip to content

EPT

Base 10 Exponent

This numeric function returns the exponent value of any number’s floating-point representation.

EPT (numeric-value [,ERR=line-ref|,ERC=error-code])
numeric-value
is a number.
line-ref
is the program line number or label to branch to if an error is produced by this function.
error-code
is a programmer-defined error code. Valid values are positive or negative whole numbers.

The current PRECISION has no effect on this function.

EPT (1)

returns the value 1 (1 = .1E+1).

EPT (.0234)

returns the value -1 (.0234 = .234E-1).

EPT (X)

If X=.003024, returns the value -2 (.003024 = .3024E-2).

EPT (-231)

returns the value 3 (-231 = -.231E+3).

LET Z=EPT (Y/4)

If Y=100, returns the value 2 (100/4 = 25 = .25E+2) and assigns it to the variable Z.

FLOATING POINT directive

From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF