[ODE] float/double error in common.h
Matthew D. Hancher
mdh at email.arc.nasa.gov
Thu May 6 13:48:32 MST 2004
Heyo,
In common.h, the results of the new dFMod() and dCopySign()
macros are getting cast to float even in the dDOUBLE case.
This makes my double-precision test suite very angry. :)
A cdiff follows.
- mdh
Matt Hancher
NASA Ames Research Center
Official: mdh at email.arc.nasa.gov
Personal: mdh at media.mit.edu
Index: common.h
===================================================================
RCS file: /cvsroot/opende/ode/include/ode/common.h,v
retrieving revision 1.34
diff -c -r1.34 common.h
*** common.h 22 Apr 2004 17:33:09 -0000 1.34
--- common.h 6 May 2004 19:52:09 -0000
***************
*** 142,149 ****
#define dCos(x) cos(x)
#define dFabs(x) fabs(x)
#define dAtan2(y,x) atan2((y),(x))
! #define dFMod(a,b) ((float)fmod((a),(b)))
! #define dCopySign(a,b) ((float)copysign((a),(b)))
#else
#error You must #define dSINGLE or dDOUBLE
--- 142,149 ----
#define dCos(x) cos(x)
#define dFabs(x) fabs(x)
#define dAtan2(y,x) atan2((y),(x))
! #define dFMod(a,b) (fmod((a),(b)))
! #define dCopySign(a,b) (copysign((a),(b)))
#else
#error You must #define dSINGLE or dDOUBLE
More information about the ODE
mailing list