Average Error: 15.3 → 0.0
Time: 12.9s
Precision: 64
Internal Precision: 320
$\frac{\left(x \cdot x + x\right) - 2}{\left(x \cdot x - 2 \cdot x\right) + 3}$
$\begin{array}{l} \mathbf{if}\;x \le -2769915830.079747 \lor \neg \left(x \le 252476802.4986655\right):\\ \;\;\;\;\frac{\frac{1}{x}}{x} + \left(1 + \frac{3}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - 2\right) + x \cdot x}{3 - x \cdot \left(2 - x\right)}\\ \end{array}$

# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Split input into 2 regimes
2. ## if x < -2769915830.079747 or 252476802.4986655 < x

1. Initial program 31.3

$\frac{\left(x \cdot x + x\right) - 2}{\left(x \cdot x - 2 \cdot x\right) + 3}$
2. Initial simplification31.3

$\leadsto \frac{\left(x - 2\right) + x \cdot x}{3 - x \cdot \left(2 - x\right)}$
3. Taylor expanded around -inf 0

$\leadsto \color{blue}{1 + \left(\frac{1}{{x}^{2}} + 3 \cdot \frac{1}{x}\right)}$
4. Simplified0.0

$\leadsto \color{blue}{\frac{\frac{1}{x}}{x} + \left(\frac{3}{x} + 1\right)}$

## if -2769915830.079747 < x < 252476802.4986655

1. Initial program 0.0

$\frac{\left(x \cdot x + x\right) - 2}{\left(x \cdot x - 2 \cdot x\right) + 3}$
2. Initial simplification0.0

$\leadsto \frac{\left(x - 2\right) + x \cdot x}{3 - x \cdot \left(2 - x\right)}$
3. Recombined 2 regimes into one program.
4. Final simplification0.0

$\leadsto \begin{array}{l} \mathbf{if}\;x \le -2769915830.079747 \lor \neg \left(x \le 252476802.4986655\right):\\ \;\;\;\;\frac{\frac{1}{x}}{x} + \left(1 + \frac{3}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x - 2\right) + x \cdot x}{3 - x \cdot \left(2 - x\right)}\\ \end{array}$

# Runtime

Time bar (total: 12.9s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)'
(FPCore (x)
:name "(x * x + x - 2)/(x * x - 2x + 3)"
(/ (- (+ (* x x) x) 2) (+ (- (* x x) (* 2 x)) 3)))