summaryrefslogtreecommitdiff
path: root/tests/log.dat
blob: be972957c203c92fe27f45eef5d5e6effb1b1901 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# 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.

# Special values, following ISO C99 standard, Annex G,
# more precisely Section G.6.3.2 "The clog functions".

# Rule [conj]: log(conj(z)) = conj(log(z))

# log(-0 + i*0) = -inf + i*pi
2 -inf 53  0x3243F6A8885A3p-48   2 -0 2 +0     N N
2 -inf 53 -0x3243F6A8885A3p-48   2 -0 2 -0     N N
2 -inf 53  0x3243F6A8885A3p-48   2 -0 2 +0     N D
2 -inf 53 -0x3243F6A8885A32p-52  2 -0 2 -0     N D

# log(+0 + i*0) = -inf + i*0
2 -inf 2 +0                     2 +0 2 +0    N N
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

# log(x + i*y) with either x or y zero and the other non-zero
53 0xB5535E0FD3FBDp-50 2 0     5 0x11 2 0    N N
53 0xB5535E0FD3FBDp-50 53 0x3243F6A8885A3p-49 2 0 5 0x11 N N
53 0x5E38D81812CCBp-49 53 0x3243F6A8885A3p-48 5 -0x13 2 0 N N
53 0x5E38D81812CCBp-49 53 -0x3243F6A8885A3p-49 2 0 5 -0x13 N N