pub(crate) static Y1_ZEROS: [(u64, u64); 33]Expand description
Y1 zeros and extremum on [0, 52] interval Generated by SageMath:
R120 = RealField(120)
zeros = []
mp.prec = 150
step = mpf("0.1")
epsilon = mpf("1e-35")
x = mpf("1.25")
previous_zero = R120(0)
y1_zeros = []
while x < mpf("52.0"):
f1 = bessely(1, x)
f2 = bessely(1, x + step)
if f1 * f2 < 0:
zero = findroot(lambda t: bessely(1, t), (x, x + step), solver='secant', tol=mp.mpf("1e-41"))
previous_zero = zero
y1_zeros.append(zero)
if previous_zero is not None and abs(x - mpf(f'{round(x)}')) < epsilon:
zeros.append(previous_zero)
x += step
y1_extrema = []
x = mpf("1.25")
while x < mpf("52.0"):
d1 = mp.diff(lambda t: bessely(1, t), x)
d2 = mp.diff(lambda t: bessely(1, t), x + step)
if d1 * d2 < 0:
extremum = findroot(lambda t: mp.diff(lambda u: bessely(1, u), t), (x, x + step), solver='secant', tol=mp.mpf("1e-41"))
y1_extrema.append(extremum)
x += step
y1_zeros.extend(y1_extrema)
y1_zeros = sorted(y1_zeros)
print(f"pub(crate) static Y1_ZEROS: [(u64, u64); {len(y1_zeros)}] = [")
print(f"(0x0, 0x0),")
for z in y1_zeros:
k = split_double_double(z)
hi = double_to_hex(k[1])
lo = double_to_hex(k[0])
print(f"({lo}, {hi}),")
print("];")