summaryrefslogtreecommitdiff
path: root/tests/log.dat
diff options
context:
space:
mode:
authorzimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2008-10-03 13:39:32 +0000
committerzimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2008-10-03 13:39:32 +0000
commit0d42ae7bc6ea575ff0f16222992d7842eaa9f17a (patch)
tree3eebfc88e966704d7002983c59c12cd25e213e17 /tests/log.dat
parent9513284ca7aeb6a09701c7ff024410d56ce6e163 (diff)
downloadmpc-0d42ae7bc6ea575ff0f16222992d7842eaa9f17a.tar.gz
[log.dat] new test file for mpc_log
[tlog.c] added test with log.dat git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@232 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tests/log.dat')
-rw-r--r--tests/log.dat88
1 files changed, 88 insertions, 0 deletions
diff --git a/tests/log.dat b/tests/log.dat
new file mode 100644
index 0000000..4f4e0dc
--- /dev/null
+++ b/tests/log.dat
@@ -0,0 +1,88 @@
+# Data test file for mpc_log.
+
+# 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.
+# more precisely Section G.6.3.2 "The clog functions"
+
+# Rule [conj]: log(conj(z)) = conj(log(z))
+
+# Special values (following ISO C99 standard, Annex G)
+# log(-0 + i*0) = -inf + i*pi
+2 -inf 53 0x3243F6A8885A3p-48 2 -0 2 +0 N N
+
+# log(+0 + i*0) = -inf + i*0
+2 -inf 2 +0 2 +0 2 +0 N N
+
+# log(x + i*inf) = +inf + i*pi/2 for finite x
+2 +inf 53 0x3243F6A8885A3p-49 2 1 2 +inf N N
+2 +inf 53 0x3243F6A8885A3p-49 2 +0 2 +inf N N
+2 +inf 53 0x3243F6A8885A3p-49 2 -0 2 +inf N N
+2 +inf 53 0x3243F6A8885A3p-49 2 -1 2 +inf N N
+# by [conj]: log(x - i*inf) = +inf - i*pi/2 for finite x
+2 +inf 53 -0x3243F6A8885A3p-49 2 1 2 -inf N N
+2 +inf 53 -0x3243F6A8885A3p-49 2 +0 2 -inf N N
+2 +inf 53 -0x3243F6A8885A3p-49 2 -0 2 -inf N N
+2 +inf 53 -0x3243F6A8885A3p-49 2 -1 2 -inf N N
+
+# log(x + i*nan) = nan+i*nan for finite x
+2 nan 2 nan 2 1 2 nan N N
+2 nan 2 nan 2 +0 2 nan N N
+2 nan 2 nan 2 -0 2 nan N N
+2 nan 2 nan 2 -1 2 nan N N
+
+# log(-inf + i*y) = +inf + i*pi for finite positive-signed y
+2 +inf 53 0x3243F6A8885A3p-48 2 -inf 2 1 N N
+2 +inf 53 0x3243F6A8885A3p-48 2 -inf 2 +0 N N
+# by [conj]: log(-inf + i*y) = +inf - i*pi for finite negative-signed y
+2 +inf 53 -0x3243F6A8885A3p-48 2 -inf 2 -1 N N
+2 +inf 53 -0x3243F6A8885A3p-48 2 -inf 2 -0 N N
+
+# log(+inf + i*y) = +inf + i*0 for finite positive-signed y
+2 +inf 2 +0 2 +inf 2 1 N N
+2 +inf 2 +0 2 +inf 2 +0 N N
+# by [conj]: log(+inf + i*y) = +inf - i*0 for finite negative-signed y
+2 +inf 2 -0 2 +inf 2 -1 N N
+2 +inf 2 -0 2 +inf 2 -0 N N
+
+# log(-inf + i*inf) = +inf + i*(3*pi/4)
+2 +inf 53 0x96CBE3F9990E9p-50 2 -inf 2 +inf N N
+# by [conj]: log(-inf - i*inf) = +inf - i*(3*pi/4)
+2 +inf 53 -0x96CBE3F9990E9p-50 2 -inf 2 -inf N N
+
+# log(+inf + i*inf) = +inf + i*(pi/4)
+2 +inf 53 0x3243F6A8885A3p-50 2 +inf 2 +inf N N
+# by [conj]: log(+inf - i*inf) = +inf - i*(pi/4)
+2 +inf 53 -0x3243F6A8885A3p-50 2 +inf 2 -inf N N
+
+# log(+/-inf + i*nan) = +inf + i*nan
+2 +inf 2 nan 2 +inf 2 nan N N
+2 +inf 2 nan 2 -inf 2 nan N N
+
+# log(nan + i*y) = nan + i*nan for finite y
+2 nan 2 nan 2 nan 2 1 N N
+2 nan 2 nan 2 nan 2 +0 N N
+2 nan 2 nan 2 nan 2 -0 N N
+2 nan 2 nan 2 nan 2 -1 N N
+
+# log(nan + i*inf) = +inf + i*nan
+2 +inf 2 nan 2 nan 2 +inf N N
+
+# log(nan + i*nan) = nan + i*nan
+2 nan 2 nan 2 nan 2 nan N N