Average Error: 18.0 → 4.0
Time: 14.2s
Precision: 64
Internal Precision: 320
$\frac{\left(\left(aAD0 \cdot k\right) \cdot k - aAD1 \cdot k\right) + aAD2}{\left(\left(aAD0 \cdot k\right) \cdot k + aAD1 \cdot k\right) + aAD2}$
$\begin{array}{l} \mathbf{if}\;\frac{\left(k \cdot \left(aAD0 \cdot k\right) - k \cdot aAD1\right) + aAD2}{aAD2 + \left(k \cdot aAD1 + k \cdot \left(aAD0 \cdot k\right)\right)} \le 1.0000000092761558:\\ \;\;\;\;\frac{1}{\frac{aAD2 + \left(k \cdot aAD1 + k \cdot \left(aAD0 \cdot k\right)\right)}{\left(k \cdot \left(aAD0 \cdot k\right) - k \cdot aAD1\right) + aAD2}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array}$

# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Split input into 2 regimes
2. ## if (/ (+ (- (* (* aAD0 k) k) (* aAD1 k)) aAD2) (+ (+ (* (* aAD0 k) k) (* aAD1 k)) aAD2)) < 1.0000000092761558

1. Initial program 0.0

$\frac{\left(\left(aAD0 \cdot k\right) \cdot k - aAD1 \cdot k\right) + aAD2}{\left(\left(aAD0 \cdot k\right) \cdot k + aAD1 \cdot k\right) + aAD2}$
2. Using strategy rm
3. Applied clear-num0.0

$\leadsto \color{blue}{\frac{1}{\frac{\left(\left(aAD0 \cdot k\right) \cdot k + aAD1 \cdot k\right) + aAD2}{\left(\left(aAD0 \cdot k\right) \cdot k - aAD1 \cdot k\right) + aAD2}}}$

## if 1.0000000092761558 < (/ (+ (- (* (* aAD0 k) k) (* aAD1 k)) aAD2) (+ (+ (* (* aAD0 k) k) (* aAD1 k)) aAD2))

1. Initial program 61.4

$\frac{\left(\left(aAD0 \cdot k\right) \cdot k - aAD1 \cdot k\right) + aAD2}{\left(\left(aAD0 \cdot k\right) \cdot k + aAD1 \cdot k\right) + aAD2}$
2. Taylor expanded around -inf 13.5

$\leadsto \color{blue}{1}$
3. Recombined 2 regimes into one program.
4. Final simplification4.0

$\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(k \cdot \left(aAD0 \cdot k\right) - k \cdot aAD1\right) + aAD2}{aAD2 + \left(k \cdot aAD1 + k \cdot \left(aAD0 \cdot k\right)\right)} \le 1.0000000092761558:\\ \;\;\;\;\frac{1}{\frac{aAD2 + \left(k \cdot aAD1 + k \cdot \left(aAD0 \cdot k\right)\right)}{\left(k \cdot \left(aAD0 \cdot k\right) - k \cdot aAD1\right) + aAD2}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array}$

# Runtime

Time bar (total: 14.2s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)'