Download Print this page

Atari 400 Technical Reference Manual page 111

Home computer system
Hide thumbs Also See for 400:

Advertisement

Floating Point Exponentiation (EXP and EXP10)
Function: This routine exponentiates.
Calling sequence:
or
FRO = floating point exponent (Z).
JSR
EXP [OOCO] for e ** Z
JSR
EXP10 [OOCC] for 10 ** Z
BCS
overf low.
FRO = floating point result.
FRl is altered.
Algorithm: Both exponentials
are
computed internally as base 10,
with the base e exponential using the identity:
e ** X = 10 ** ( X * LOG10{e) ).
The base 10 exponential is evaluated in two parts using the identity:
10 ** X = 10 ** (I + F) = (10 ** I) * (10 ** F) --
where
I is the
integer portion of X and F is the fraction.
The term 10 ** F is evaluated using a polynomial approximation,
and 10 **
I
is a straightforward modification to the floating
point exponent.
Floating Point Polynomial Evaluation (PLYEVL)
Function: This routine performs an n degree polynomial
evaluation.
Calling sequence:
X,Y = pointer (X = LSB) to list of FP coefficients (A(i»
ordered from high order to low order (six bytes per
coefficient),
A = number of coeTficients in list.
FRO = floating point independent variable (Z).
JSR
PLYEVL
[DD40]
BCS
overflow or other error.
FRO = result of A(n)*Z**n + A(n-1)*Z**n-1 ... + A(l)*Z +
A(O)'
FR 1
i
sal t ere d .
Algorithm:
The polynomial P(Z) = SUM(i=O to n) (A(i)*Z**i) is
computed using the standard method shown below:
P (
Z)
= ( ...
(A ( n ) *
Z +
A (n-1 ) ) * Z + ... + A ( 1 ) ) * Z + A
(0 )
OPERATING SYSTEM C016555 -- Section
S
126

Hide quick links:

Advertisement

loading

This manual is also suitable for:

800