Average Error: 39.0 → 0.5
Time: 25.9s
Precision: 64
Internal Precision: 1344
$\log \left(x \cdot 99999 + \left(1 - x\right)\right)$
$\begin{array}{l} \mathbf{if}\;\log \left(x \cdot 99999 + \left(1 - x\right)\right) \le 0.11493146614956662:\\ \;\;\;\;99998 \cdot x + \left(x \cdot x\right) \cdot \left(\frac{999940001199992}{3} \cdot x - 4999800002\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\frac{\frac{1}{99998}}{x} + \log x\right) + \log 99998\right) - \frac{\frac{1}{19999200008}}{x \cdot x}\\ \end{array}$

# Try it out

Your Program's Arguments

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Split input into 2 regimes
2. ## if (log (+ (* x 99999) (- 1 x))) < 0.11493146614956662

1. Initial program 58.6

$\log \left(x \cdot 99999 + \left(1 - x\right)\right)$
2. Taylor expanded around 0 0.4

$\leadsto \color{blue}{\left(\frac{999940001199992}{3} \cdot {x}^{3} + 99998 \cdot x\right) - 4999800002 \cdot {x}^{2}}$
3. Applied simplify0.4

$\leadsto \color{blue}{99998 \cdot x + \left(x \cdot x\right) \cdot \left(\frac{999940001199992}{3} \cdot x - 4999800002\right)}$

## if 0.11493146614956662 < (log (+ (* x 99999) (- 1 x)))

1. Initial program 1.0

$\log \left(x \cdot 99999 + \left(1 - x\right)\right)$
2. Taylor expanded around inf 0.8

$\leadsto \color{blue}{\left(\frac{1}{99998} \cdot \frac{1}{x} + \log 99998\right) - \left(\frac{1}{19999200008} \cdot \frac{1}{{x}^{2}} + \log \left(\frac{1}{x}\right)\right)}$
3. Applied simplify0.8

$\leadsto \color{blue}{\left(\left(\frac{\frac{1}{99998}}{x} + \log x\right) + \log 99998\right) - \frac{\frac{1}{19999200008}}{x \cdot x}}$
3. Recombined 2 regimes into one program.

# Runtime

Time bar (total: 25.9s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)'
(FPCore (x)
:name "log(x*99999 + (1-x))"
(log (+ (* x 99999) (- 1 x))))