Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A000329
using System;
using System.Collections.Generic;
using System.Numerics;
using System.Text;
namespace Sandbox
{
public class Rational
{
public Rational(BigInteger num, BigInteger denom)
{
if (denom.IsZero) throw new ArgumentOutOfRangeException("denom");
if (denom < 0) { num = -num; denom = -denom; }
var g = _Gcd(num, denom);
Num = num / g;
Denom = denom / g;
}
public BigInteger Num { get; private set; }
public BigInteger Denom { get; private set; }
public IEnumerable<Rational> Approximations
{
get
{
var continuedFrac = new List<BigInteger>();
var sgn = Num < 0 ? -1 : 1;
var n = sgn * Num;
var d = Denom;
while (d > 0)
{
continuedFrac.Add(n / d);
// n/d := 1 / (n/d % 1) = d / (n % d)
var tmp = d;
d = n % d;
n = tmp;
// TODO This can be improved
Rational approx = continuedFrac[continuedFrac.Count - 1];
for (int i = continuedFrac.Count - 2; i >= 0; i--) approx = continuedFrac[i] + 1 / approx;
yield return sgn * approx;
}
}
}
public Interval Bound(BigInteger targetDenominator)
{
var approximations = Approximations.GetEnumerator();
if (!approximations.MoveNext()) return this;
var a = approximations.Current;
Rational b = a;
while (approximations.MoveNext())
{
a = b;
b = approximations.Current;
if (b.Denom > targetDenominator)
{
break;
}
}
return a < b ? new Interval(a, b) : new Interval(b, a);
}
public override string ToString() { return string.Format(Denom == 1 ? "{0}" : "{0}/{1}", Num, Denom); }
public override int GetHashCode() { return Num.GetHashCode() * 37 + Denom.GetHashCode(); }
public override bool Equals(object obj) { return obj is Rational && (this == (Rational)obj); }
public static implicit operator Rational(int i) { return new Rational(i, 1); }
public static implicit operator Rational(long i) { return new Rational(i, 1); }
public static implicit operator Rational(BigInteger i) { return new Rational(i, 1); }
public static implicit operator double(Rational r) { return (double)r.Num / (double)r.Denom; }
public static Rational operator -(Rational a) { return new Rational(-a.Num, a.Denom); }
public static Rational operator +(Rational a, Rational b) { return new Rational(a.Num * b.Denom + a.Denom * b.Num, a.Denom * b.Denom)$
public static Rational operator -(Rational a, Rational b) { return new Rational(a.Num * b.Denom - a.Denom * b.Num, a.Denom * b.Denom)$
public static Rational operator *(Rational a, Rational b) { return new Rational(a.Num * b.Num, a.Denom * b.Denom); }
public static Rational operator /(Rational a, Rational b) { return new Rational(a.Num * b.Denom, a.Denom * b.Num); }
public static bool operator <(Rational a, Rational b) { return a.Num * b.Denom < a.Denom * b.Num; }
public static bool operator >(Rational a, Rational b) { return a.Num * b.Denom > a.Denom * b.Num; }
public static bool operator <=(Rational a, Rational b) { return a.Num * b.Denom <= a.Denom * b.Num; }
public static bool operator >=(Rational a, Rational b) { return a.Num * b.Denom >= a.Denom * b.Num; }
public static bool operator ==(Rational a, Rational b) { return a.Num == b.Num && a.Denom == b.Denom; }
public static bool operator !=(Rational a, Rational b) { return !(a == b); }
private static BigInteger _Gcd(BigInteger a, BigInteger b)
{
if (a < 0) a = -a;
if (b < 0) b = -b;
while (!a.IsZero)
{
var tmp = b % a;
b = a;
a = tmp;
}
return b;
}
}
// https://arxiv.org/pdf/0708.3721.pdf
class BigDecimalInterval
{
static readonly BigInteger Precision = BigInteger.Pow(2, 256);
static readonly Rational Epsilon = new Rational(1, Precision);
public BigDecimalInterval(Rational r) : this(r, Precision)
{
}
private BigDecimalInterval(Rational r, BigInteger precision)
{
_Precision = precision;
if (r.Denom <= precision)
{
Lower = Upper = r;
return;
}
// TODO Should probably prefer continuants over treating the precision as a desired denominator
r = r * precision;
if (r.Denom == 1)
{
Lower = Upper = r;
}
else if (r.Num > 0)
{
var floor = r.Num / r.Denom;
Lower = new Rational(floor, precision);
Upper = new Rational(floor + 1, precision);
}
else
{
var ceil = -((-r.Num) / r.Denom);
Lower = new Rational(ceil - 1, precision);
Upper = new Rational(ceil, precision);
}
}
public BigDecimalInterval(Rational lower, Rational upper) : this(lower, upper, Precision)
{
}
private BigDecimalInterval(Rational lower, Rational upper, BigInteger precision)
{
if (lower > upper) throw new ArgumentOutOfRangeException();
_Precision = precision;
Lower = new BigDecimalInterval(lower, precision).Lower;
Upper = new BigDecimalInterval(upper, precision).Upper;
}
private BigInteger _Precision { get; set; }
public Rational Lower { get; private set; }
public Rational Upper { get; private set; }
public override string ToString() => string.Format("[{0} ~= {1}, {2} ~= {3} width {4}]", Lower, (double)Lower, Upper, (double)Upper, (double)(Upper - Lower));
#region Operators
public static implicit operator BigDecimalInterval(int r) => new BigDecimalInterval(r);
public static implicit operator BigDecimalInterval(long r) => new BigDecimalInterval(r);
public static implicit operator BigDecimalInterval(BigInteger r) => new BigDecimalInterval(r);
public static implicit operator BigDecimalInterval(Rational r) => new BigDecimalInterval(r);
public static BigDecimalInterval operator -(BigDecimalInterval a) => new BigDecimalInterval(-a.Upper, -a.Lower, a._Precision);
public static BigDecimalInterval operator +(BigDecimalInterval a, BigDecimalInterval b) => new BigDecimalInterval(a.Lower + b.Lower, a.Upper + b.Upper, Max(a._Precision, b._Precision));
public static BigDecimalInterval operator -(BigDecimalInterval a, BigDecimalInterval b) => new BigDecimalInterval(a.Lower - b.Upper, a.Upper - b.Lower, Max(a._Precision, b._Precision));
// Assumes a > 0
public static BigDecimalInterval operator *(int a, BigDecimalInterval b) => new BigDecimalInterval(a * b.Lower, a * b.Upper, b._Precision);
public static BigDecimalInterval operator /(BigDecimalInterval a, int b) => new BigDecimalInterval(a.Lower / b, a.Upper / b, a._Precision);
#endregion
private static BigInteger Max(BigInteger a, BigInteger b) => a > b ? a : b;
public static BigDecimalInterval Atan(Rational x)
{
// atan(x) = \sum_{i=0}^\infty (-1)^i x^{2i+1} / (2i+1)
Rational lower = x;
Rational upper = x;
var intermediatePrecision = Precision * Precision;
var epsilon = new Rational(1, intermediatePrecision);
BigDecimalInterval sum = 0;
BigDecimalInterval term = new BigDecimalInterval(x, intermediatePrecision);
var x2 = x * x;
for (int i = 0; true; i++)
{
sum += term / (2 * i + 1);
term = new BigDecimalInterval(term.Upper * -x2, term.Lower * -x2, intermediatePrecision);
if (i % 2 == 0) upper = sum.Upper;
else lower = sum.Lower;
if (term.Lower.Abs() <= epsilon && term.Upper.Abs() <= epsilon) break;
}
return new BigDecimalInterval(lower, upper, Precision);
}
private static readonly BigDecimalInterval Pi = 16 * Atan(new Rational(1, 5)) - 4 * Atan(new Rational(1, 239));
private static BigDecimalInterval Sin(Rational x)
{
if (x < 0) return -Sin(-x);
// sin(x) = sum_{i=0}^\infty (-1)^{i} x^{2i+1} / (2i+1)!
Rational lower = x;
Rational upper = x;
var intermediatePrecision = Precision * Precision;
var epsilon = new Rational(1, intermediatePrecision);
BigDecimalInterval term = new BigDecimalInterval(x, intermediatePrecision);
BigDecimalInterval sum = term;
var x2 = x * x;
for (int i = 1; true; i++)
{
var m = x2 / -((2 * i) * (2 * i + 1));
term = new BigDecimalInterval(term.Upper * m, term.Lower * m, intermediatePrecision);
sum += term;
if (i % 2 == 0) upper = sum.Upper;
else lower = sum.Lower;
if (term.Lower.Abs() <= epsilon && term.Upper.Abs() <= epsilon) break;
}
return new BigDecimalInterval(lower, upper, Precision);
}
private static BigDecimalInterval Cos(Rational x)
{
if (x < 0) x = -x;
// cos(x) = sum_{i=0}^\infty (-1)^i x^{2i} / (2i)!
Rational lower = 1;
Rational upper = 1;
var intermediatePrecision = Precision * Precision;
var epsilon = new Rational(1, intermediatePrecision);
BigDecimalInterval term = new BigDecimalInterval(1, intermediatePrecision);
BigDecimalInterval sum = term;
var x2 = x * x;
for (int i = 1; true; i++)
{
var m = x2 / -((2 * i - 1) * (2 * i));
term = new BigDecimalInterval(term.Upper * m, term.Lower * m, intermediatePrecision);
sum += term;
if (i % 2 == 0) upper = sum.Upper;
else lower = sum.Lower;
if (term.Lower.Abs() <= epsilon && term.Upper.Abs() <= epsilon) break;
}
return new BigDecimalInterval(lower, upper, Precision);
}
public static BigDecimalInterval Tan(BigDecimalInterval x)
{
if (x.Upper < 0) return -Tan(-x);
if (x.Lower >= Pi.Lower / -2 && x.Upper <= Pi.Lower / 2)
{
var lb = Sin(x.Lower).Lower / Cos(x.Lower).Upper;
var ub = Sin(x.Upper).Upper / Cos(x.Upper).Lower;
return new BigDecimalInterval(lb, ub);
}
throw new ArgumentOutOfRangeException(nameof(x));
}
internal static void Main()
{
BigDecimalInterval x = 1;
for (int i = 1; i < 1001; i++)
{
// Tan is fine for -pi/2 to pi/2.
while (x.Upper > Pi.Lower / 2) x -= Pi;
while (x.Lower < Pi.Lower / -2) x += Pi;
x = Tan(x);
double lb = x.Lower;
double ub = x.Upper;
double avg = (lb + ub) / 2;
if (lb == ub) Console.WriteLine("{0}: {1}", i, lb);
else
{
var sl = lb.ToString("F16");
var su = ub.ToString("F16");
var sa = avg.ToString("F16");
var sb = new StringBuilder();
for (int j = 0; j < sa.Length; j++)
{
if (j < sl.Length && j < su.Length && sl[j] == sa[j] && su[j] == sa[j]) sb.Append(sa[j]);
else { sb.Append('(').Append(sa[j]).Append(')'); break; }
}
Console.WriteLine("{0}: {1}", i, sb);
}
}
}
}
}
1: 1.5574077246549
2: 74.685933398765
3: -0.863518854878059
4: -1.1698563550598700
5: -2.3590377341888900
6: 0.994329619003766
7: 1.53815355685765
8: 30.6237734485035000
9: -1.01360193491195
10: -1.60501279897612
11: 29.2142833599664
12: 1.36908924935115
13: 4.89026547429157
14: -5.56246068356664
15: 0.878350754361129
16: 1.20560964050324
17: 2.61550036916116
18: -0.580679747741043
19: -0.656140408306109
20: -0.7699389783023240
21: -0.9695499372109160
22: -1.45779368483145
23: -8.81165096947409
24: 0.703583559933057
25: 0.84843286874221
26: 1.13474129499727
27: 2.14606031671765
28: -1.54220930956787
29: -34.9713847851724
30: -0.439234785314939
31: -0.469846051228659
32: -0.507772240214313
33: -0.556437564799929
34: -0.621997867137738
35: -0.716929430924745
36: -0.871649875609694
37: -1.1893005816144700
38: -2.49284477704471
39: 0.758230537928049
40: 0.947089191968996
41: 1.38981462327307
42: 5.46496103956346
43: -1.06790567976983
44: -1.81797758615449
45: 3.96288282065737
46: 1.07448957697426
47: 1.84666533244339
48: -3.53248255939209
49: -0.41209556585069
50: -0.437124906727166
51: -0.467272952676368
52: -0.504539928885311
53: -0.552212041528113
54: -0.616152895088462
55: -0.708117041865185
56: -0.856259883850842
57: -1.15280749705211
58: -2.25142847469732
59: 1.2350139693139300
60: 2.86534163051741
61: -0.283499707344174
62: -0.291347247617881
63: -0.299880597846176
64: -0.309205426824585
65: -0.319451623727185
66: -0.330780917368695
67: -0.34339763831895
68: -0.357564276853131
69: -0.373624579078005
70: -0.392038903266776
71: -0.413440326562153
72: -0.438727564927479
73: -0.4692270067211980
74: -0.506993830403243
75: -0.555418582744476
76: -0.620585554573862
77: -0.714793368324565
78: -0.8678978693884840
79: -1.18028180503054
80: -2.4292097845290(8)
81: 0.8636804843649880
82: 1.17023925723014
83: 2.3615537823605900
84: -0.989338451940632
85: -1.5214815614514900
86: -20.2614615093012
87: -6.24058007227442
88: 0.0426310327299416
89: 0.0426568774682384
90: 0.042682769262409
91: 0.0427087082554086
92: 0.0427346945908012
93: 0.0427607284127628
94: 0.0427868098660848
95: 0.0428129390961776
96: 0.0428391162490735
97: 0.0428653414714306
98: 0.0428916149105361
99: 0.0429179367143097
100: 0.0429443070313071
101: 0.0429707260107238
102: 0.0429971938023981
103: 0.0430237105568152
104: 0.0430502764251106
105: 0.0430768915590735
106: 0.0431035561111507
107: 0.0431302702344505
108: 0.0431570340827456
109: 0.0431838478104777
110: 0.0432107115727607
111: 0.0432376255253846
112: 0.0432645898248194
113: 0.0432916046282188
114: 0.0433186700934240
115: 0.0433457863789678
116: 0.0433729536440783
117: 0.0434001720486829
118: 0.0434274417534121
119: 0.0434547629196037
120: 0.0434821357093068
121: 0.0435095602852857
122: 0.0435370368110240
123: 0.0435645654507287
124: 0.0435921463693343
125: 0.0436197797325072
126: 0.0436474657066495
127: 0.0436752044589032
128: 0.043702996157155
129: 0.0437308409700398
130: 0.0437587390669457
131: 0.0437866906180176
132: 0.0438146957941624
133: 0.0438427547670526
134: 0.0438708677091313
135: 0.0438990347936162
136: 0.0439272561945045
137: 0.043955532086577
138: 0.043983862645403
139: 0.0440122480473446
140: 0.0440406884695617
141: 0.0440691840900162
142: 0.0440977350874767
143: 0.0441263416415236
144: 0.0441550039325536
145: 0.0441837221417844
146: 0.0442124964512597
147: 0.0442413270438538
148: 0.0442702141032766
149: 0.0442991578140789
150: 0.0443281583616566
151: 0.0443572159322561
152: 0.0443863307129796
153: 0.0444155028917896
154: 0.0444447326575143
155: 0.0444740201998528
156: 0.0445033657093799
157: 0.0445327693775519
158: 0.0445622313967112
159: 0.0445917519600922
160: 0.044621331261826
161: 0.0446509694969462
162: 0.0446806668613943
163: 0.0447104235520249
164: 0.0447402397666113
165: 0.0447701157038509
166: 0.0448000515633711
167: 0.0448300475457344
168: 0.0448601038524447
169: 0.0448902206859522
170: 0.0449203982496598
171: 0.0449506367479284
172: 0.044980936386083
173: 0.0450112973704185
174: 0.0450417199082055
175: 0.0450722042076963
176: 0.0451027504781309
177: 0.045133358929743
178: 0.0451640297737661
179: 0.0451947632224396
180: 0.0452255594890150
181: 0.0452564187877621
182: 0.0452873413339751
183: 0.0453183273439794
184: 0.0453493770351373
185: 0.0453804906258548
186: 0.0454116683355879
187: 0.0454429103848495
188: 0.0454742169952152
189: 0.0455055883893305
190: 0.0455370247909172
191: 0.0455685264247803
192: 0.0456000935168145
193: 0.0456317262940111
194: 0.045663424984465
195: 0.0456951898173812
196: 0.0457270210230823
197: 0.0457589188330153
198: 0.0457908834797582
199: 0.0458229151970279
200: 0.045855014219687
201: 0.0458871807837509
202: 0.0459194151263951
203: 0.0459517174859631
204: 0.045984088101973
205: 0.0460165272151254
206: 0.046049035067311
207: 0.0460816119016177
208: 0.0461142579623389
209: 0.0461469734949805
210: 0.0461797587462694
211: 0.0462126139641606
212: 0.0462455393978453
213: 0.0462785352977593
214: 0.0463116019155903
215: 0.0463447395042863
216: 0.0463779483180638
217: 0.0464112286124159
218: 0.0464445806441205
219: 0.0464780046712486
220: 0.0465115009531729
221: 0.046545069750575(8)
222: 0.0465787113254587
223: 0.0466124259411496
224: 0.0466462138623127
225: 0.0466800753549562
226: 0.046714010686442
227: 0.046748020125494
228: 0.0467821039422071
229: 0.0468162624080564
230: 0.046850495795906
231: 0.0468848043800185
232: 0.0469191884360639
233: 0.0469536482411291
234: 0.0469881840737272
235: 0.047022796213807
236: 0.0470574849427625
237: 0.0470922505434424
238: 0.0471270933001601
239: 0.0471620134987029
240: 0.0471970114263426
241: 0.0472320873718448
242: 0.0472672416254790
243: 0.047302474479029
244: 0.0473377862258029
245: 0.0473731771606432
246: 0.0474086475799374
247: 0.047444197781628
248: 0.0474798280652236
249: 0.0475155387318092
250: 0.0475513300840566
251: 0.0475872024262356
252: 0.0476231560642248
253: 0.0476591913055224
254: 0.0476953084592572
255: 0.0477315078361999
256: 0.0477677897487743
257: 0.0478041545110685
258: 0.0478406024388466
259: 0.0478771338495597
260: 0.0479137490623581
261: 0.0479504483981026
262: 0.0479872321793765
263: 0.0480241007304974
264: 0.0480610543775293
265: 0.0480980934482945
266: 0.0481352182723862
267: 0.0481724291811805
268: 0.0482097265078488
269: 0.0482471105873705
270: 0.0482845817565457
271: 0.0483221403540076
272: 0.0483597867202356
273: 0.0483975211975683
274: 0.0484353441302164
275: 0.0484732558642761
276: 0.048511256747742
277: 0.048549347130521
278: 0.0485875273644456
279: 0.0486257978032875
280: 0.0486641588027714
281: 0.0487026107205888
282: 0.0487411539164124
283: 0.0487797887519097
284: 0.0488185155907574
285: 0.0488573347986562
286: 0.0488962467433445
287: 0.0489352517946139
288: 0.0489743503243233
289: 0.049013542706414
290: 0.049052829316924(9)
291: 0.0490922105340073
292: 0.0491316867379406
293: 0.0491712583111472
294: 0.0492109256382087
295: 0.0492506891058809
296: 0.0492905491031101
297: 0.0493305060210491
298: 0.0493705602530729
299: 0.0494107121947953
300: 0.0494509622440855
301: 0.049491310801084
302: 0.0495317582682199
303: 0.0495723050502274
304: 0.0496129515541631
305: 0.049653698189423
306: 0.0496945453677598
307: 0.0497354935033001
308: 0.0497765430125628
309: 0.0498176943144761
310: 0.0498589478303958
311: 0.0499003039841235
312: 0.0499417632019245
313: 0.0499833259125467
314: 0.0500249925472391
315: 0.0500667635397703
316: 0.0501086393264477
317: 0.0501506203461367
318: 0.0501927070402799
319: 0.0502348998529165
320: 0.0502771992307022
321: 0.0503196056229288
322: 0.0503621194815445
323: 0.0504047412611739
324: 0.0504474714191385
325: 0.0504903104154774
326: 0.050533258712968
327: 0.0505763167771467
328: 0.0506194850763308
329: 0.0506627640816393
330: 0.0507061542670145
331: 0.0507496561092441
332: 0.050793270087983
333: 0.0508369966857757
334: 0.0508808363880784
335: 0.0509247896832817
336: 0.0509688570627339
337: 0.0510130390207633
338: 0.0510573360547021
339: 0.0511017486649097
340: 0.0511462773547964
341: 0.0511909226308473
342: 0.0512356850026467
343: 0.0512805649829023
344: 0.05132556308747
345: 0.0513706798353786
346: 0.0514159157488554
347: 0.0514612713533509
348: 0.051506747177565
349: 0.0515523437534726
350: 0.0515980616163499
351: 0.0516439013048004
352: 0.0516898633607822
353: 0.0517359483296342
354: 0.0517821567601038
355: 0.051828489204374
356: 0.0518749462180913
357: 0.0519215283603935
358: 0.0519682361939382
359: 0.0520150702849312
360: 0.0520620312031553
361: 0.0521091195219992
362: 0.0521563358184875
363: 0.0522036806733097
364: 0.0522511546708506
365: 0.0522987583992206
366: 0.052346492450286
367: 0.0523943574197000
368: 0.0524423539069343
369: 0.05249048251531
370: 0.0525387438520298
371: 0.0525871385282102
372: 0.0526356671589138
373: 0.0526843303631822
374: 0.0527331287640693
375: 0.0527820629886746
376: 0.0528311336681769
377: 0.0528803414378691
378: 0.0529296869371919
379: 0.0529791708097694
380: 0.0530287937034438
381: 0.053078556270311(6)
382: 0.0531284591667588
383: 0.0531785030534981
384: 0.0532286885956051
385: 0.0532790164625553
386: 0.0533294873282622
387: 0.0533801018711145
388: 0.0534308607740149
389: 0.0534817647244186
390: 0.0535328144143722
391: 0.0535840105405535
392: 0.0536353538043113
393: 0.0536868449117059
394: 0.0537384845735493
395: 0.0537902735054472
396: 0.0538422124278401
397: 0.0538943020660454
398: 0.053946543150300(4)
399: 0.0539989364158044
400: 0.0540514826027633
401: 0.0541041824564323
402: 0.0541570367271612
403: 0.0542100461704389
404: 0.0542632115469386
405: 0.0543165336225639
406: 0.054370013168495
407: 0.0544236509612354
408: 0.0544774477826597
409: 0.0545314044200607
410: 0.0545855216661986
411: 0.0546398003193492
412: 0.0546942411833538
413: 0.054748845067669
414: 0.0548036127874173
415: 0.0548585451634381
416: 0.0549136430223393
417: 0.0549689071965499
418: 0.0550243385243722
419: 0.0550799378500358
420: 0.0551357060237511
421: 0.0551916439017641
422: 0.0552477523464118
423: 0.0553040322261775
424: 0.0553604844157477
425: 0.0554171097960691
426: 0.0554739092544060
427: 0.055530883684399
428: 0.0555880339861241
429: 0.05564536106615(1)
430: 0.0557028658376087
431: 0.0557605492202369
432: 0.0558184121404571
433: 0.0558764555314305
434: 0.0559346803331221
435: 0.0559930874923648
436: 0.0560516779629234
437: 0.056110452705561
438: 0.056169412688104
439: 0.05622855888551
440: 0.056287892279935
441: 0.0563474138608019
442: 0.0564071246248697
443: 0.0564670255763041
444: 0.0565271177267475
445: 0.0565874020953916
446: 0.0566478797090495
447: 0.0567085516022292
448: 0.056769418817208
449: 0.0568304824041077
450: 0.0568917434209704
451: 0.0569532029338357
452: 0.0570148620168185
453: 0.0570767217521881
454: 0.0571387832304473
455: 0.0572010475504137
456: 0.0572635158193014
457: 0.0573261891528031
458: 0.0573890686751743
459: 0.0574521555193178
460: 0.0575154508268693
461: 0.0575789557482843
462: 0.0576426714429257
463: 0.0577065990791529
464: 0.0577707398344116
465: 0.0578350948953248
466: 0.057899665457785
467: 0.0579644527270477
468: 0.0580294579178255
469: 0.0580946822543841
470: 0.0581601269706389
471: 0.0582257933102528
472: 0.0582916825267357
473: 0.0583577958835452
474: 0.0584241346541876
475: 0.0584907001223216
476: 0.058557493581862
477: 0.0586245163370860
478: 0.0586917697027392
479: 0.0587592550041449
480: 0.0588269735773128
481: 0.0588949267690508
482: 0.0589631159370769
483: 0.0590315424501334
484: 0.0591002076881023
485: 0.0591691130421219
486: 0.0592382599147051
487: 0.0593076497198595
488: 0.0593772838832088
489: 0.0594471638421154
490: 0.0595172910458053
491: 0.0595876669554941
492: 0.0596582930445152
493: 0.0597291707984487
494: 0.0598003017152529
495: 0.0598716873053973
496: 0.0599433290919972
497: 0.06001522861095
498: 0.0600873874110737
499: 0.0601598070542465
500: 0.0602324891155494
501: 0.0603054351834094
502: 0.0603786468597457
503: 0.060452125760117
504: 0.0605258735138714
505: 0.0605998917642981
506: 0.0606741821687811
507: 0.060748746398955
508: 0.0608235861408626
509: 0.0608987030951156
510: 0.0609740989770563
511: 0.0610497755169223
512: 0.0611257344600129
513: 0.0612019775668587
514: 0.0612785066133922
515: 0.0613553233911218
516: 0.0614324297073081
517: 0.0615098273851419
518: 0.0615875182639254
519: 0.0616655041992561
520: 0.061743787063212
521: 0.0618223687445412
522: 0.0619012511488526
523: 0.06198043619881
524: 0.0620599258343291
525: 0.0621397220127766
526: 0.0622198267091732
527: 0.0623002419163979
528: 0.062380969645397
529: 0.0624620119253948
530: 0.0625433708041077
531: 0.0626250483479616
532: 0.0627070466423122
533: 0.0627893677916684
534: 0.0628720139199191
535: 0.0629549871705635
536: 0.0630382897069439
537: 0.0631219237124831
538: 0.0632058913909245
539: 0.0632901949665756
540: 0.063374836684555(5)
541: 0.0634598188110461
542: 0.0635451436335467
543: 0.0636308134611323
544: 0.0637168306247163
545: 0.0638031974773164
546: 0.063889916394325
547: 0.0639769897737833
548: 0.0640644200366602
549: 0.064152209627134
550: 0.06424036101288
551: 0.0643288766853616
552: 0.0644177591601253
553: 0.0645070109771017
554: 0.0645966347009096
555: 0.0646866329211655
556: 0.0647770082527978
557: 0.0648677633363658
558: 0.0649589008383833
559: 0.0650504234516479
560: 0.0651423338955746
561: 0.0652346349165355
562: 0.0653273292882036
563: 0.0654204198119036
564: 0.0655139093169663
565: 0.0656078006610905
566: 0.0657020967307092
567: 0.0657968004413622
568: 0.0658919147380745
569: 0.0659874425957408
570: 0.0660833870195162
571: 0.066179751045213
572: 0.0662765377397037
573: 0.0663737502013313
574: 0.0664713915603249
575: 0.0665694649792236
576: 0.0666679736533061
577: 0.0667669208110276
578: 0.0668663097144643
579: 0.0669661436597647
580: 0.0670664259776083
581: 0.0671671600336726
582: 0.0672683492291067
583: 0.0673699970010136
584: 0.0674721068229404
585: 0.0675746822053764
586: 0.06767772669626
587: 0.0677812438814934
588: 0.0678852373854671
589: 0.0679897108715918
590: 0.068094668042841
591: 0.068200112642301
592: 0.0683060484537324
593: 0.068412479302139
594: 0.0685194090543481
595: 0.0686268416196003
596: 0.0687347809501492
597: 0.0688432310418718
598: 0.0689521959348895
599: 0.0690616797142001
600: 0.0691716865103203
601: 0.0692822204999399
602: 0.0693932859065878
603: 0.0695048870013092
604: 0.0696170281033549
605: 0.0697297135808835
606: 0.0698429478516751
607: 0.0699567353838587
608: 0.0700710806966522
609: 0.0701859883611157
610: 0.0703014630009190
611: 0.0704175092931217
612: 0.0705341319689695
613: 0.070651335814703(0)
614: 0.0707691256723828
615: 0.0708875064407287
616: 0.0710064830759755
617: 0.0711260605927436
618: 0.0712462440649264
619: 0.0713670386265939
620: 0.0714884494729132
621: 0.071610481861087
622: 0.0717331411113082
623: 0.0718564326077346
624: 0.0719803617994799
625: 0.0721049342016254
626: 0.07223015539625
627: 0.0723560310334797
628: 0.0724825668325587
629: 0.0726097685829392
630: 0.0727376421453937
631: 0.0728661934531487
632: 0.0729954285130398
633: 0.0731253534066901
634: 0.0732559742917118
635: 0.0733872974029306
636: 0.0735193290536352
637: 0.0736520756368513
638: 0.0737855436266410
639: 0.0739197395794278
640: 0.0740546701353489
641: 0.074190342019634
642: 0.0743267620440125
643: 0.0744639371081489
644: 0.0746018742011078
645: 0.074740580402848
646: 0.0748800628857487
647: 0.0750203289161653
648: 0.075161385856019
649: 0.0753032411644183
650: 0.0754459023993148
651: 0.0755893772191931
652: 0.0757336733847968
653: 0.0758787987608905
654: 0.0760247613180588
655: 0.0761715691345441
656: 0.0763192303981226
657: 0.0764677534080218
658: 0.0766171465768775
659: 0.0767674184327347
660: 0.0769185776210902
661: 0.0770706329069808
662: 0.0772235931771164
663: 0.0773774674420597
664: 0.0775322648384547
665: 0.0776879946313029
666: 0.0778446662162917
667: 0.0780022891221731
668: 0.0781608730131962
669: 0.0783204276915946
670: 0.078480963100129
671: 0.0786424893246878
672: 0.078805016596947
673: 0.0789685552970903
674: 0.0791331159565912
675: 0.079298709261060(1)
676: 0.0794653460531566
677: 0.0796330373355684
678: 0.0798017942740613
679: 0.0799716282005995
680: 0.080142550616539
681: 0.0803145731958967
682: 0.0804877077886973
683: 0.0806619664243991
684: 0.0808373613154016
685: 0.0810139048606383
686: 0.081191609649255
687: 0.0813704884643774
688: 0.081550554286971
689: 0.0817318202997941
690: 0.0819142998914488
691: 0.0820980066605311
692: 0.0822829544198843
693: 0.0824691572009577
694: 0.0826566292582745
695: 0.0828453850740114
696: 0.083035439362694
697: 0.0832268070760112
698: 0.0834195034077512
699: 0.083613543798865
700: 0.0838089439426586
701: 0.0840057197901201
702: 0.0842038875553842
703: 0.0844034637213394
704: 0.0846044650453818
705: 0.0848069085653199
706: 0.0850108116054361
707: 0.0852161917827079
708: 0.0854230670131962
709: 0.0856314555186043
710: 0.0858413758330132
711: 0.0860528468097998
712: 0.086265887628743
713: 0.086480517803324
714: 0.0866967571882272
715: 0.0869146259870478
716: 0.0871341447602141
717: 0.08735533443313
718: 0.0875782163045457
719: 0.0878028120551649
720: 0.0880291437564948
721: 0.0882572338799490
722: 0.0884871053062100
723: 0.0887187813348614
724: 0.0889522856942983
725: 0.0891876425519264
726: 0.0894248765246582
727: 0.0896640126897183
728: 0.089905076595767
729: 0.0901480942743554
730: 0.0903930922517209
731: 0.0906400975609382
732: 0.0908891377544361
733: 0.0911402409168944
734: 0.0913934356785345
735: 0.0916487512288177
736: 0.0919062173305662
737: 0.092165864334522
738: 0.0924277231943607
739: 0.0926918254821764
740: 0.0929582034044544
741: 0.0932268898185528
742: 0.0934979182497085
743: 0.0937713229085907
744: 0.0940471387094207
745: 0.0943254012886810
746: 0.094606147024436
747: 0.0948894130562873
748: 0.0951752373059904
749: 0.0954636584987564
750: 0.0957547161852679
751: 0.0960484507644356
752: 0.0963449035069276
753: 0.0966441165795
754: 0.0969461330701632
755: 0.0972509970142168
756: 0.0975587534211904
757: 0.0978694483027249
758: 0.0981831287014368
759: 0.0984998427208039
760: 0.0988196395561169
761: 0.0991425695265422
762: 0.0994686841083416
763: 0.0997980359693015
764: 0.10013067900442
765: 0.100466668372913
766: 0.100806060536588
767: 0.101148913299652
768: 0.101495285850022
769: 0.101845238802192
770: 0.102198834241738
771: 0.102556135771533
772: 0.10291720855974
773: 0.103282119389687
774: 0.103650936711688
775: 0.1040237306969080
776: 0.104400573293383
777: 0.104781538284271
778: 0.105166701348459
779: 0.105556140123639
780: 0.105949934271958
781: 0.106348165548384
782: 0.106750917871914
783: 0.107158277399759
784: 0.107570332604671
785: 0.107987174355546
786: 0.108408896001498
787: 0.1088355934595540
788: 0.109267365306172
789: 0.109704312872777
790: 0.110146540345523
791: 0.110594154869508
792: 0.111047266657669
793: 0.111505989104628
794: 0.111970438905725
795: 0.112440736181553
796: 0.112917004608277
797: 0.113399371554066
798: 0.113887968221969
799: 0.11438292979962
800: 0.114884395616131
801: 0.115392509306613
802: 0.115907418984747
803: 0.116429277423882
804: 0.116958242247166
805: 0.117494476127243
806: 0.1180381469960840
807: 0.11858942826558
808: 0.119148499059544
809: 0.11971554445782(2)
810: 0.12029075575329
811: 0.1208743307225100
812: 0.121466473910957
813: 0.122067396933707
814: 0.122677318792629
815: 0.123296466211122
816: 0.123925073987593
817: 0.124563385368896
818: 0.125211652445097
819: 0.125870136567021
820: 0.126539108788131
821: 0.127218850332453
822: 0.127909653090373
823: 0.1286118201442870
824: 0.12932566632625
825: 0.1300515188099580
826: 0.130789717739589
827: 0.13154061689823
828: 0.13230458441889
829: 0.133082003541327
830: 0.13387327341823
831: 0.134678809974584
832: 0.135499046824445
833: 0.136334436249676
834: 0.137185450245686
835: 0.138052581639637
836: 0.138936345287135
837: 0.139837279354005
838: 0.140755946690375
839: 0.141692936305047
840: 0.1426488649488930
841: 0.14362437881696
842: 0.14462015537992
843: 0.145636905356657
844: 0.146675374841005
845: 0.147736347597092
846: 0.14882064753931
847: 0.149929141414696
848: 0.151062741707565
849: 0.152222409788464
850: 0.1534091593321
851: 0.154624060031832
852: 0.15586824164159
853: 0.157142898379887
854: 0.158449293734882
855: 0.159788765714351
856: 0.1611627325900750
857: 0.162572699192613
858: 0.164020263819842
859: 0.165507125831257
860: 0.167035094009904
861: 0.168606095785334
862: 0.170222187424294
863: 0.171885565311458
864: 0.173598578460633
865: 0.175363742418209
866: 0.177183754745646
867: 0.179061512297281
868: 0.181000130544669
869: 0.183002965240097
870: 0.185073636761252
871: 0.187216057538007
872: 0.189434463033094
873: 0.1917334468336940
874: 0.194118000514167
875: 0.196593559055535
876: 0.19916605276035
877: 0.201841966789354
878: 0.204628409677719
879: 0.207533192475493
880: 0.210564920514273
881: 0.213733100250152
882: 0.217048264198057
883: 0.220522117689996
884: 0.2241677121067400
885: 0.2279996504133570
886: 0.232034332361481
887: 0.236290248726374
888: 0.240788336593871
889: 0.2455524112394680
890: 0.250609694889366
891: 0.255991469112882
892: 0.261733886487148
893: 0.267878989568538
894: 0.274476002715761
895: 0.281582987416726
896: 0.2892689883531630
897: 0.2976168516817080
898: 0.306726979013059
899: 0.316722407205544
900: 0.3277558043290010
901: 0.340019297258538
902: 0.353758590107567
903: 0.369293773306658
904: 0.387050914104997
905: 0.407611697598484
906: 0.431794680649126
907: 0.460794976803853
908: 0.496439278809291
909: 0.541688040861961
910: 0.601726530234592
911: 0.68667442918052
912: 0.819760506029887
913: 1.07119928503941
914: 1.83224216040979
915: -3.73733570983897
916: -0.677905541010992
917: -0.805203132040935
918: -1.04041565232055
919: -1.70523776291637
920: 7.39331506106959
921: 2.01499462392689
922: -2.10119569280233
923: 1.7051647218017500
924: -7.39738280706375
925: -2.0357484688443500
926: 1.9934943048549(5)
927: -2.2231486052820(6)
928: 1.3090328992763(6)
929: 3.732587702000(5)
930: 0.67099774028(5)
931: 0.79387944860(2)
932: 1.01710807911(8)
933: 1.6176220111(8)
934: -21.34019020(7)
935: 0.7617177(2)
936: 0.9537262(4)
937: 1.4094531(5)
938: 6.14409(4)
939: -0.13999(4)
940: -0.14091(6)
941: -0.14185(6)
942: -0.14281(5)
943: -0.14379(4)
944: -0.14479(4)
945: -0.14581(4)
946: -0.14685(7)
947: -0.14792(1)
948: -0.1490(1)
949: -0.15012(3)
950: -0.15126(1)
951: -0.15242(5)
952: -0.15361(7)
953: -0.15483(6)
954: -0.15608(6)
955: -0.15736(6)
956: -0.15867(8)
957: -0.16002(3)
958: -0.16140(3)
959: -0.1628(2)
960: -0.16427(4)
961: -0.16576(8)
962: -0.16730(3)
963: -0.16888(2)
964: -0.17050(6)
965: -0.17217(7)
966: -0.173(8)
967: -0.17567(4)
968: -0.17750(3)
969: -0.17939(2)
970: -0.1813(4)
971: -0.18335(5)
972: -0.1854(3)
973: -0.18759(3)
974: -0.18982(5)
975: -0.1921(3)
976: -0.1945(3)
977: -0.1970(3)
978: -0.1996(2)
979: -0.20231(5)
980: -0.2051(2)
981: -0.2080(4)
982: -0.211(1)
983: -0.21429(5)
984: -0.21763(6)
985: -0.2211(3)
986: -0.22481(6)
987: -0.2286(8)
988: -0.2327(5)
989: -0.2370(4)
990: -0.2415(9)
991: -0.246(4)
992: -0.2515(1)
993: -0.2569(5)
994: -0.2627(6)
995: -0.2689(8)
996: -0.2756(6)
997: -0.2828(6)
998: -0.2906(6)
999: -0.2991(3)
1000: -0.3083(8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.