M7R0
I6protobox/HybridInterpf*6&%%bb_iG%(basis_iG%+degbound_iG%*modulus_iG6gn%+rndra
nge_iG%.print_bbcnt_iG%+print_nameG%+N_thresh_iG%&bbcntG%$dimG%(homodimG%)value
pntG%,workinglistG%*prunelistG%-tmpprunelistG%*prunetermG%$rndG%"iG%$fstG%)degb
oundG%(monlistG%"jG%"kG%(k_boundG%$x_iG%#kkG%)kk_boundG%$a_iG%'eval_vG%+raisedp
ntsG%'anchorG%(genpolyG%,result_polyG%&boundG%(evalpntG%'TerminG%,num_monlistG%
&mlistG%&clistG%&rlistG%'cplistG%&dlistG%+rec_resultG%&cpdegG%)num_rootG%&bbval
G%,num_elementG%%testG%(testpntG%-degboundlistG%,testpolyvalG%)New_raceG%.New_r
ace_listG%,BM_thresh_iG%%SameG%0rndrep_thresh_iG%2posttest_thresh_iG%0mapmon_th
resh_iG%*Homogen_iG%%var1G%)tmpplistG%*num_opargG%+UnderstoodG6"F_oCN>8$,&9'"""
!"#Feo>8W""!>8XFio>8YFeo>8'Feo>8UFeo>8Z%%trueG>8%%&falseG>8gn9#@$2""%Fip?(81""&
FeoFipFdpC%>8hnFgp@%/.%)rndrangeG-%#opG6$Feo&9"6#F_qC$>Fbo-Fiq6$""#F[r>FcqFdp@%
/.%0posttest_threshGFhqC$>F[pF`r>FcqFdp@%/.%.mapmon_threshGFhqC$>F]pF`r>FcqFdp@
%/.%)N_threshGFhqC$>F_pF`r>FcqFdp@%/.%*BM_threshGFhqC$>FapF`r>FcqFdp@%3/.%(Homo
genGFhq-%%typeG6$F`r%(booleanGC$>FcpF`r>FcqFdp@%/.%.rndrep_threshGFhqC$>FhoF`r>
FcqFdp@$/.%,print_bbcntGFhqC%>FfpFdp>8&F`r>FcqFdp@$/FcqFgp-%&printG6$%;Warning:
~cannot~comprehendGFhq@$52-%$minG6$FboFdo,(F_pFeo9&FeoFeoFeo2Fev,(FapFeoFivFeoF
eoFeoC$-F_v6#%goWarning:~range~of~random~number~generator~or~the~modulus~might~
not~be~enoughG-%)userinfoG6%Feo%+suggestionG%;increase:modulus,~rndrang~G@$3-Ff
t6$F_p%)infinityG-Fft6$FapFiw-%&ERRORG6#%goInvalid~input:~both~N_thresh~and~BM_
thresh~infinity~will~cause~infinite~loopG>8)-%%nopsG6#9%>8*,&FaxFeoFeoFeo>8(Fio
>8-7">84F]y>8.F]y>82-%&tableG6#F]y>80-%%randG6#;Fbr,&FboFeoFeoFeo>8CFgp>8>F]y@%
FcpC$>Faz7$-Fiq6#Faz-FhyF_o>8enFeoC$>Faz7$FfzFeo>FjzFbr?(F_qFbrFeoFgxFdp>FazFez
>8+Faz>8B-&%)protoboxG6#.%.heval_pnt_modG6$Fb[lFdo>8M-9$6$Fd[lFdo>Fjx,&FjxFeoFe
oFeo>&Fcy6#.%#BMG-%%copyG6#-&Fg[l6#.%,BM_step_modG6+F]yFeoFioFioFeoF]\lFapFapFd
o>&Fcy6#.%"NG-Fi\l6#-&Fg[l6#.%2NewtonInterp_stepG6)F]\lFioFeo&Fb[l6#FjzF_pF_pFd
o>&Fcy6#.%)new_raceG-Fi\l6#Fgp@%2,&FdoFeo!""FeoFiv>83Fi^l>F\_lFiv@%/F_pFiw>8A,*
F\_lFbrFapFeoFbrFeoFhoFeo>Fa_l,(F\_lFeoF_pFeoFhoFeo?(F_qFeoFeoFa_lFdpC%@%/Fa^lF
dpC+-%5userinfo_homo_interpG6#%-restart~raceG>&FazF_^lFhz>F^^lF_`l>Fd[lFe[l>F]\
lF^\l>FjxFb\l>Fb]l-Fi\l6#-Fi]l6)F]\l&Fb]l6#.%%polyG&Fb]l6#.%%termGF^^l&Fb]l6#.%
%remtGF_pFdo>Fd\lFh\l>Fa^lFe^lC(>F^^l-%%modpG6$*&F^^lFeoF_`lFeoFdo>Fd[lFe[l>F]\
lF^\l>FjxFb\l>Fb]lFe`l>Fd\l-Fi\l6#-F\]l6+&Fd\l6#.%"sG&Fd\l6#.%(revpolyG&Fd\l6#.
%"BG&Fd\l6#.%"LG&Fd\l6#.%"DGF]\l&Fd\lFbalFapFdo@%/FaalFioC)>Fi`l-Fi\l6#-Fjal6$-
%'expandG6#Fi`lFdo>&Fcy6#.%&plistG-Fi\l6#-&Fg[l6#.%/spoly_to_slistG6%Fi`l%"xGFd
o>8N-Fcx6#Fgdl>F_zFdp-F[`l6#.%'NewtonG-%/userinfo_bbcntG6$FioFjx[@$/FjclFioC'>8
?-&Fg[l6#.%$revG6$FjblFdo>8EF]y>8G-%$modG6$-%&RootsG6#FeflFdo>8L-Fcx6#F_gl@%54/
Fggl-%'degreeGFegl/FgglFio>Fa^lFdpC$?(85FeoFeoFgglFdp@%2Feo&&F_gl6#Fdhl6#FbrC$>
Fa^lFdpF`fl>F]gl7$-Fiq6#F]gl&Fhhl6#Feo@$/Fa^lFgpC$>8J-&Fg[l6#.%(recoverG6&F]glF
_`lF\_lFdo@%4&FgilFbil>Fa^lFdpC'>8I&FgilFjhl>8F-&Fg[l6#.%0vansolve_kl_modG6&F]g
lFfblFgglFdo>Fgdl-Fi\l6#-&Fg[l6#.%+relocate_cG6%FgjlFdjlFdo>FeelFfel@%2Fa_lFeel
>Fa^lFdpC&-F[`l6#%@early~termination~Ben-Or/TiwariGF]fl>F_zFdpF`fl@$3/F_qFa_l4F
_zC$-Faw6%FeoFcw%Lincrease:~modulus,~degree~upper,~thresholdsG-F]x6#%`rdifferen
t~terms~map~to~the~same~value~when~interpolating~the~first~variable~or~invalid~
input:~wrong~degree~upperboundG>8,F]y@%FcpC$@$4/&FgdlFbilFio>F\y7#7#Fb]m@$2FeoF
eel?(F_qFbrFeoFeelFdp@$4/&FgdlF]rFio>F\]m7$-Fiq6#F\]m-Fey6#7*/.%&degbdG,&F_qFeo
Fj^lFeo/.%*hvardlistG7#Fg^m/.%%tmpcGF\^m/Fc^lFgp/.%(RestartGFgp/FidlF]y/Ff\l-Fe
y6#7)/FcalFap/FhblF]y/F\clFio/F`clFio/FdclFio/FhclFio/.%"rGFio/Fd]l-Fey6#7%/F[a
lFio/F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