User's Manual

PROGRAMMING NUMERIC APPLICATIONS
FYL2XP1
0::::; I ST(O) 1<
(1-(y2l2»
- co < ST(1) <
co
FYL2XPI (Y
log
base 2 of (X + 1)) calculates the function Z = Y·LOG
2
(X + 1). X
is
taken from
the stack top and must
be
in
the range 0
::::;
I X I <
(1-(
Y2/2)). Y
is
taken from ST(1) and must
be
in
the range -
co
< Y < co. FYL2XPI pops the stack and returns Z at the (new) stack top,
replacing
Y.
The instruction provides improved accuracy over FYL2X when computing the
log
of a number very
close
to
1,
for example 1 + E where E < <
1.
Providing E rather than 1 + E
as
the input
to
the function
allows more significant digits
to
be
retained.
Constant Instructions
Each of these instructions (table
2-10)
loads (pushes) a commonly-used constant onto the stack. The
values have full temporary real precision (64 bits) and are accurate
to
approximately
19
decimal digits.
Because a temporary real constant occupies
10
memory bytes, the constant instructions, which are only
two
bytes long, save storage and improve execution speed,
in
addition
to
simplifying programming.
FLDZ
FLDZ (load zero) loads (pushes)
+0.0
onto the stack.
FLD1
FLDI (load one) loads (pushes) +
1.0
onto the stack.
FLDPI
FLDPI (load
71')
loads (pushes)
71'
onto the stack.
FLDL2T
FLDL2T (load
log
base 2 of
10)
loads (pushes) the value LOG
2
10
onto the stack.
FLDL2E
FLDL2E (load
log
base 2 of
e)
loads (pushes) the value LOG
2
e onto the stack.
FLDZ
FLD1
FLDPI
FLDL2T
FLDL2E
FLDLG2
FLDLN2
Table
2-10.
Constant
Instructions
2-14
Load + 0.0
Load + 1.0
Load
71'
Load
109210
Load
1092e
Load
109,02
Load
109.2