ENH: optimize/newton: rewrite Halley method in a numerically stabler form
ENH: optimize/newton: rewrite Halley method in a numerically stabler form

Also, rename the new argument and change its position.

jonycgn/scipy,surhudm/scipy,WarrenWeckesser/scipy,sonnyhu/scipy,surhudm/scipy,matthewalbani/scipy,anielsen001/scipy,Shaswat27/scipy,kalvdans/scipy,jonycgn/scipy,chatcannon/scipy,mortonjt/scipy,efiring/scipy,teoliphant/scipy,andim/scipy,scipy/scipy,ales-erjavec/scipy,zaxliu/scipy,nmayorov/scipy,piyush0609/scipy,arokem/scipy,Newman101/scipy,Dapid/scipy,aarchiba/scipy,jseabold/scipy,futurulus/scipy,nmayorov/scipy,argriffing/scipy,Srisai85/scipy,ndchorley/scipy,jjhelmus/scipy,rgommers/scipy,jamestwebber/scipy,anntzer/scipy,Gillu13/scipy,mgaitan/scipy,andyfaff/scipy,newemailjdm/scipy,WillieMaddox/scipy,fredrikw/scipy,lhilt/scipy,niknow/scipy,matthewalbani/scipy,richardotis/scipy,aarchiba/scipy,ChanderG/scipy,Eric89GXL/scipy,andyfaff/scipy,nvoron23/scipy,aman-iitj/scipy,vhaasteren/scipy,kleskjr/scipy,jakevdp/scipy,zaxliu/scipy,aeklant/scipy,minhlongdo/scipy,vberaudi/scipy,tylerjereddy/scipy,josephcslater/scipy,vanpact/scipy,mikebenfield/scipy,zerothi/scipy,befelix/scipy,lhilt/scipy,WillieMaddox/scipy,cpaulik/scipy,ndchorley/scipy,argriffing/scipy,ortylp/scipy,gertingold/scipy,Kamp9/scipy,fredrikw/scipy,grlee77/scipy,lhilt/scipy,ales-erjavec/scipy,woodscn/scipy,vanpact/scipy,mortonjt/scipy,dch312/scipy,Newman101/scipy,chatcannon/scipy,behzadnouri/scipy,pnedunuri/scipy,mdhaber/scipy,teoliphant/scipy,mikebenfield/scipy,zxsted/scipy,cpaulik/scipy,mortada/scipy,pizzathief/scipy,gfyoung/scipy,Eric89GXL/scipy,gertingold/scipy,mingwpy/scipy,witcxc/scipy,Eric89GXL/scipy,Shaswat27/scipy,trankmichael/scipy,petebachant/scipy,argriffing/scipy,pbrod/scipy,jsilter/scipy,scipy/scipy,Srisai85/scipy,mingwpy/scipy,zxsted/scipy,rgommers/scipy,zerothi/scipy,witcxc/scipy,surhudm/scipy,rmcgibbo/scipy,endolith/scipy,pizzathief/scipy,dch312/scipy,Dapid/scipy,nonhermitian/scipy,Dapid/scipy,vberaudi/scipy,sauliusl/scipy,pnedunuri/scipy,hainm/scipy,pbrod/scipy,perimosocordiae/scipy,Shaswat27/scipy,vigna/scipy,dch312/scipy,niknow/scipy,minhlongdo/scipy,piyush0609/scipy,pnedunuri/scipy,FRidh/scipy,giorgiop/scipy,sargas/scipy,felipebetancur/scipy,pyramania/scipy,sriki18/scipy,njwilson23/scipy,kleskjr/scipy,Gillu13/scipy,ortylp/scipy,ChanderG/scipy,ortylp/scipy,tylerjereddy/scipy,sargas/scipy,aeklant/scipy,maniteja123/scipy,woodscn/scipy,kleskjr/scipy,mdhaber/scipy,teoliphant/scipy,giorgiop/scipy,mgaitan/scipy,person142/scipy,kleskjr/scipy,gdooper/scipy,Stefan-Endres/scipy,behzadnouri/scipy,Shaswat27/scipy,mhogg/scipy,sargas/scipy,Kamp9/scipy,lukauskas/scipy,grlee77/scipy,apbard/scipy,Newman101/scipy,fernand/scipy,maciejkula/scipy,apbard/scipy,andim/scipy,perimosocordiae/scipy,trankmichael/scipy,jonycgn/scipy,matthew-brett/scipy,sonnyhu/scipy,zxsted/scipy,Shaswat27/scipy,hainm/scipy,vigna/scipy,efiring/scipy,vberaudi/scipy,mdhaber/scipy,aman-iitj/scipy,bkendzior/scipy,Shaswat27/scipy,niknow/scipy,niknow/scipy,gdooper/scipy,mingwpy/scipy,ChanderG/scipy,perimosocordiae/scipy,ilayn/scipy,nvoron23/scipy,Dapid/scipy,vhaasteren/scipy,FRidh/scipy,andim/scipy,matthew-brett/scipy,ChanderG/scipy,ales-erjavec/scipy,richardotis/scipy,mortada/scipy,andyfaff/scipy,futurulus/scipy,larsmans/scipy,rmcgibbo/scipy,WillieMaddox/scipy,pizzathief/scipy,FRidh/scipy,grlee77/scipy,pbrod/scipy,efiring/scipy,surhudm/scipy,jseabold/scipy,person142/scipy,vhaasteren/scipy,andim/scipy,ChanderG/scipy,nmayorov/scipy,pbrod/scipy,mingwpy/scipy,mingwpy/scipy,jseabold/scipy,gfyoung/scipy,Srisai85/scipy,befelix/scipy,piyush0609/scipy,matthewalbani/scipy,raoulbq/scipy,woodscn/scipy,pschella/scipy,raoulbq/scipy,jonycgn/scipy,lhilt/scipy,hainm/scipy,zxsted/scipy,Srisai85/scipy,larsmans/scipy,ortylp/scipy,maciejkula/scipy,jakevdp/scipy,zaxliu/scipy,richardotis/scipy,argriffing/scipy,sauliusl/scipy,sonnyhu/scipy,endolith/scipy,ndchorley/scipy,witcxc/scipy,juliantaylor/scipy,gdooper/scipy,ogrisel/scipy,gef756/scipy,e-q/scipy,vhaasteren/scipy,chatcannon/scipy,mortada/scipy,arokem/scipy,mhogg/scipy,vberaudi/scipy,Newman101/scipy,ndchorley/scipy,woodscn/scipy,maciejkula/scipy,perimosocordiae/scipy,nvoron23/scipy,person142/scipy,mdhaber/scipy,larsmans/scipy,nonhermitian/scipy,mgaitan/scipy,hainm/scipy,vigna/scipy,mortonjt/scipy,Dapid/scipy,pschella/scipy,aarchiba/scipy,matthew-brett/scipy,chatcannon/scipy,trankmichael/scipy,witcxc/scipy,ilayn/scipy,haudren/scipy,haudren/scipy,lukauskas/scipy,trankmichael/scipy,felipebetancur/scipy,woodscn/scipy,befelix/scipy,jakevdp/scipy,andyfaff/scipy,hainm/scipy,surhudm/scipy,jjhelmus/scipy,zaxliu/scipy,grlee77/scipy,nonhermitian/scipy,raoulbq/scipy,jamestwebber/scipy,sauliusl/scipy,Gillu13/scipy,andyfaff/scipy,behzadnouri/scipy,ortylp/scipy,fredrikw/scipy,aeklant/scipy,anntzer/scipy,anielsen001/scipy,jor-/scipy,maniteja123/scipy,dominicelse/scipy,njwilson23/scipy,mhogg/scipy,endolith/scipy,kleskjr/scipy,behzadnouri/scipy,jsilter/scipy,befelix/scipy,scipy/scipy,minhlongdo/scipy,sriki18/scipy,ilayn/scipy,mingwpy/scipy,richardotis/scipy,nvoron23/scipy,josephcslater/scipy,argriffing/scipy,kalvdans/scipy,gertingold/scipy,cpaulik/scipy,sonnyhu/scipy,person142/scipy,jseabold/scipy,lukauskas/scipy,endolith/scipy,hainm/scipy,futurulus/scipy,maniteja123/scipy,giorgiop/scipy,andim/scipy,juliantaylor/scipy,mtrbean/scipy,pizzathief/scipy,bkendzior/scipy,juliantaylor/scipy,woodscn/scipy,pnedunuri/scipy,kalvdans/scipy,mikebenfield/scipy,efiring/scipy,futurulus/scipy,pyramania/scipy,WarrenWeckesser/scipy,nvoron23/scipy,jsilter/scipy,Stefan-Endres/scipy,nonhermitian/scipy,gef756/scipy,felipebetancur/scipy,pizzathief/scipy,felipebetancur/scipy,trankmichael/scipy,ilayn/scipy,endolith/scipy,ales-erjavec/scipy,haudren/scipy,sriki18/scipy,matthewalbani/scipy,jjhelmus/scipy,witcxc/scipy,njwilson23/scipy,giorgiop/scipy,haudren/scipy,WillieMaddox/scipy,e-q/scipy,aman-iitj/scipy,Stefan-Endres/scipy,aman-iitj/scipy,pyramania/scipy,josephcslater/scipy,njwilson23/scipy,pschella/scipy,aarchiba/scipy,scipy/scipy,anielsen001/scipy,ogrisel/scipy,felipebetancur/scipy,njwilson23/scipy,mortonjt/scipy,mtrbean/scipy,jakevdp/scipy,nvoron23/scipy,sauliusl/scipy,scipy/scipy,surhudm/scipy,ogrisel/scipy,zaxliu/scipy,piyush0609/scipy,rmcgibbo/scipy,gdooper/scipy,Eric89GXL/scipy,zerothi/scipy,WarrenWeckesser/scipy,minhlongdo/scipy,bkendzior/scipy,pbrod/scipy,fernand/scipy,zxsted/scipy,larsmans/scipy,ilayn/scipy,vanpact/scipy,petebachant/scipy,vhaasteren/scipy,mortada/scipy,person142/scipy,aeklant/scipy,ales-erjavec/scipy,nonhermitian/scipy,Gillu13/scipy,sauliusl/scipy,zerothi/scipy,WarrenWeckesser/scipy,endolith/scipy,raoulbq/scipy,haudren/scipy,sargas/scipy,Gillu13/scipy,fernand/scipy,arokem/scipy,WillieMaddox/scipy,Eric89GXL/scipy,pyramania/scipy,jor-/scipy,bkendzior/scipy,mtrbean/scipy,vhaasteren/scipy,tylerjereddy/scipy,vanpact/scipy,futurulus/scipy,dch312/scipy,e-q/scipy,mgaitan/scipy,vigna/scipy,apbard/scipy,vberaudi/scipy,Stefan-Endres/scipy,rmcgibbo/scipy,Gillu13/scipy,jor-/scipy,rmcgibbo/scipy,anntzer/scipy,behzadnouri/scipy,anntzer/scipy,e-q/scipy,lhilt/scipy,maniteja123/scipy,teoliphant/scipy,jonycgn/scipy,teoliphant/scipy,ilayn/scipy,jamestwebber/scipy,fernand/scipy,nmayorov/scipy,vigna/scipy,Eric89GXL/scipy,piyush0609/scipy,ogrisel/scipy,mgaitan/scipy,anielsen001/scipy,jamestwebber/scipy,vanpact/scipy,sriki18/scipy,zxsted/scipy,gef756/scipy,ChanderG/scipy,ndchorley/scipy,sargas/scipy,pnedunuri/scipy,josephcslater/scipy,dominicelse/scipy,larsmans/scipy,niknow/scipy,gfyoung/scipy,raoulbq/scipy,sriki18/scipy,aarchiba/scipy,lukauskas/scipy,jor-/scipy,giorgiop/scipy,petebachant/scipy,nmayorov/scipy,lukauskas/scipy,befelix/scipy,efiring/scipy,jakevdp/scipy,andim/scipy,efiring/scipy,mtrbean/scipy,mortada/scipy,Newman101/scipy,FRidh/scipy,mdhaber/scipy,pyramania/scipy,Kamp9/scipy,sonnyhu/scipy,tylerjereddy/scipy,maniteja123/scipy,Kamp9/scipy,newemailjdm/scipy,Kamp9/scipy,pnedunuri/scipy,gertingold/scipy,rgommers/scipy,rgommers/scipy,Dapid/scipy,arokem/scipy,piyush0609/scipy,pschella/scipy,FRidh/scipy,mikebenfield/scipy,dominicelse/scipy,matthew-brett/scipy,mgaitan/scipy,WillieMaddox/scipy,aman-iitj/scipy,sonnyhu/scipy,ales-erjavec/scipy,maniteja123/scipy,jor-/scipy,pschella/scipy,rgommers/scipy,zerothi/scipy,apbard/scipy,gef756/scipy,newemailjdm/scipy,kalvdans/scipy,raoulbq/scipy,ortylp/scipy,e-q/scipy,matthewalbani/scipy,mhogg/scipy,perimosocordiae/scipy,arokem/scipy,matthew-brett/scipy,anntzer/scipy,anielsen001/scipy,minhlongdo/scipy,mortonjt/scipy,zaxliu/scipy,larsmans/scipy,scipy/scipy,zerothi/scipy,felipebetancur/scipy,kleskjr/scipy,trankmichael/scipy,petebachant/scipy,gdooper/scipy,mortonjt/scipy,lukauskas/scipy,sauliusl/scipy,mtrbean/scipy,petebachant/scipy,jsilter/scipy,niknow/scipy,dch312/scipy,bkendzior/scipy,gfyoung/scipy,mikebenfield/scipy,Srisai85/scipy,giorgiop/scipy,anielsen001/scipy,dominicelse/scipy,newemailjdm/scipy,jonycgn/scipy,mortada/scipy,minhlongdo/scipy,andyfaff/scipy,fernand/scipy,anntzer/scipy,ogrisel/scipy,WarrenWeckesser/scipy,gef756/scipy,jseabold/scipy,richardotis/scipy,mdhaber/scipy,apbard/scipy,vberaudi/scipy,tylerjereddy/scipy,Stefan-Endres/scipy,WarrenWeckesser/scipy,Newman101/scipy,aeklant/scipy,jsilter/scipy,cpaulik/scipy,cpaulik/scipy,rmcgibbo/scipy,mhogg/scipy,behzadnouri/scipy,njwilson23/scipy,fredrikw/scipy,richardotis/scipy,petebachant/scipy,chatcannon/scipy,gef756/scipy,fredrikw/scipy,gfyoung/scipy,mtrbean/scipy,pbrod/scipy,haudren/scipy,mhogg/scipy,fredrikw/scipy,kalvdans/scipy,Srisai85/scipy,newemailjdm/scipy,juliantaylor/scipy,maciejkula/scipy,dominicelse/scipy,cpaulik/scipy,maciejkula/scipy,vanpact/scipy,aman-iitj/scipy,newemailjdm/scipy,Kamp9/scipy,perimosocordiae/scipy,jjhelmus/scipy,fernand/scipy,sriki18/scipy,juliantaylor/scipy,josephcslater/scipy,ndchorley/scipy,chatcannon/scipy,Stefan-Endres/scipy,jseabold/scipy,FRidh/scipy,jamestwebber/scipy,futurulus/scipy,grlee77/scipy,jjhelmus/scipy,argriffing/scipy,gertingold/scipy