Average Error: 6.1 → 0.4
Time: 17.9s
Precision: binary64
Cost: 14020
\[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
\[\begin{array}{l} \mathbf{if}\;x \leq 10000000:\\ \;\;\;\;\left(\left(\log x \cdot \left(x + -0.5\right) - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(0.0007936500793651 + y\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \left(\left(0.0007936500793651 + y\right) \cdot \left(z \cdot \frac{z}{x}\right) - \mathsf{fma}\left(\log x, 0.5 - x, x\right)\right)\\ \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (/
   (+
    (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
    0.083333333333333)
   x)))
(FPCore (x y z)
 :precision binary64
 (if (<= x 10000000.0)
   (+
    (+ (- (* (log x) (+ x -0.5)) x) 0.91893853320467)
    (/
     (+
      0.083333333333333
      (* z (+ -0.0027777777777778 (* z (+ 0.0007936500793651 y)))))
     x))
   (+
    0.91893853320467
    (- (* (+ 0.0007936500793651 y) (* z (/ z x))) (fma (log x) (- 0.5 x) x)))))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
double code(double x, double y, double z) {
	double tmp;
	if (x <= 10000000.0) {
		tmp = (((log(x) * (x + -0.5)) - x) + 0.91893853320467) + ((0.083333333333333 + (z * (-0.0027777777777778 + (z * (0.0007936500793651 + y))))) / x);
	} else {
		tmp = 0.91893853320467 + (((0.0007936500793651 + y) * (z * (z / x))) - fma(log(x), (0.5 - x), x));
	}
	return tmp;
}
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x))
end
function code(x, y, z)
	tmp = 0.0
	if (x <= 10000000.0)
		tmp = Float64(Float64(Float64(Float64(log(x) * Float64(x + -0.5)) - x) + 0.91893853320467) + Float64(Float64(0.083333333333333 + Float64(z * Float64(-0.0027777777777778 + Float64(z * Float64(0.0007936500793651 + y))))) / x));
	else
		tmp = Float64(0.91893853320467 + Float64(Float64(Float64(0.0007936500793651 + y) * Float64(z * Float64(z / x))) - fma(log(x), Float64(0.5 - x), x)));
	end
	return tmp
end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := If[LessEqual[x, 10000000.0], N[(N[(N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(-0.0027777777777778 + N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(0.91893853320467 + N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Log[x], $MachinePrecision] * N[(0.5 - x), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\begin{array}{l}
\mathbf{if}\;x \leq 10000000:\\
\;\;\;\;\left(\left(\log x \cdot \left(x + -0.5\right) - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(0.0007936500793651 + y\right)\right)}{x}\\

\mathbf{else}:\\
\;\;\;\;0.91893853320467 + \left(\left(0.0007936500793651 + y\right) \cdot \left(z \cdot \frac{z}{x}\right) - \mathsf{fma}\left(\log x, 0.5 - x, x\right)\right)\\


\end{array}

Error

Target

Original6.1
Target1.1
Herbie0.4
\[\left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) \]

Derivation

  1. Split input into 2 regimes
  2. if x < 1e7

    1. Initial program 0.4

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]

    if 1e7 < x

    1. Initial program 10.3

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Simplified10.2

      \[\leadsto \color{blue}{0.91893853320467 + \left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x} - \mathsf{fma}\left(\log x, 0.5 - x, x\right)\right)} \]
      Proof
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (fma.f64 z (fma.f64 (+.f64 y 7936500793651/10000000000000000) z -13888888888889/5000000000000000) 83333333333333/1000000000000000) x) (fma.f64 (log.f64 x) (-.f64 1/2 x) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (fma.f64 z (fma.f64 (+.f64 y 7936500793651/10000000000000000) z (Rewrite<= metadata-eval (neg.f64 13888888888889/5000000000000000))) 83333333333333/1000000000000000) x) (fma.f64 (log.f64 x) (-.f64 1/2 x) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (fma.f64 z (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000)) 83333333333333/1000000000000000) x) (fma.f64 (log.f64 x) (-.f64 1/2 x) x))): 1 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 z (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000)) 83333333333333/1000000000000000)) x) (fma.f64 (log.f64 x) (-.f64 1/2 x) x))): 1 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z)) 83333333333333/1000000000000000) x) (fma.f64 (log.f64 x) (-.f64 1/2 x) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x) (fma.f64 (log.f64 x) (Rewrite<= unsub-neg_binary64 (+.f64 1/2 (neg.f64 x))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x) (fma.f64 (log.f64 x) (Rewrite=> +-commutative_binary64 (+.f64 (neg.f64 x) 1/2)) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x) (fma.f64 (log.f64 x) (+.f64 (Rewrite=> neg-sub0_binary64 (-.f64 0 x)) 1/2) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x) (fma.f64 (log.f64 x) (Rewrite<= associate--r-_binary64 (-.f64 0 (-.f64 x 1/2))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x) (fma.f64 (log.f64 x) (Rewrite<= neg-sub0_binary64 (neg.f64 (-.f64 x 1/2))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (log.f64 x) (neg.f64 (-.f64 x 1/2))) x)))): 19 points increase in error, 6 points decrease in error
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x) (+.f64 (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 (log.f64 x) (-.f64 x 1/2)))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x) (+.f64 (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 x 1/2) (log.f64 x)))) x))): 0 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x) (Rewrite<= +-commutative_binary64 (+.f64 x (neg.f64 (*.f64 (-.f64 x 1/2) (log.f64 x))))))): 0 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (-.f64 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x) (Rewrite<= sub-neg_binary64 (-.f64 x (*.f64 (-.f64 x 1/2) (log.f64 x)))))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> associate-+r-_binary64 (-.f64 (+.f64 91893853320467/100000000000000 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)) (-.f64 x (*.f64 (-.f64 x 1/2) (log.f64 x))))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> associate--r-_binary64 (+.f64 (-.f64 (+.f64 91893853320467/100000000000000 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)) x) (*.f64 (-.f64 x 1/2) (log.f64 x)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (+.f64 91893853320467/100000000000000 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)) (neg.f64 x))) (*.f64 (-.f64 x 1/2) (log.f64 x))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-+r+_binary64 (+.f64 (+.f64 91893853320467/100000000000000 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)) (+.f64 (neg.f64 x) (*.f64 (-.f64 x 1/2) (log.f64 x))))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 91893853320467/100000000000000 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)) (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 (-.f64 x 1/2) (log.f64 x)) (neg.f64 x)))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 91893853320467/100000000000000 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)) (Rewrite<= sub-neg_binary64 (-.f64 (*.f64 (-.f64 x 1/2) (log.f64 x)) x))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 (-.f64 (*.f64 (-.f64 x 1/2) (log.f64 x)) x) (+.f64 91893853320467/100000000000000 (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x 1/2) (log.f64 x)) x) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x))): 1 points increase in error, 0 points decrease in error
    3. Taylor expanded in z around inf 10.3

      \[\leadsto 0.91893853320467 + \left(\color{blue}{\frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}} - \mathsf{fma}\left(\log x, 0.5 - x, x\right)\right) \]
    4. Simplified0.4

      \[\leadsto 0.91893853320467 + \left(\color{blue}{\left(y + 0.0007936500793651\right) \cdot \left(z \cdot \frac{z}{x}\right)} - \mathsf{fma}\left(\log x, 0.5 - x, x\right)\right) \]
      Proof
      (*.f64 (+.f64 y 7936500793651/10000000000000000) (*.f64 z (/.f64 z x))): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= +-commutative_binary64 (+.f64 7936500793651/10000000000000000 y)) (*.f64 z (/.f64 z x))): 0 points increase in error, 0 points decrease in error
      (*.f64 (+.f64 7936500793651/10000000000000000 y) (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 z z) x))): 38 points increase in error, 32 points decrease in error
      (*.f64 (+.f64 7936500793651/10000000000000000 y) (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 z 2)) x)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 (pow.f64 z 2) x) (+.f64 7936500793651/10000000000000000 y))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 (pow.f64 z 2) (+.f64 7936500793651/10000000000000000 y)) x)): 37 points increase in error, 14 points decrease in error
  3. Recombined 2 regimes into one program.
  4. Final simplification0.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 10000000:\\ \;\;\;\;\left(\left(\log x \cdot \left(x + -0.5\right) - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(0.0007936500793651 + y\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \left(\left(0.0007936500793651 + y\right) \cdot \left(z \cdot \frac{z}{x}\right) - \mathsf{fma}\left(\log x, 0.5 - x, x\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Error1.1
Cost14272
\[\left(\left(\log x \cdot \left(x + -0.5\right) - x\right) + 0.91893853320467\right) + \left(\frac{0.083333333333333}{x} + \frac{\mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right)}{\frac{x}{z}}\right) \]
Alternative 2
Error1.5
Cost9548
\[\begin{array}{l} t_0 := x \cdot \log x - x\\ t_1 := z \cdot \left(-0.0027777777777778 + z \cdot \left(0.0007936500793651 + y\right)\right)\\ t_2 := z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right) + t_0\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{+64}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{-68}:\\ \;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \log x \cdot \left(x + -0.5\right)\right) - x\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+166}:\\ \;\;\;\;\frac{0.083333333333333 + t_1}{x} + t_0\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error1.9
Cost9160
\[\begin{array}{l} t_0 := z \cdot \left(-0.0027777777777778 + z \cdot \left(0.0007936500793651 + y\right)\right)\\ t_1 := z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right) + \left(x \cdot \log x - x\right)\\ \mathbf{if}\;t_0 \leq -1 \cdot 10^{+64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_0 \leq 10^{+18}:\\ \;\;\;\;\left(\left(\log x \cdot \left(x + -0.5\right) - x\right) + 0.91893853320467\right) + \left(\frac{0.083333333333333}{x} + \frac{z \cdot \left(-0.0027777777777778 + z \cdot 0.0007936500793651\right)}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error0.4
Cost8004
\[\begin{array}{l} t_0 := \left(\log x \cdot \left(x + -0.5\right) - x\right) + 0.91893853320467\\ \mathbf{if}\;x \leq 10000000:\\ \;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(0.0007936500793651 + y\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;t_0 + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \end{array} \]
Alternative 5
Error1.7
Cost7872
\[\left(\left(\log x \cdot \left(x + -0.5\right) - x\right) + 0.91893853320467\right) + \left(\frac{0.083333333333333}{x} + \frac{z}{x} \cdot \left(z \cdot \left(0.0007936500793651 + y\right)\right)\right) \]
Alternative 6
Error1.4
Cost7492
\[\begin{array}{l} \mathbf{if}\;x \leq 0.0001:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(0.0007936500793651 + y\right)\right)}{x} - x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right) + \left(x \cdot \log x - x\right)\\ \end{array} \]
Alternative 7
Error6.7
Cost7364
\[\begin{array}{l} \mathbf{if}\;x \leq 0.0085:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(0.0007936500793651 + y\right)\right)}{x} - x\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.91893853320467 + \frac{0.083333333333333}{x}\right) + \log x \cdot \left(x + -0.5\right)\right) - x\\ \end{array} \]
Alternative 8
Error6.9
Cost7108
\[\begin{array}{l} \mathbf{if}\;x \leq 0.0085:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(0.0007936500793651 + y\right)\right)}{x} - x\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 - x\right) + \log x \cdot \left(x + -0.5\right)\\ \end{array} \]
Alternative 9
Error35.4
Cost1092
\[\begin{array}{l} \mathbf{if}\;x \leq 6.399725331751314 \cdot 10^{+58}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(0.0007936500793651 + y\right)\right)}{x} - x\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{0.0069444444444443885}{x \cdot x} + -0.8444480278083504}{\frac{0.083333333333333}{x} + -0.91893853320467}\\ \end{array} \]
Alternative 10
Error42.7
Cost448
\[0.91893853320467 + \frac{\frac{1}{x}}{12.000000000000048} \]
Alternative 11
Error42.7
Cost448
\[0.91893853320467 + \frac{1}{x \cdot 12.000000000000048} \]
Alternative 12
Error42.7
Cost320
\[0.91893853320467 + \frac{0.083333333333333}{x} \]
Alternative 13
Error43.3
Cost192
\[\frac{0.083333333333333}{x} \]
Alternative 14
Error60.9
Cost64
\[0.91893853320467 \]

Error

Reproduce

herbie shell --seed 2022316 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
  :precision binary64

  :herbie-target
  (+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))

  (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))