M7R0
I*aitkenDELf*6$%"xG%$delG6$%#dxG%$DELG6"F*C%>8$-9%6#9$>8%,$*&F-""#,&-F/6#,&F1""
"F-F;F;F-!""F<F<OF3F*F*F*F*,
I*aitkenlmtf*6&%%leftG%&rightGF&%*limprecisG6$F%%#ttGF*F*C(>%'DigitsG"#?>F-F1>F
3-F"6$F-9&?(F*F;F;F*3329'-%$absG6#F32F1,&F-F;F3F;2F-F/C$>F-FX>F3FL@%1F/F->F-F/>
F--%&evalfG6#,$-%%ceilG6#,$F-"&++"#F;FcoOF-F*F*F*F*,
I$lmtf*6%FAFB%%tdelG6$F%%#tdGF*F*C)>FHFI>%$lllG$""!Fap>F-F1>F3-F\o6#-FN6#F-?(F*
F;F;F*332FCF31F1F-FYC%>F--F\o6#FX>F_pF->F3Fdp@%Fhn>F-F/>F-F[oOF-F*6'%'intsetG%'
tagdivGFC%'intctrGF_pF*F*,
I)weakkurzf*6'%"aG%"bG%"fG%&maxdpG%&deltaG6:%#mdG%#dmG%"rG%&widthG%$ansG%"iG%'g
otoneG%#dlG%#drG%#deGFA%#fvGFB%&khsumG%&depthG%$tmpG%*tmpintsetG%"hG%%ndivG%&th
isbG%"LG%#mxG%"sG%+origintsetGF*F*C'>8.F1>81Fap>8;Fhq?(F*F;F;F*2F\tF/C+>8+-F\o6
#-9(6#F\t@$2F/,&F\tF;FetF;>Fet,&F/F;F\tF<>8/-FNFjt>F^t,&F^tF;*&FauF;FetF;F;>Fhq
-%&unionG6$<#7&7$F\tFap7$F\tFau7$F]uFau7$F]uFapFhq>Fiq7$-%#opG6#Fiq7$7$F\tF]uF\
t>Fjq,&FjqF;F;F;-%'printfG6%QEWEAK~FINE:~[left,right]~=~[%lg,%lg]|+F*F\tF]u>F\t
F]uOF^tF*FgqF*F*,
I/semistrongkurzf*F]r6;FdrFerFfrFgrFhrFirFjrF[sF\sF]sFAF^sFBF_sF`sFasFbsFcsFdsF
esFfsFgsFhs%'gotmaxGFisF*F*C'>F\tF1>F^tFap>8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