Mercurial > hg > octave-terminal
changeset 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 | 2b03258c240b |
children | 456752abad08 |
files | liboctave/ChangeLog liboctave/lo-mappers.h |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,9 @@ +2010-12-14 John W. Eaton <jwe@octave.org> + + * lo-mappers.h (xcopysign (double)): Call copysign, not copysignf. + (xmod): Call X_NINT, not D_NINT. Call xfloor, not floor. + Bug #31872. + 2010-12-13 John W. Eaton <jwe@octave.org> * CMatrix.cc (operator * (const Matrix& m, const ComplexMatrix& a)):
--- 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); } } }