1 # Data test file for mpc_log10.
3 # Copyright (C) 2012 INRIA
5 # This file is part of GNU MPC.
7 # GNU MPC is free software; you can redistribute it and/or modify it under
8 # the terms of the GNU Lesser General Public License as published by the
9 # Free Software Foundation; either version 3 of the License, or (at your
10 #o ption) any later version.
12 # GNU MPC is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
17 # You should have received a copy of the GNU Lesser General Public License
18 # along with this program. If not, see http://www.gnu.org/licenses/ .
20 # See file sin.dat for the format description.
22 # Special values, following ISO C99 standard, Annex G,
23 # more precisely Section 7.26 "Future library directions"
25 # Rule [conj]: log10(conj(z)) = conj(log10(z))
27 # log10(nan + i*inf) = +inf + i*nan
28 0 0 2 +inf 2 nan 2 nan 2 +inf N N
29 0 0 2 +inf 2 nan 2 nan 2 -inf N N
31 # log10(nan + i*nan) = nan + i*nan
32 0 0 2 nan 2 nan 2 nan 2 nan N N
34 # log10(nan + i*y) = nan + i*nan for finite y
35 0 0 2 nan 2 nan 2 nan 2 1 N N
36 0 0 2 nan 2 nan 2 nan 2 +0 N N
37 0 0 2 nan 2 nan 2 nan 2 -0 N N
38 0 0 2 nan 2 nan 2 nan 2 -1 N N
40 # log10(+/-inf + i*nan) = +inf + i*nan
41 0 0 2 +inf 2 nan 2 +inf 2 nan N N
42 0 0 2 +inf 2 nan 2 -inf 2 nan N N
44 # log10(x + i*nan) = nan+i*nan for finite x
45 0 0 2 nan 2 nan 2 1 2 nan N N
46 0 0 2 nan 2 nan 2 +0 2 nan N N
47 0 0 2 nan 2 nan 2 -0 2 nan N N
48 0 0 2 nan 2 nan 2 -1 2 nan N N
50 # log10(x + i*inf) = +inf + i*pi/2/log(10) for finite x
51 0 + 2 +inf 53 +0x15d47c4cb2fba1p-53 2 1 2 +inf N N
52 0 + 2 +inf 53 +0x15d47c4cb2fba1p-53 2 +0 2 +inf N N
53 0 + 2 +inf 53 +0x15d47c4cb2fba1p-53 2 -0 2 +inf N N
54 0 + 2 +inf 53 +0x15d47c4cb2fba1p-53 2 -1 2 +inf N N
55 # by [conj]: log10(x - i*inf) = +inf - i*pi/2/log(10) for finite x
56 0 - 2 +inf 53 -0x15d47c4cb2fba1p-53 2 1 2 -inf N N
57 0 - 2 +inf 53 -0x15d47c4cb2fba1p-53 2 +0 2 -inf N N
58 0 - 2 +inf 53 -0x15d47c4cb2fba1p-53 2 -0 2 -inf N N
59 0 - 2 +inf 53 -0x15d47c4cb2fba1p-53 2 -1 2 -inf N N
61 # log10(-inf + i*y) = +inf + i*pi/log(10) for finite positive-signed y
62 0 + 2 +inf 53 0x15d47c4cb2fba1p-52 2 -inf 2 1 N N
63 0 + 2 +inf 53 0x15d47c4cb2fba1p-52 2 -inf 2 +0 N N
64 # by [conj]: log10(-inf+i*y) = +inf - i*pi/log(10) for finite negative-signed y
65 0 - 2 +inf 53 -0x15d47c4cb2fba1p-52 2 -inf 2 -1 N N
66 0 - 2 +inf 53 -0x15d47c4cb2fba1p-52 2 -inf 2 -0 N N
68 # log10(+inf + i*y) = +inf + i*0 for finite positive-signed y
69 0 0 2 +inf 2 +0 2 +inf 2 1 N N
70 0 0 2 +inf 2 +0 2 +inf 2 +0 N N
71 # by [conj]: log10(+inf + i*y) = +inf - i*0 for finite negative-signed y
72 0 0 2 +inf 2 -0 2 +inf 2 -1 N N
73 0 0 2 +inf 2 -0 2 +inf 2 -0 N N
75 # log10(-inf + i*inf) = +inf + i*(3*pi/4)/log(10)
76 0 + 2 +inf 53 0x105f5d39863cb9p-52 2 -inf 2 +inf N N
77 # by [conj]: log10(-inf - i*inf) = +inf - i*(3*pi/4)/log(10)
78 0 - 2 +inf 53 -0x105f5d39863cb9p-52 2 -inf 2 -inf N N
80 # log10(+inf + i*inf) = +inf + i*(pi/4)/log(10)
81 0 + 2 +inf 53 0x15d47c4cb2fba1p-54 2 +inf 2 +inf N N
82 # by [conj]: log10(+inf - i*inf) = +inf - i*(pi/4)/log(10)
83 0 - 2 +inf 53 -0x15d47c4cb2fba1p-54 2 +inf 2 -inf N N
85 # log10(-0 + i*0) = -inf + i*pi/log(10)
86 0 + 2 -inf 53 +0x15d47c4cb2fba1p-52 2 -0 2 +0 N N
87 0 - 2 -inf 53 -0x15d47c4cb2fba1p-52 2 -0 2 -0 N N
88 0 + 2 -inf 53 +0x15d47c4cb2fba1p-52 2 -0 2 +0 N U
89 0 + 2 -inf 53 -0xaea3e26597ddp-47 2 -0 2 -0 N U
90 0 - 2 -inf 53 +0xaea3e26597ddp-47 2 -0 2 +0 N D
91 0 - 2 -inf 53 -0x15d47c4cb2fba1p-52 2 -0 2 -0 N D
93 # log10(+0 + i*0) = -inf + i*0
94 0 0 2 -inf 2 +0 2 +0 2 +0 N N
95 0 0 2 -inf 2 -0 2 +0 2 -0 N N
97 # log10(+1 +- i*0) = +0 +- i*0
98 0 0 2 +0 2 +0 2 1 2 +0 N N
99 0 0 2 +0 2 -0 2 1 2 -0 N N
101 # log10(10 +- i*0) = 1 +- i*0
102 0 0 2 1 2 +0 4 10 2 +0 N N
103 0 0 2 1 2 -0 4 10 2 -0 N N
105 # log10(100 +- i*0) = 1 +- i*0
106 0 0 2 2 2 +0 5 100 2 +0 N N
107 0 0 2 2 2 -0 5 100 2 -0 N N
109 # log10(-1 +- i*0) = +0 +- i*pi/log(10)
110 0 + 2 +0 53 +0x15d47c4cb2fba1p-52 2 -1 2 +0 N N
111 0 - 2 +0 53 -0x15d47c4cb2fba1p-52 2 -1 2 -0 N N
113 # log10(x + i*y) with either x or y zero and the other non-zero
114 - 0 53 0x13afeb354b7d97p-52 2 0 5 0x11 2 0 N N
115 - + 53 0x13afeb354b7d97p-52 53 0x15d47c4cb2fba1p-53 2 0 5 0x11 N N
116 - + 53 0x1475c655fbc11p-48 53 0x15d47c4cb2fba1p-52 5 -0x13 2 +0 N N
117 - - 53 0x1475c655fbc11p-48 53 -0x15d47c4cb2fba1p-52 5 -0x13 2 -0 N N
118 - - 53 0x1475c655fbc11p-48 53 -0x15d47c4cb2fba1p-53 2 0 5 -0x13 N N
120 - + 53 0x15c9a3209bf97fp-52 53 0x15d47c4cb2fba1p-52 5 -0x17 2 +0 Z U
121 - - 53 0x15c9a3209bf97fp-52 53 -0x15d47c4cb2fba1p-52 5 -0x17 2 -0 N D
122 + - 53 0x2b93464137f3p-45 53 0xaea3e26597ddp-47 5 -0x17 2 +0 U Z
123 - - 53 0x15c9a3209bf97fp-52 53 -0x15d47c4cb2fba1p-52 5 -0x17 2 -0 D N
124 - - 53 0x1d1cda1a0c996dp-52 53 0xaea3e26597ddp-47 7 -0x42 2 +0 Z D
125 + + 53 0xe8e6d0d064cb7p-51 53 -0xaea3e26597ddp-47 7 -0x42 2 -0 N Z
126 + + 53 0xe8e6d0d064cb7p-51 53 0x15d47c4cb2fba1p-52 7 -0x42 2 +0 U N
127 - + 53 0x1d1cda1a0c996dp-52 53 -0xaea3e26597ddp-47 7 -0x42 2 -0 D U
130 + 0 53 0x134413509f79ffp-44 2 0 2 0x1p1024 2 +0 U U
131 + 0 53 0x134413509f79ffp-43 2 0 2 0x1p2048 2 +0 U U
132 + 0 53 0x134413509f79ffp-42 2 0 2 0x1p4096 2 +0 U U
133 + 0 53 0x134413509f79ffp-41 2 0 2 0x1p8192 2 +0 U U
134 + 0 53 0x134413509f79ffp-40 2 0 2 0x1p16384 2 +0 U U
135 + 0 53 0x134413509f79ffp-39 2 0 2 0x1p32768 2 +0 U U
136 + 0 53 0x134413509f79ffp-38 2 0 2 0x1p65536 2 +0 U U
137 + 0 53 0x134413509f79ffp-37 2 0 2 0x1p131072 2 +0 U U
138 + 0 53 0x134413509f79ffp-36 2 0 2 0x1p262144 2 +0 U U
139 + 0 53 0x134413509f79ffp-35 2 0 2 0x1p524288 2 +0 U U
140 + 0 53 0x134413509f79ffp-34 2 0 2 0x1p1048576 2 +0 U U
141 + 0 53 0x134413509f79ffp-33 2 0 2 0x1p2097152 2 +0 U U
142 + 0 53 0x134413509f79ffp-32 2 0 2 0x1p4194304 2 +0 U U
143 + 0 53 0x134413509f79ffp-31 2 0 2 0x1p8388608 2 +0 U U
144 + 0 53 0x134413509f79ffp-30 2 0 2 0x1p16777216 2 +0 U U
145 + 0 53 0x134413509f79ffp-29 2 0 2 0x1p33554432 2 +0 U U
146 + 0 53 0x134413509f79ffp-28 2 0 2 0x1p67108864 2 +0 U U
147 + 0 53 0x134413509f79ffp-27 2 0 2 0x1p134217728 2 +0 U U
148 + 0 53 0x134413509f79ffp-26 2 0 2 0x1p268435456 2 +0 U U
149 + 0 53 0x134413509f79ffp-25 2 0 2 0x1p536870912 2 +0 U U
150 + + 53 0x13467bd3098defp-44 53 0x15d47c4cb2fba1p-54 2 0x1p1024 2 0x1p1024 U U
151 + + 53 0x13454791d483f7p-43 53 0x15d47c4cb2fba1p-54 2 0x1p2048 2 0x1p2048 U U
152 + + 53 0x1344ad7139fefbp-42 53 0x15d47c4cb2fba1p-54 2 0x1p4096 2 0x1p4096 U U
153 + + 53 0x13446060ecbc7dp-41 53 0x15d47c4cb2fba1p-54 2 0x1p8192 2 0x1p8192 U U
154 + + 53 0x9a21cec630d9fp-39 53 0x15d47c4cb2fba1p-54 2 0x1p16384 2 0x1p16384 U U
155 + + 53 0x13442694b2ca9fp-39 53 0x15d47c4cb2fba1p-54 2 0x1p32768 2 0x1p32768 U U
156 + + 53 0x13441cf2a9224fp-38 53 0x15d47c4cb2fba1p-54 2 0x1p65536 2 0x1p65536 U U
157 + + 53 0x13441821a44e27p-37 2 0x3p-3 2 0x1p131072 2 0x1p131072 U U
158 + + 53 0x134415b921e413p-36 2 0x3p-3 2 0x1p262144 2 0x1p262144 U U
159 + + 53 0x13441484e0af09p-35 2 0x3p-3 2 0x1p524288 2 0x1p524288 U U
160 + + 53 0x4d104fab00521p-32 2 0x3p-3 2 0x1p1048576 2 0x1p1048576 U U
161 + + 53 0x9a209ced7e3a1p-32 2 0x3p-3 2 0x1p2097152 2 0x1p2097152 U U
162 + + 53 0x1344137727a0a1p-32 2 0x3p-3 2 0x1p4194304 2 0x1p4194304 U U
163 + + 53 0x13441363e38d5p-27 2 0x3p-3 2 0x1p8388608 2 0x1p8388608 U U
164 + + 53 0x268826b483075p-27 2 0x3p-3 2 0x1p16777216 2 0x1p16777216 U U
165 + + 53 0x4d104d55c1fb5p-27 2 0x3p-3 2 0x1p33554432 2 0x1p33554432 U U
166 + + 53 0x9a209a983fe35p-27 2 0x3p-3 2 0x1p67108864 2 0x1p67108864 U U
167 + + 53 0x4d104d474eecdp-25 2 0x3p-3 2 0x1p134217728 2 0x1p134217728 U U
168 + + 53 0x9a209a89ccd4dp-25 2 0x3p-3 2 0x1p268435456 2 0x1p268435456 U U
169 # Due to intermediate overflow, the following result has wrong real part
170 # instead of the correct result. Since this may happen in other parts of the
171 # library as well, we do not consider it a bug for the moment.
172 # + + 53 0x13441350ec8a4dp-25 2 0x3p-3 2 0x1p536870912 2 0x1p536870912 U U
174 # log10(3+I) has an exact real part (from Joseph S. Myers)
175 0 + 53 0.5 53 0x8f168ee8415e7p-54 2 3 2 1 N N