Strange result while calling fegetround() in MEX file

I use MATLAB R2010b under Linux/64 bits. I have written a C MEX file in which I check the current FPU rounding direction using fegetround() (I have another routine that sets the rounding direction to either +Inf or -Inf). However, my MEX function always reports that the rounding is set to nearest-even even when it is not.
I know the fegetround() function is not faulty since I tested it in a standalone C program and everything works fine.
Any clue about what happens here?

Answers (0)

Categories

Asked:

on 23 Mar 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!