Average Error: 10.9 → 3.7
Time: 32.2s
Precision: 64
Internal Precision: 1344
$\frac{1}{\sqrt{1 + \left(\left(-alphax\right) \cdot alphax\right) \cdot \log \left(1 - u\right)}}$
$\begin{array}{l} \mathbf{if}\;1 - u \le 1.0:\\ \;\;\;\;\frac{1}{\sqrt{1 - alphax \cdot \left(\left(\left(alphax \cdot u\right) \cdot u\right) \cdot \left(\left(-\frac{1}{2}\right) - \frac{1}{3} \cdot u\right) - alphax \cdot u\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{1 - \log \left(e^{alphax \cdot \left(\log \left(1 - u\right) \cdot alphax\right)}\right)}}\\ \end{array}$

# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Split input into 2 regimes
2. ## if (- 1 u) < 1.0

1. Initial program 14.5

$\frac{1}{\sqrt{1 + \left(\left(-alphax\right) \cdot alphax\right) \cdot \log \left(1 - u\right)}}$
2. Initial simplification14.5

$\leadsto \frac{1}{\sqrt{1 - \left(alphax \cdot alphax\right) \cdot \log \left(1 - u\right)}}$
3. Using strategy rm
4. Applied associate-*l*14.2

$\leadsto \frac{1}{\sqrt{1 - \color{blue}{alphax \cdot \left(alphax \cdot \log \left(1 - u\right)\right)}}}$
5. Taylor expanded around 0 5.0

$\leadsto \frac{1}{\sqrt{1 - alphax \cdot \color{blue}{\left(-\left(\frac{1}{2} \cdot \left({u}^{2} \cdot alphax\right) + \left(\frac{1}{3} \cdot \left({u}^{3} \cdot alphax\right) + u \cdot alphax\right)\right)\right)}}}$
6. Simplified5.0

$\leadsto \frac{1}{\sqrt{1 - alphax \cdot \color{blue}{\left(\left(u \cdot \left(u \cdot alphax\right)\right) \cdot \left(\left(-\frac{1}{2}\right) - u \cdot \frac{1}{3}\right) - u \cdot alphax\right)}}}$

## if 1.0 < (- 1 u)

1. Initial program 0.0

$\frac{1}{\sqrt{1 + \left(\left(-alphax\right) \cdot alphax\right) \cdot \log \left(1 - u\right)}}$
2. Initial simplification0.0

$\leadsto \frac{1}{\sqrt{1 - \left(alphax \cdot alphax\right) \cdot \log \left(1 - u\right)}}$
3. Using strategy rm
4. Applied associate-*l*0.0

$\leadsto \frac{1}{\sqrt{1 - \color{blue}{alphax \cdot \left(alphax \cdot \log \left(1 - u\right)\right)}}}$
5. Using strategy rm

$\leadsto \frac{1}{\sqrt{1 - \color{blue}{\log \left(e^{alphax \cdot \left(alphax \cdot \log \left(1 - u\right)\right)}\right)}}}$
3. Recombined 2 regimes into one program.
4. Final simplification3.7

$\leadsto \begin{array}{l} \mathbf{if}\;1 - u \le 1.0:\\ \;\;\;\;\frac{1}{\sqrt{1 - alphax \cdot \left(\left(\left(alphax \cdot u\right) \cdot u\right) \cdot \left(\left(-\frac{1}{2}\right) - \frac{1}{3} \cdot u\right) - alphax \cdot u\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{1 - \log \left(e^{alphax \cdot \left(\log \left(1 - u\right) \cdot alphax\right)}\right)}}\\ \end{array}$

# Runtime

Time bar (total: 32.2s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)'
(FPCore (alphax u)
:name "1 / sqrt(1 + -alphax * alphax * log(1 - u))"
(/ 1 (sqrt (+ 1 (* (* (- alphax) alphax) (log (- 1 u)))))))