bug in real_roots.c ?

24 views
Skip to first unread message

Stephen Crowley

unread,
May 7, 2022, 5:18:25 PM5/7/22
to flint-devel
I noticed, when porting real_roots.c to Java as part of arb4j that there are two bisection steps before the Newton factor is calculated, but the factor is calculated using the interval from the first bisection and disregards the second bisection so its essentually a no-op/wasted cycle so I assume this is a bug and why that part of the code is labeled experimental.

./rr 0 14 14.2 -refine 40 -verbose -maxdepth 10 -maxeval 5000 -maxfound 1 -prec 256
found isolated root in: [14.1250000000000, 14.1375000000000]
outputIntervalCount=3
after bisection 1: [14.1343750000000, 14.1347656250000]
after bisection 2: [14.1347167968750, 14.1347290039062]
newton convergence region [14.1343749999999995226040994112, 14.1347656249999995212163206304]
newton convergence factor 0.0661293966113589704036712646484 +/- 0.12359
refined root (0/3):
[14.1347251417346937904572519835624702707843 +/- 4.29e-41]

in the Java implementation the result is

digits=40
After bisection 1 : [14.1343750000000, 14.1347656250000]=RootUnknown
After bisection 2 : [14.1347167968750, 14.1347412109375]=RootLocated
highPrec=142
 convergence region: [14.1347167968750, 14.1347412109375]=RootLocated =  convergence region: 14.1347290039062495213464248911 +/- 1.2207e-5
Newton convergence factor: 0.0419002245762385
iters=3
Refined root: 14.1347251417346937904572519836 +/- 1.4026e-45
Reply all
Reply to author
Forward
0 new messages