Intel 80287, 80286 manual Constant Instructions

Models: 80287 80286

1 515
Download 515 pages 45.04 Kb
Page 406
Image 406

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·LOG2 (X + 1). X is taken from the stack top and must be in the range 0 ::::; IX 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 LOG2 10 onto the stack.

FLDL2E

FLDL2E (load log base 2 of e) loads (pushes) the value LOG2e onto the stack.

 

Table 2-10. Constant Instructions

FLDZ

Load + 0.0

FLD1

Load + 1.0

FLDPI

Load 71'

FLDL2T

Load 109210

FLDL2E

Load 1092e

FLDLG2

Load 109,02

FLDLN2

Load 109.2

 

2-14

Page 406
Image 406
Intel 80287, 80286 manual Constant Instructions