I'm attempting to write an interval arithmetic library in C# .NET, but in order to do this accurately I need to be able to control the rounding mode of floating point operations.
After a bit of research, it has become apparent that in order to do this I will need to call some unmanaged C/C++ code from C#, as per this forum. I know very little C++, so I'm not sure which function I actaully need to call: Change floating point rounding mode seems to suggest using fegetround. My question is, is this the right function to go about calling from C# (and if so how should I go about calling it - using DllImport as per this question?), and will this change the rounding mode for the managed C# code?