| View previous topic :: View next topic |
| Author |
Message |
jockyw2001
Joined: 29 Sep 2005 Posts: 339
|
Posted: Sun Sep 03, 2006 7:35 pm Post subject: problem with lrintf() |
|
|
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) |
|
| Back to top |
|
 |
dot_blank

Joined: 28 Sep 2005 Posts: 498 Location: Brasil
|
Posted: Fri Sep 08, 2006 6:34 pm Post subject: |
|
|
doubles on psp are a no no :P _________________ 10011011 00101010 11010111 10001001 10111010 |
|
| Back to top |
|
 |
jockyw2001
Joined: 29 Sep 2005 Posts: 339
|
Posted: Fri Sep 08, 2006 9:59 pm Post subject: |
|
|
| Hmm, then please explain me why lrintf raises an exception and lrint works just fine? |
|
| Back to top |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Fri Sep 08, 2006 10:11 pm Post subject: |
|
|
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. _________________ GE Dominator |
|
| Back to top |
|
 |
jockyw2001
Joined: 29 Sep 2005 Posts: 339
|
Posted: Fri Sep 08, 2006 10:20 pm Post subject: |
|
|
| Okay, thanks for the insights guys |
|
| Back to top |
|
 |
|