- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there an error in Operation pseudo-code for FSIN instruction? Please take a look:
Intel Instruction Set Reference, A-M, volume 2-A, page 3-412
...
FSIN - Sine
...
The source operand must be given in radians and must be within the range -2^63 to +2^63.
...
If the source operand is outside the acceptable range, the C2 flag in the FPU status
word is set, and the value in register ST(0) remains unchanged. The instruction does
not raise an exception when the source operand is out of range.
...
Operation
IF ST(0) < 2^63 <- Instead of: IF ST(0) IN RANGE ( -2^63, +2^63 )
THEN
C2 <- 0;
ST(0) <- sin(ST(0));
ELSE (* Source operand out of range *)
C2 <- 1;
Fl;
...
and it means that a value -2^65 also could be accepted according to thepseudo-code. It looks like the same
error in the documentation applies to all the rest trigonometric instructions.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page