# Figure 10 for the MAD manual (III.12)
copy "flowchart.pic"

A: terminal("Start")
B: arrow
box "Read" "$a, b, epsilon$"
arrow
# Print was mixed-case in the original
printme(ht 0.5 "PRINT" "$a, b, epsilon$")
arrow
C: box "${Y sub a} = f(a)$"
move to B.c
up
line <- 
connector("$psi$")
move to 0.75<C.sw,C.se>
down
arrow
throughbox(ALPHA, "FOR $h = {b-a} over 2$, -h/2," "$h < epsilon$" wid 1.5)
right
move to last [].e
arrow
connector("$alpha$")

move down 1.7 from A.sw
right
connector("$alpha$")
arrow
throughbox(ALPHA,"FOR x=a+h,h," "x > h" wid 1.5)
arrow
D: terminal("f(x):0")
E: arrow
F:terminal("${Y sub a} cdot f(x):0$")
G: arrow
H: label("ALPHA")
hannotate(E, "$!=$")
hannotate(G, "$>=$")
move to H.s
down
arrow
K: printme(ht 0.6 "PRINT" "\"NO" "SOLUTION\"")
move to K.FRAME.s
arrow
connector("$psi$")
move to D.s
down
L: arrow 
connector("$eta$")
vannotate(L, "=")
move to F.s
down
M: arrow 
connector("$delta$")
vannotate(M, "<")

move down 5.5 from A.sw
right
connector("$delta$")
arrow
throughbox(ALPHA,"FOR $h = {h over 2},{-h over 2}$," "$h < epsilon$" wid 1.5)
arrow
box wid 1.1 "$x = x + h cdot$" "$SIGN.({Y sub a} cdot f(x))$"
arrow
label("SIGMA")
I: arrow
J: printme(ht 0.5 "PRINT" "x")
move to J.FRAME.s
down
arrow
connector("$psi$")
move to I.c
up
line <- 
connector("$eta$")
