diff options
author | zimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2008-10-03 16:38:17 +0000 |
---|---|---|
committer | zimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2008-10-03 16:38:17 +0000 |
commit | b316ea5294fe7109ab31d2a6b6101556a9d63c0c (patch) | |
tree | c5d93e5ea35366a8246d7dbf630917c4074394b7 /tests/cosh.dat | |
parent | 8821568241370f3eb6672702772a67ed22b20872 (diff) | |
download | mpc-b316ea5294fe7109ab31d2a6b6101556a9d63c0c.tar.gz |
[log.dat] small editorial changes
[tcosh.c] added data_test with cosh.dat
[cosh.dat] special values from C99
[tests/Makefile.am] added cosh.dat
Note: some tests from cosh.dat currently fail due to some inconsistency
between the rules for conjugacy and parity and the default signs chosen
by mpc in cases where C99 leaves the signs unspecified.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@236 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tests/cosh.dat')
-rw-r--r-- | tests/cosh.dat | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/tests/cosh.dat b/tests/cosh.dat new file mode 100644 index 0000000..f047692 --- /dev/null +++ b/tests/cosh.dat @@ -0,0 +1,133 @@ +# Data test file for mpc_cosh. + +# Copyright (C) 2008 Paul Zimmermann + +# This file is part of the MPC Library. +# +# The MPC Library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or (at your +# option) any later version. +# +# The MPC Library is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with the MPC Library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +# MA 02111-1307, USA. + +# See file sin.dat for the format description. + +# Special values, following ISO C99 standard, Annex G, +# more precisely Section G.6.2.4 "The ccosh functions". + +# Rule [conj]: cosh(conj(z)) = conj(cosh(z)) +# Rule [even]: cosh(-z) = cosh(z) + +# cosh(+0 + i*0) = 1 + i*0 +2 1 2 +0 2 +0 2 +0 N N +# [conj]: cosh(+0 - i*0) = 1 - i*0 +2 1 2 -0 2 +0 2 -0 N N +# [even]: cosh(-0 - i*0) = 1 + i*0 +2 1 2 +0 2 -0 2 -0 N N +# [even+conj]: cosh(-0 + i*0) = 1 - i*0 +2 1 2 -0 2 -0 2 +0 N N + +# cosh(+0 + i*inf) = nan + i*0 (C99 says that the sign of the imaginary part +# is left unspecified, in mpc we fix it to be +0) +2 nan 2 +0 2 +0 2 inf N N +# [conj]: cosh(+0 - i*inf) = nan - i*0 +2 nan 2 -0 2 +0 2 -inf N N +# [even]: cosh(-0 - i*inf) = nan + i*0 +2 nan 2 +0 2 -0 2 -inf N N +# [even+conj]: cosh(-0 + i*inf) = nan - i*0 +2 nan 2 -0 2 -0 2 +inf N N + +# cosh(+0 +i*nan) = nan + i*0 (C99 says that the sign of the imaginary part +# is left unspecified, in mpc we fix it to be +0) +2 nan 2 +0 2 +0 2 nan N N +# [even]: cosh(-0 + i*nan) = nan + i*0 +2 nan 2 +0 2 -0 2 nan N N + +# cosh(x + i*inf) = nan + i*nan for finite nonzero x +2 nan 2 nan 2 1 2 inf N N +2 nan 2 nan 2 -1 2 inf N N +# [conj]: cosh(x - i*inf) = nan + i*nan +2 nan 2 nan 2 1 2 -inf N N +2 nan 2 nan 2 -1 2 -inf N N +# [even] and [even+conj] are already considered for x=-1 < 0 + +# cosh(x + i*nan) = nan + i*nan for finite nonzero x +2 nan 2 nan 2 1 2 nan N N +2 nan 2 nan 2 -1 2 nan N N +# [conj] makes no sense since nan has no sign +# [even] is already considered for x=-1 < 0 + +# cosh(+inf + i*0) = +inf + i*0 +2 +inf 2 +0 2 +inf 2 +0 N N +# [conj]: cosh(+inf - i*0) = +inf - i*0 +2 +inf 2 -0 2 +inf 2 -0 N N +# [even]: cosh(-inf - i*0) = +inf + i*0 +2 +inf 2 +0 2 -inf 2 -0 N N +# [even+conj]: cosh(-inf + i*0) = +inf - i*0 +2 +inf 2 -0 2 -inf 2 +0 N N + +# cosh(+inf + i*y) = +inf * (cos(y) + i*sin(y)) for finite non-zero y +2 +inf 2 +inf 2 +inf 2 1 N N +2 -inf 2 +inf 2 +inf 2 2 N N +2 -inf 2 -inf 2 +inf 2 4 N N +2 +inf 2 -inf 2 +inf 2 1024 N N +# [conj] +2 +inf 2 -inf 2 +inf 2 -1 N N +2 -inf 2 -inf 2 +inf 2 -2 N N +2 -inf 2 +inf 2 +inf 2 -4 N N +2 +inf 2 +inf 2 +inf 2 -1024 N N +# [even] +2 +inf 2 +inf 2 -inf 2 -1 N N +2 -inf 2 +inf 2 -inf 2 -2 N N +2 -inf 2 -inf 2 -inf 2 -4 N N +2 +inf 2 -inf 2 -inf 2 -1024 N N +# [even+conj] +2 +inf 2 -inf 2 -inf 2 1 N N +2 -inf 2 -inf 2 -inf 2 2 N N +2 -inf 2 +inf 2 -inf 2 4 N N +2 +inf 2 +inf 2 -inf 2 1024 N N + +# cosh(+inf + i*inf) = +inf + i*nan (C99 leaves unspecified the sign of the +# real part, in mpc we fix it to be +0) +2 +inf 2 nan 2 +inf 2 +inf N N +# [conj]: cosh(+inf - i*inf) = +inf + i*nan +2 +inf 2 nan 2 +inf 2 -inf N N +# [even]: cosh(-inf - i*inf) = +inf + i*nan +2 +inf 2 nan 2 -inf 2 -inf N N +# [even+conj]: cosh(-inf + i*inf) = +inf + i*nan +2 +inf 2 nan 2 -inf 2 +inf N N + +# cosh(+inf + i*nan) = +inf + i*nan +2 +inf 2 nan 2 +inf 2 nan N N +# [conj] makes no sense since NaN has no sign +# [even]: cosh(-inf + i*nan) = +inf + i*nan +2 +inf 2 nan 2 -inf 2 nan N N + +# cosh(nan + i*0) = nan - i*0 (C99 leaves unspecified the sign of the +# imaginary part, in mpc we fix it) +2 nan 2 -0 2 nan 2 +0 N N +# [conj]: cosh(nan - i*0) = nan + i*0 +2 nan 2 +0 2 nan 2 -0 N N +# Note: here [even] is incompatible with [conj] since it would give +# [even]: cosh(nan - i*0) = nan - i*0 + +# cosh(nan + i*y) = nan + i*nan for all nonzero y (including +/-inf) +2 nan 2 nan 2 nan 2 1 N N +2 nan 2 nan 2 nan 2 -1 N N +2 nan 2 nan 2 nan 2 +inf N N +2 nan 2 nan 2 nan 2 -inf N N + +# cosh(nan + i*nan) = nan + i*nan +2 nan 2 nan 2 nan 2 nan N N + + + |