|
fmod with negative decimal numbers error?Next Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Jesper Madsen Posted 16-May-2008 01:12 Toolset ARM |  fmod with negative decimal numbers error? Jesper Madsen the result of fmod(-0.6, 0.01) is -0.01 is this an error? | | Read-Only Author Tamir Michael Posted 16-May-2008 02:23 Toolset ARM |  RE: fmod with negative decimal numbers error? Tamir Michael no it is not. check out this statement (see your math.h, assuming you are using the RealView compiler): "fmod returns the value x - i * y, for some integer i such that, if y is nonzero, the result has the same sign as x and magnitude less than the magnitude of y. If y is zero, a domain error occurs and -HUGE_VAL is returned." | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|