Mercurial > hg > octave-nkf
changeset 12050:3df527f71cee release-3-2-x
use complex function for acos mapper if arg is out of range [-1, 1]
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 04 Aug 2009 09:55:38 +0200 |
parents | bf90777b58c9 |
children | f3bf489b7322 |
files | src/ChangeLog src/ov-float.cc src/ov-flt-re-mat.cc src/ov-re-mat.cc src/ov-re-sparse.cc src/ov-scalar.cc |
diffstat | 6 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2009-07-29 John W. Eaton <jwe@octave.org> + + * ov-float.cc, ov-flt-re-mat.cc, ov-re-mat.cc, ov-re-sparse.cc, + ov-scalar.cc: Use complex function for acos mapper if arg is out + of range [-1, 1]. + 2009-07-29 John W. Eaton <jwe@octave.org> * parse.y (param_list_end): Also set
--- a/src/ov-float.cc +++ b/src/ov-float.cc @@ -279,7 +279,7 @@ SCALAR_MAPPER (gamma, xgamma) CD_SCALAR_MAPPER (lgamma, xlgamma, xlgamma, 0.0, octave_Float_Inf) SCALAR_MAPPER (abs, ::fabsf) -SCALAR_MAPPER (acos, ::acosf) +CD_SCALAR_MAPPER (acos, ::acosf, ::acos, -1.0, 1.0) CD_SCALAR_MAPPER (acosh, ::acoshf, ::acosh, 1.0, octave_Float_Inf) SCALAR_MAPPER (angle, ::arg) SCALAR_MAPPER (arg, ::arg)
--- a/src/ov-flt-re-mat.cc +++ b/src/ov-flt-re-mat.cc @@ -783,7 +783,7 @@ ARRAY_MAPPER (erfc, FloatNDArray::dmapper, ::erfcf) ARRAY_MAPPER (gamma, FloatNDArray::dmapper, xgamma) CD_ARRAY_MAPPER (lgamma, xlgamma, xlgamma, 0.0, octave_Float_Inf) -ARRAY_MAPPER (acos, FloatNDArray::dmapper, ::acosf) +CD_ARRAY_MAPPER (acos, ::acosf, ::acos, -1.0, 1.0) CD_ARRAY_MAPPER (acosh, ::acoshf, ::acosh, 1.0, octave_Float_Inf) ARRAY_MAPPER (angle, FloatNDArray::dmapper, ::arg) ARRAY_MAPPER (arg, FloatNDArray::dmapper, ::arg)
--- a/src/ov-re-mat.cc +++ b/src/ov-re-mat.cc @@ -811,7 +811,7 @@ ARRAY_MAPPER (erfc, NDArray::dmapper, ::erfc) ARRAY_MAPPER (gamma, NDArray::dmapper, xgamma) CD_ARRAY_MAPPER (lgamma, xlgamma, xlgamma, 0.0, octave_Inf) -ARRAY_MAPPER (acos, NDArray::dmapper, ::acos) +CD_ARRAY_MAPPER (acos, ::acos, ::acos, -1.0, 1.0) CD_ARRAY_MAPPER (acosh, ::acosh, ::acosh, 1.0, octave_Inf) ARRAY_MAPPER (angle, NDArray::dmapper, ::arg) ARRAY_MAPPER (arg, NDArray::dmapper, ::arg)
--- a/src/ov-re-sparse.cc +++ b/src/ov-re-sparse.cc @@ -876,7 +876,7 @@ SPARSE_MAPPER (gamma, SparseMatrix::dmapper, xgamma) CD_SPARSE_MAPPER (lgamma, xlgamma, xlgamma, 0.0, octave_Inf) SPARSE_MAPPER (abs, SparseMatrix::dmapper, ::fabs) -SPARSE_MAPPER (acos, SparseMatrix::dmapper, ::acos) +CD_SPARSE_MAPPER (acos, ::acos, ::acos, -1.0, 1.0) CD_SPARSE_MAPPER (acosh, ::acosh, ::acosh, 1.0, octave_Inf) SPARSE_MAPPER (angle, SparseMatrix::dmapper, ::arg) SPARSE_MAPPER (arg, SparseMatrix::dmapper, ::arg)
--- a/src/ov-scalar.cc +++ b/src/ov-scalar.cc @@ -294,7 +294,7 @@ SCALAR_MAPPER (gamma, xgamma) CD_SCALAR_MAPPER (lgamma, xlgamma, xlgamma, 0.0, octave_Inf) SCALAR_MAPPER (abs, ::fabs) -SCALAR_MAPPER (acos, ::acos) +CD_SCALAR_MAPPER (acos, ::acos, ::acos, -1.0, 1.0) CD_SCALAR_MAPPER (acosh, ::acosh, ::acosh, 1.0, octave_Inf) SCALAR_MAPPER (angle, ::arg) SCALAR_MAPPER (arg, ::arg)