mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
parent
43b2475aaa
commit
b9f73e6a4d
2 changed files with 13 additions and 20 deletions
|
@ -26,24 +26,6 @@
|
|||
#define sin(x) sin(VEIL("x", (double)(x)))
|
||||
#define sinf(x) sinf(VEIL("x", (float)(x)))
|
||||
|
||||
void SetUp(void) {
|
||||
/* 8087 FPU Control Word
|
||||
IM: Invalid Operation ───────────────┐
|
||||
DM: Denormal Operand ───────────────┐│
|
||||
ZM: Zero Divide ───────────────────┐││
|
||||
OM: Overflow ─────────────────────┐│││
|
||||
UM: Underflow ───────────────────┐││││
|
||||
PM: Precision ──────────────────┐│││││
|
||||
PC: Precision Control ────────┐ ││││││
|
||||
{float,∅,double,long double} │ ││││││
|
||||
RC: Rounding Control ───────┐ │ ││││││
|
||||
{even, →-∞, →+∞, →0} │┌┤ ││││││
|
||||
┌┤││ ││││││
|
||||
d││││rr││││││*/
|
||||
int x87cw = 0b0000000000000000001101100001;
|
||||
asm volatile("fldcw\t%0" : /* no outputs */ : "m"(x87cw));
|
||||
}
|
||||
|
||||
TEST(sinl, test) {
|
||||
EXPECT_STREQ("NAN", gc(xdtoal(sinl(NAN))));
|
||||
EXPECT_STREQ("-NAN", gc(xdtoal(sinl(+INFINITY))));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue