Mercurial > hg > octave-nkf
diff liboctave/lo-mappers.h @ 11361:140c8fbe8b0b
use correct types in mod template function
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 14 Dec 2010 01:55:20 -0500 |
parents | 110e570e5f8d |
children | 57868a21170e |
line wrap: on
line diff
--- a/liboctave/lo-mappers.h +++ b/liboctave/lo-mappers.h @@ -32,7 +32,7 @@ // Double Precision extern OCTAVE_API double xtrunc (double x); -inline double xcopysign (double x, double y) { return copysignf (x, y); } +inline double xcopysign (double x, double y) { return copysign (x, y); } inline double xceil (double x) { return ceil (x); } inline double xfloor (double x) { return floor (x); } inline double arg (double x) { return atan2 (0.0, x); } @@ -318,7 +318,7 @@ { T q = x / y; - T n = floor (q); + T n = xfloor (q); if (X_NINT (y) != y) { @@ -336,7 +336,7 @@ { if (std::abs ((q - X_NINT (q))/ X_NINT (q)) < std::numeric_limits<T>::epsilon ()) - n = D_NINT (q); + n = X_NINT (q); } } }