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?

Réponses (0)

Catégories

En savoir plus sur Write C Functions Callable from MATLAB (MEX Files) dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by