ó
    ê-iê  ã                   ó"   • S r SSKJr  SSKrS rg)a  
This module provides a function that calculates RHO when it needs to be reduced.

Translated from Zaikun Zhang's modern-Fortran reference implementation in PRIMA.

Dedicated to late Professor M. J. D. Powell FRS (1936--2015).

Python translation by Nickolai Belakovski.
é   )Ú	DEBUGGINGé    Nc                 óÚ   • [         (       a  Xs=:”  a  S:”  d   e   eX-  nUS:”  a  SU -  nO"US::  a  UnO[        R                  " U5      U-  n[         (       a  Xs=:”  a  U:¼  d   e   eU$ )aI  
This function calculates RHO when it needs to be reduced.
The scheme is shared by UOBYQA, NEWUOA, BOBYQA, LINCOA. For COBYLA, Powell's code reduces RHO by
'RHO *= 0.5; if RHO <= 1.5 * RHOEND: RHO = RHOEND' as specified in (11) of the COBYLA
paper. However, this scheme seems to work better, especially after we introduce DELTA.
r   éú   gš™™™™™¹?é   )r   ÚnpÚsqrt)Úrho_inÚrhoendÚ	rho_ratioÚrhos       ÚS/var/www/html/venv/lib/python3.13/site-packages/scipy/_lib/pyprima/common/redrho.pyÚredrhor      s{   € ÷ ‚yØÕ" Ó"Ð"Ñ"Ð"Ð"ð ‘€Ià3ƒØF‰l‰Ø	b‹Ø‰ägŠgiÓ  6Ñ)ˆ÷ ‚yØÕ%˜vÓ%Ð%Ñ%Ð%Ð%à€Jó    )Ú__doc__Úconstsr   Únumpyr   r   © r   r   Ú<module>r      s   ðñõ Û ó!r   