+
    i<                     |    ^ RI t ^ RI5 ^ RIHtHtHtHtHtHtH	t	H
t
HtHtHt R tR tR tR tR tR	 tR
 tR tR# )    N)*)SecantMuller	BisectionIllinoisPegasusAndersonRidderANewtonNewtonMNewtonMDNewtonc                     ^\         n        \        R \        ^4      4      P	                  R4      '       g   Q h\        \
        \        ^4      4      P	                  \        4      '       g   Q h\        \
        \        ^4      \        R4      34      P	                  \        4      '       g   Q h\        R \        R4      4      P	                  R4      '       g   Q hR p \        \        \        \        \        3 F-  p\        V RVR7      p\        V ! V4      4      \        8  d   K-  Q h	  \        \        \        \         \"        \$        \&        3 F-  p\        V RVR7      p\        V ! V4      4      \        8  d   K-  Q h	  R
 p \)        \        V ^RR7      \        4      '       g   Q h\)        \*        P                  V R	RR7      \*        P                  4      '       g   Q h\)        \,        P                  V ^RR7      \.        4      '       g   Q h\)        \,        P                  V RRR7      \0        4      '       g   Q h\2        P4                  ! \6        4      ;_uu_ 4        \9        ^4      ;_uu_ 4        \        R \        RRR7      4       RRR4       RRR4       \2        P4                  ! \6        4      ;_uu_ 4        \        R ^ 4       RRR4       \2        P4                  ! \6        4      ;_uu_ 4        \        R R4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lp; i  + '       g   i     R# ; i)   c                 "    ^V ,          ^,
          # )    xs   &}/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/mpmath/tests/test_rootfinding.py<lambda>test_findroot.<locals>.<lambda>	   s    ac!e    g      ?gQ	@c                      W ,          ^,           #    r   r   s   &r   r   r      s
    ac!er   y              ?c                     \        V 4      # N)cosr   s   &r   r   r      s    #a&r          @solver      ?c                 "    V ^,
          ^,          #    r   r   s   &r   r   r      s    1q51*r   g|=)tolc                 >    V ^,          RV ,          ,
          R,           # )r&   iC l   F[ r   r   s   &r   r   r   "   s    q!tgai/.@r   z	5.278e+13z
-5.278e+13)realimagNc                     R# )r   r   r   s   &r   r   r   '   s    2r   c                 0    ^V ,
          ^,          ^,
          # r   r   )ps   &r   r   r   +   s    AEB;?r   g?y       @       @)r#   r    y      ?        )mpdpsfindrootmpfaesinpimpcr   r   r   r   r   absepsr   r   r   r	   r
   
isinstanceivfpfloatcomplexpytestraises
ValueErrorworkprec)fr"   r   s      r   test_findrootrC      sF   BFOSV,//5555CQ ##B''''C#a&#d),-004444OSY/2226666A67FG<Q6*1Q4y3 = 69hQ01Q4y3
 	Ahq!/5555bkk!RUk3RVV<<<<bkk!QEk2E::::bkk!Tuk5w???? 
