fesetenv() does not set the control word
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glibc (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Environment:
Ubuntu 8.04.4 LTS
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
libc6 2.7-10ubuntu5
The following program should modify the FPU control word:
=======
#include <stdio.h>
#include <fenv.h>
#include <math.h>
int main(int argc, char *argv[])
{
fenv_t fpuenv;
fegetenv(
printf("Initial CW: %hx\n",
fpuenv.
printf("Modified CW: %hx\n",
fesetenv(
fegetenv(
printf("Stored CW: %hx\n",
return 0;
}
=======
The output should be:
Initial CW: 37f
Modified CW: 27f
Stored CW: 27f
The output is:
Initial CW: 37f
Modified CW: 27f
Stored CW: 37f
which means that the FPU control word is not set by fesetenv().