I get an exception with lrintf(float f) if for example f=2264386731.980626
I tried to use llintf(double d), but that functions isn't present.
Is there perhaps a bug in the lrintf implementation?
(I saw this: http://www.cygwin.com/ml/cygwin/2005-09/msg00252.html)
What are actually the limits for f?
Does anyone know what alternative rounding function I can use?
Thx!
UPDATE: pls ignore my questions found the solution already, I must use lrint(double d)
Probably because doubles are emulated by the compiler and won't trigger the same exception as the hardware float support does. Using software doubles cost a lot of performance however, so if this function is called often you will see performance degradation.