Mercurial > hg > octave-terminal
changeset 9470:bcdf878e2686
use complex function for acos mapper if arg is out of range [-1, 1]
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 29 Jul 2009 13:40:42 -0400 |
parents | c6edba80dfae |
children | 24df2e66abbe |
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, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +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]. + * ov-bool.cc (octave_bool::load_ascii): Call template function to read value. * ov-scalar.cc (octave_scalar::load_ascii): Likewise.
--- 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 @@ -878,7 +878,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)