z	"	"a[[@k=?  
# 
z	"	"q! 
# 
z	"	"*C0 
#	" [ 
#	" 
#	" 
#	"	"s<   L/L
	L:L02M
LLL-	0M 	M	c                  2    \        R  RRR7      ^8X  g   Q hR# )c                 "    V ^,          ^,
          # r%   r   r   s   &r   r    test_bisection.<locals>.<lambda>/   s    ad1fr   bisectr!   N)r   r&   r1   r   r   r   test_bisectionrI   -   s    $U(;q@@@r   c                  `    R  p \        V RRR7      p\        V ! V4      4      \        8  g   Q hR# )c                     \        . ROV 4      # )r   )r      rL   r   )polyvalr   s   &r   r   test_mnewton.<locals>.<lambda>2   s    ')A&r   mnewtonr!   Ng)r1   r7   r8   rB   r   s     r   test_mnewtonrQ   1   s)    &AD+Aqt9s??r   c                  h    R  p \        V R\        R7      p\        V ! V4      4      \        8  g   Q hR# )c                 "    V ^,
          ^d,          # r%   r   r   s   &r   r   test_anewton.<locals>.<lambda>7   s    1q53,r   r#   r!   N)r1   r   r7   r8   rP   s     r   test_anewtonrU   6   s)    ABw'Aqt9s??r   c                  h    R  p \        V R\        R7      p\        V ! V4      4      \        8  g   Q hR# )c                 0    ^V ,           ^,          ^,           # r%   r   r   s   &r   r   test_muller.<locals>.<lambda><   s    1q51*q.r   r#   r!   N)r1   r   r7   r8   rP   s     r   test_mullerrY   ;   s)     ABv&Aqt9s??r   c                     a  \        ^^4       F  o \        V 3R l^4      S 8X  d   K  Q h	  \        R ^4      ^ 8X  g   Q hR# )r   c                 $   < V ^,
          S,          # r   r   )r   is   &r   r   #test_multiplicity.<locals>.<lambda>B   s    q1uqjr   c                     V ^,          # r%   r   r   s   &r   r   r]   C   s    !Q$r   N)rangemultiplicity)r\   s   @r   test_multiplicityra   @   s>    1a[0!4999 *a///r   c                    aaa R  p \        \        V R4      \        ^^.^ R
..4      ,
          ^4      R8  g   Q h\        \        V R^ R R7       F  w  rK  	  \        V ! X!  ^4      R8  g   Q hR oR oR oVVV3R lp \        V R4      pV Uu. uF  p\        \        V4      4      NK  	  up^^.8X  g   Q hR	# u upi )c                  "   ^V ^ ,          ^,          ,          ^V ^,          ^,          ,          ,
          ^,
          V ^ ,          ^,          ^V ^ ,          ,          ,
          V ^,          ^,          ,           ^V ^,          ,          ,           ^,
          .# )rL   r   r   s   *r   rB    test_multidimensional.<locals>.fF   sb    !A$'	!AaD!G)#A%qtQwq1v~adAg'=a!f'DQ'FGGr   gHz>c                 "    \        V \        4      # r   )norminfr   s   &r   r   'test_multidimensional.<locals>.<lambda>J   s
    DCLr   )verboserf   g+=c                 $    V ) ^V,          ,           # r%   r   r   ys   &&r   r   rh   O   s    qb1Q3hr   c                     V ^,          W^,          ^,
          ,          ,           ^V,          ,
          V ^,           ,          # r%   r   rk   s   &&r   r   rh   P   s)    q!taAl*QqS0q1u=r   c                 B    \        V ^,          V^,          ,           4      # r%   )sqrtrk   s   &&r   r   rh   Q   s    d1a4!Q$;'r   c                 P   < S! W4      pS! W4      V,
          S! W4      V,
          3# r   r   )r   rl   f1xf1f2f3s   && r   rB   rd   R   s'    h1313//r   N)r   ru   )
   rv   )	mnormjacobianmatrixr   r/   rf   r1   intround)rB   r   errorr\   rr   rs   rt   s       @@@r   test_multidimensionalr}   E   s    H!V$v!uaVn'==a@5HHHRFA"8:: 1q>E!!! 
B	=B	'B0 	HA#$%1aCaM1%!Q///%s   B;c                  V    \        R  ^4      ^8X  g   Q h\        R ^ 4      ^ 8X  g   Q hR# )c                     ^ # )r   r   r   s   &r   r   test_trivial.<locals>.<lambda>Y       ar   c                     V # r   r   r   s   &r   r   r   Z   r   r   NrH   r   r   r   test_trivialr   X   s,    K#q(((K#q(((r   )r>   mpmathmpmath.calculus.optimizationr   r   r   r   r   r	   r
   r   r   r   r   rC   rI   rQ   rU   rY   ra   r}   r   r   r   r   <module>r      sM     B B B B%1NA


0
0&)r   