-
Notifications
You must be signed in to change notification settings - Fork 1
/
constants.txt
151 lines (106 loc) · 6.23 KB
/
constants.txt
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[H[2J[3J
========================
fxp_tconst.c
========================
Operating System: Ubuntu 22.04.2 LTS
Architecture: x86-64
model name : Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
System details:
Num type sizes:
char has a size of 1 bytes.
int has a size of 4 bytes.
long has a size of 8 bytes.
long long has a size of 8 bytes.
float has a size of 4 bytes.
double has a size of 8 bytes.
long double has a size of 16 bytes.
Precisions of e on this system:
----*----1----*----2----*----3----*----4----*----5----*----6----*----7----*----8----*----9----*----0
e from M_E : 2.7182818284590450907955982984276488423347473144531250000000000000E+00 (- expl(): -1.4463E-16)
e from exp() : 2.7182818284590450907955982984276488423347473144531250000000000000E+00 (- expl(): -1.4463E-16)
My e from dec str: 2.7182818284590452759773293589518061708076857030391693115234375000E+00 (- expl(): 4.0549E-17)
My e from bin str: 2.7182818284590452352113276734968394521274603903293609619140625000E+00 (- expl(): -2.1684E-19)
e from expl() : 2.7182818284590452354281681079939403389289509505033493041992187500E+00 (- expl(): 0.0000E+00)
'True' e : 2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274
e as binary: 10.1011011111100001010100010110001010001010111011010010101001101010101111110111000101011000100000001001
e as fxp (31 bits) 56fc2a2c
e as fxp (63 bits) 56fc2a2c515da54d
pi as binary: 11.0010010000111111011010101000100010000101101000110000100011010011000100110001100110001010001011100000
pi as fxp (31 bits) 6487ed51
pi as fxp (63 bits) 6487ed5110b4611a
ln(2) as decimal: .693147180559945309417232121458176568075500134360255254120680009493393621969694715605863326996418687
ln(2) as fxp (31 bits) 58b90bfc
ln(2) as fxp (63 bits) 58b90bfbe8e7be3a
lg10(2) as decimal: .301029995663981195213738894724493026768189881462108541310427461127108189274424509486927252118186172040684
lg10(2) as fxp (31 bits) 268826a1
lg10(2) as fxp (63 bits) 268826a13ef3fe7f
Precision of long double pow2 calculations using BKM:
Checking BKM depth 29
ref: pow(2, 0.000E+00) = 1.00000000000000000000E+00
my_pow2(0.000E+00) = 1.00000000000000000000E+00 (- ref: 0.00E+00)
ref: pow(2, 1.000E+00) = 2.00000000000000000000E+00
my_pow2(1.000E+00) = 2.00000000000000000000E+00 (- ref: 0.00E+00)
ref: pow(2, 2.000E+00) = 4.00000000000000000000E+00
my_pow2(2.000E+00) = 4.00000000000000000000E+00 (- ref: 0.00E+00)
ref: pow(2, 3.100E+00) = 8.57418770029034584164E+00
my_pow2(3.100E+00) = 8.57418767854737526226E+00 (- ref: -2.17E-08)
ref: pow(2, 3.110E+01) = 2.30161598515703244391E+09
my_pow2(3.110E+01) = 2.30161597932044609613E+09 (- ref: -5.84E+00)
ref: pow(2, 4.010E+01) = 1.17842738440040061128E+12
my_pow2(4.010E+01) = 1.17842738141206840122E+12 (- ref: -2.99E+03)
ref: pow(2, -1.000E+00) = 5.00000000000000000000E-01
my_pow2(-1.000E+00) = 5.00000000000000000000E-01 (- ref: 0.00E+00)
ref: pow(2, -2.000E+00) = 2.50000000000000000000E-01
my_pow2(-2.000E+00) = 2.50000000000000000000E-01 (- ref: 0.00E+00)
ref: pow(2, -3.100E+00) = 1.16629123942100919815E-01
my_pow2(-3.100E+00) = 1.16629123839304747978E-01 (- ref: -1.03E-10)
ref: pow(2, -3.110E+01) = 4.34477343939620301547E-10
my_pow2(-3.110E+01) = 4.34477343556675121107E-10 (- ref: -3.83E-19)
ref: pow(2, -4.010E+01) = 8.48588562382070901460E-13
my_pow2(-4.010E+01) = 8.48588561634131095912E-13 (- ref: -7.48E-22)
Checking BKM depth 30
ref: pow(2, 0.000E+00) = 1.00000000000000000000E+00
my_pow2(0.000E+00) = 1.00000000000000000000E+00 (- ref: 0.00E+00)
ref: pow(2, 1.000E+00) = 2.00000000000000000000E+00
my_pow2(1.000E+00) = 2.00000000000000000000E+00 (- ref: 0.00E+00)
ref: pow(2, 2.000E+00) = 4.00000000000000000000E+00
my_pow2(2.000E+00) = 4.00000000000000000000E+00 (- ref: 0.00E+00)
ref: pow(2, 3.100E+00) = 8.57418770029034584164E+00
my_pow2(3.100E+00) = 8.57418769451804435068E+00 (- ref: -5.77E-09)
ref: pow(2, 3.110E+01) = 2.30161598515703244391E+09
my_pow2(3.110E+01) = 2.30161598360753993550E+09 (- ref: -1.55E+00)
ref: pow(2, 4.010E+01) = 1.17842738440040061128E+12
my_pow2(4.010E+01) = 1.17842738360706044698E+12 (- ref: -7.93E+02)
ref: pow(2, -1.000E+00) = 5.00000000000000000000E-01
my_pow2(-1.000E+00) = 5.00000000000000000000E-01 (- ref: 0.00E+00)
ref: pow(2, -2.000E+00) = 2.50000000000000000000E-01
my_pow2(-2.000E+00) = 2.50000000000000000000E-01 (- ref: 0.00E+00)
ref: pow(2, -3.100E+00) = 1.16629123942100919815E-01
my_pow2(-3.100E+00) = 1.16629123839304747978E-01 (- ref: -1.03E-10)
ref: pow(2, -3.110E+01) = 4.34477343939620301547E-10
my_pow2(-3.110E+01) = 4.34477343556675121107E-10 (- ref: -3.83E-19)
ref: pow(2, -4.010E+01) = 8.48588562382070901460E-13
my_pow2(-4.010E+01) = 8.48588561634131095912E-13 (- ref: -7.48E-22)
Checking BKM depth 31
ref: pow(2, 0.000E+00) = 1.00000000000000000000E+00
my_pow2(0.000E+00) = 1.00000000000000000000E+00 (- ref: 0.00E+00)
ref: pow(2, 1.000E+00) = 2.00000000000000000000E+00
my_pow2(1.000E+00) = 2.00000000000000000000E+00 (- ref: 0.00E+00)
ref: pow(2, 2.000E+00) = 4.00000000000000000000E+00
my_pow2(2.000E+00) = 4.00000000000000000000E+00 (- ref: 0.00E+00)
ref: pow(2, 3.100E+00) = 8.57418770029034584164E+00
my_pow2(3.100E+00) = 8.57418769451804435068E+00 (- ref: -5.77E-09)
ref: pow(2, 3.110E+01) = 2.30161598515703244391E+09
my_pow2(3.110E+01) = 2.30161598360753993550E+09 (- ref: -1.55E+00)
ref: pow(2, 4.010E+01) = 1.17842738440040061128E+12
my_pow2(4.010E+01) = 1.17842738360706044698E+12 (- ref: -7.93E+02)
ref: pow(2, -1.000E+00) = 5.00000000000000000000E-01
my_pow2(-1.000E+00) = 5.00000000000000000000E-01 (- ref: 0.00E+00)
ref: pow(2, -2.000E+00) = 2.50000000000000000000E-01
my_pow2(-2.000E+00) = 2.50000000000000000000E-01 (- ref: 0.00E+00)
ref: pow(2, -3.100E+00) = 1.16629123942100919815E-01
my_pow2(-3.100E+00) = 1.16629123839304747978E-01 (- ref: -1.03E-10)
ref: pow(2, -3.110E+01) = 4.34477343939620301547E-10
my_pow2(-3.110E+01) = 4.34477343556675121107E-10 (- ref: -3.83E-19)
ref: pow(2, -4.010E+01) = 8.48588562382070901460E-13
my_pow2(-4.010E+01) = 8.48588561634131095912E-13 (- ref: -7.48E-22)