Average Error: 6.2 → 0.7
Time: 20.5s
Precision: binary64
Cost: 40776
\[\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} t_0 := z \cdot \left(-0.0027777777777778 + \left(y + 0.0007936500793651\right) \cdot z\right)\\ t_1 := \mathsf{fma}\left(\log x, 0.5 - x, \mathsf{expm1}\left(\mathsf{log1p}\left(x\right)\right)\right)\\ \mathbf{if}\;t_0 \leq -\infty:\\ \;\;\;\;0.91893853320467 + \left(\frac{y}{\frac{x}{z \cdot z}} - t_1\right)\\ \mathbf{elif}\;t_0 \leq 10^{+302}:\\ \;\;\;\;0.91893853320467 + \left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x} - t_1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \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
 (let* ((t_0 (* z (+ -0.0027777777777778 (* (+ y 0.0007936500793651) z))))
        (t_1 (fma (log x) (- 0.5 x) (expm1 (log1p x)))))
   (if (<= t_0 (- INFINITY))
     (+ 0.91893853320467 (- (/ y (/ x (* z z))) t_1))
     (if (<= t_0 1e+302)
       (+
        0.91893853320467
        (-
         (/
          (fma
           z
           (fma (+ y 0.0007936500793651) z -0.0027777777777778)
           0.083333333333333)
          x)
         t_1))
       (+
        (+ 0.91893853320467 (- (* (log x) (+ x -0.5)) x))
        (/ z (/ (/ x (+ y 0.0007936500793651)) z)))))))
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 t_0 = z * (-0.0027777777777778 + ((y + 0.0007936500793651) * z));
	double t_1 = fma(log(x), (0.5 - x), expm1(log1p(x)));
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = 0.91893853320467 + ((y / (x / (z * z))) - t_1);
	} else if (t_0 <= 1e+302) {
		tmp = 0.91893853320467 + ((fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x) - t_1);
	} else {
		tmp = (0.91893853320467 + ((log(x) * (x + -0.5)) - x)) + (z / ((x / (y + 0.0007936500793651)) / z));
	}
	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)
	t_0 = Float64(z * Float64(-0.0027777777777778 + Float64(Float64(y + 0.0007936500793651) * z)))
	t_1 = fma(log(x), Float64(0.5 - x), expm1(log1p(x)))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(0.91893853320467 + Float64(Float64(y / Float64(x / Float64(z * z))) - t_1));
	elseif (t_0 <= 1e+302)
		tmp = Float64(0.91893853320467 + Float64(Float64(fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x) - t_1));
	else
		tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x + -0.5)) - x)) + Float64(z / Float64(Float64(x / Float64(y + 0.0007936500793651)) / z)));
	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_] := Block[{t$95$0 = N[(z * N[(-0.0027777777777778 + N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Log[x], $MachinePrecision] * N[(0.5 - x), $MachinePrecision] + N[(Exp[N[Log[1 + x], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.91893853320467 + N[(N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+302], N[(0.91893853320467 + N[(N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(z / N[(N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] / z), $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}
t_0 := z \cdot \left(-0.0027777777777778 + \left(y + 0.0007936500793651\right) \cdot z\right)\\
t_1 := \mathsf{fma}\left(\log x, 0.5 - x, \mathsf{expm1}\left(\mathsf{log1p}\left(x\right)\right)\right)\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;0.91893853320467 + \left(\frac{y}{\frac{x}{z \cdot z}} - t_1\right)\\

\mathbf{elif}\;t_0 \leq 10^{+302}:\\
\;\;\;\;0.91893853320467 + \left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x} - t_1\right)\\

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


\end{array}

Error

Target

Original6.2
Target1.3
Herbie0.7
\[\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 3 regimes
  2. if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < -inf.0

    1. Initial program 64.0

      \[\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. Simplified64.0

      \[\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))): 12 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))): 0 points increase in error, 12 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))): 22 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, 22 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-+l-_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))): 22 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)))): 0 points increase in error, 22 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<= *-commutative_binary64 (*.f64 (neg.f64 (-.f64 x 1/2)) (log.f64 x))) x))): 0 points increase in error, 22 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 (*.f64 (neg.f64 (-.f64 x 1/2)) (log.f64 x)))))): 22 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<= cancel-sign-sub-inv_binary64 (-.f64 x (*.f64 (-.f64 x 1/2) (log.f64 x)))))): 0 points increase in error, 22 points decrease in error
      (+.f64 91893853320467/100000000000000 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 (/.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))))): 22 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (+.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (/.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
      (+.f64 91893853320467/100000000000000 (Rewrite<= associate-+r+_binary64 (+.f64 (/.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, 22 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 (*.f64 (-.f64 x 1/2) (log.f64 x)) (neg.f64 x))))): 22 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 (*.f64 (-.f64 x 1/2) (log.f64 x)) x)))): 0 points increase in error, 10 points decrease in error
      (+.f64 91893853320467/100000000000000 (Rewrite=> +-commutative_binary64 (+.f64 (-.f64 (*.f64 (-.f64 x 1/2) (log.f64 x)) x) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)))): 0 points increase in error, 12 points decrease in error
      (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 91893853320467/100000000000000 (-.f64 (*.f64 (-.f64 x 1/2) (log.f64 x)) x)) (/.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
      (+.f64 (Rewrite<= +-commutative_binary64 (+.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)): 0 points increase in error, 0 points decrease in error
    3. Applied egg-rr64.0

      \[\leadsto 0.91893853320467 + \left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x} - \color{blue}{\left(e^{\mathsf{log1p}\left(x\right)} - \left(1 - \log x \cdot \left(0.5 - x\right)\right)\right)}\right) \]
    4. Simplified64.0

      \[\leadsto 0.91893853320467 + \left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x} - \color{blue}{\mathsf{fma}\left(\log x, 0.5 - x, \mathsf{expm1}\left(\mathsf{log1p}\left(x\right)\right)\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) (expm1.f64 (log1p.f64 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 -13888888888889/5000000000000000) 83333333333333/1000000000000000) x) (fma.f64 (log.f64 x) (-.f64 1/2 x) (Rewrite<= expm1-def_binary64 (-.f64 (exp.f64 (log1p.f64 x)) 1))))): 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 -13888888888889/5000000000000000) 83333333333333/1000000000000000) x) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (log.f64 x) (-.f64 1/2 x)) (-.f64 (exp.f64 (log1p.f64 x)) 1))))): 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 -13888888888889/5000000000000000) 83333333333333/1000000000000000) x) (Rewrite=> +-commutative_binary64 (+.f64 (-.f64 (exp.f64 (log1p.f64 x)) 1) (*.f64 (log.f64 x) (-.f64 1/2 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 -13888888888889/5000000000000000) 83333333333333/1000000000000000) x) (Rewrite<= associate--r-_binary64 (-.f64 (exp.f64 (log1p.f64 x)) (-.f64 1 (*.f64 (log.f64 x) (-.f64 1/2 x))))))): 3 points increase in error, 0 points decrease in error
    5. Taylor expanded in y around inf 64.0

      \[\leadsto 0.91893853320467 + \left(\color{blue}{\frac{y \cdot {z}^{2}}{x}} - \mathsf{fma}\left(\log x, 0.5 - x, \mathsf{expm1}\left(\mathsf{log1p}\left(x\right)\right)\right)\right) \]
    6. Simplified24.5

      \[\leadsto 0.91893853320467 + \left(\color{blue}{\frac{y}{\frac{x}{z \cdot z}}} - \mathsf{fma}\left(\log x, 0.5 - x, \mathsf{expm1}\left(\mathsf{log1p}\left(x\right)\right)\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) (expm1.f64 (log1p.f64 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 -13888888888889/5000000000000000) 83333333333333/1000000000000000) x) (fma.f64 (log.f64 x) (-.f64 1/2 x) (Rewrite<= expm1-def_binary64 (-.f64 (exp.f64 (log1p.f64 x)) 1))))): 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 -13888888888889/5000000000000000) 83333333333333/1000000000000000) x) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (log.f64 x) (-.f64 1/2 x)) (-.f64 (exp.f64 (log1p.f64 x)) 1))))): 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 -13888888888889/5000000000000000) 83333333333333/1000000000000000) x) (Rewrite=> +-commutative_binary64 (+.f64 (-.f64 (exp.f64 (log1p.f64 x)) 1) (*.f64 (log.f64 x) (-.f64 1/2 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 -13888888888889/5000000000000000) 83333333333333/1000000000000000) x) (Rewrite<= associate--r-_binary64 (-.f64 (exp.f64 (log1p.f64 x)) (-.f64 1 (*.f64 (log.f64 x) (-.f64 1/2 x))))))): 3 points increase in error, 0 points decrease in error

    if -inf.0 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 1.0000000000000001e302

    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} \]
    2. Simplified0.3

      \[\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))): 12 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))): 0 points increase in error, 12 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))): 22 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, 22 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-+l-_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))): 22 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)))): 0 points increase in error, 22 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<= *-commutative_binary64 (*.f64 (neg.f64 (-.f64 x 1/2)) (log.f64 x))) x))): 0 points increase in error, 22 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 (*.f64 (neg.f64 (-.f64 x 1/2)) (log.f64 x)))))): 22 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<= cancel-sign-sub-inv_binary64 (-.f64 x (*.f64 (-.f64 x 1/2) (log.f64 x)))))): 0 points increase in error, 22 points decrease in error
      (+.f64 91893853320467/100000000000000 (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 (/.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))))): 22 points increase in error, 0 points decrease in error
      (+.f64 91893853320467/100000000000000 (+.f64 (Rewrite<= unsub-neg_binary64 (+.f64 (/.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
      (+.f64 91893853320467/100000000000000 (Rewrite<= associate-+r+_binary64 (+.f64 (/.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, 22 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 (*.f64 (-.f64 x 1/2) (log.f64 x)) (neg.f64 x))))): 22 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 (*.f64 (-.f64 x 1/2) (log.f64 x)) x)))): 0 points increase in error, 10 points decrease in error
      (+.f64 91893853320467/100000000000000 (Rewrite=> +-commutative_binary64 (+.f64 (-.f64 (*.f64 (-.f64 x 1/2) (log.f64 x)) x) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)))): 0 points increase in error, 12 points decrease in error
      (Rewrite<= associate-+l+_binary64 (+.f64 (+.f64 91893853320467/100000000000000 (-.f64 (*.f64 (-.f64 x 1/2) (log.f64 x)) x)) (/.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
      (+.f64 (Rewrite<= +-commutative_binary64 (+.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)): 0 points increase in error, 0 points decrease in error
    3. Applied egg-rr0.3

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

      \[\leadsto 0.91893853320467 + \left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x} - \color{blue}{\mathsf{fma}\left(\log x, 0.5 - x, \mathsf{expm1}\left(\mathsf{log1p}\left(x\right)\right)\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) (expm1.f64 (log1p.f64 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 -13888888888889/5000000000000000) 83333333333333/1000000000000000) x) (fma.f64 (log.f64 x) (-.f64 1/2 x) (Rewrite<= expm1-def_binary64 (-.f64 (exp.f64 (log1p.f64 x)) 1))))): 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 -13888888888889/5000000000000000) 83333333333333/1000000000000000) x) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (log.f64 x) (-.f64 1/2 x)) (-.f64 (exp.f64 (log1p.f64 x)) 1))))): 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 -13888888888889/5000000000000000) 83333333333333/1000000000000000) x) (Rewrite=> +-commutative_binary64 (+.f64 (-.f64 (exp.f64 (log1p.f64 x)) 1) (*.f64 (log.f64 x) (-.f64 1/2 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 -13888888888889/5000000000000000) 83333333333333/1000000000000000) x) (Rewrite<= associate--r-_binary64 (-.f64 (exp.f64 (log1p.f64 x)) (-.f64 1 (*.f64 (log.f64 x) (-.f64 1/2 x))))))): 3 points increase in error, 0 points decrease in error

    if 1.0000000000000001e302 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z)

    1. Initial program 61.7

      \[\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. Taylor expanded in z around inf 62.3

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}} \]
    3. Simplified48.9

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{z \cdot z}{x} \cdot \left(0.0007936500793651 + y\right)} \]
      Proof
      (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x 1/2) (log.f64 x)) x) 91893853320467/100000000000000) (*.f64 (/.f64 (*.f64 z z) x) (+.f64 7936500793651/10000000000000000 y))): 0 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x 1/2) (log.f64 x)) x) 91893853320467/100000000000000) (*.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 z 2)) x) (+.f64 7936500793651/10000000000000000 y))): 4 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x 1/2) (log.f64 x)) x) 91893853320467/100000000000000) (Rewrite<= associate-/r/_binary64 (/.f64 (pow.f64 z 2) (/.f64 x (+.f64 7936500793651/10000000000000000 y))))): 4 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x 1/2) (log.f64 x)) x) 91893853320467/100000000000000) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 z 2) (+.f64 7936500793651/10000000000000000 y)) x))): 0 points increase in error, 4 points decrease in error
    4. Applied egg-rr0.4

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{z}{\frac{\frac{x}{0.0007936500793651 + y}}{z}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot \left(-0.0027777777777778 + \left(y + 0.0007936500793651\right) \cdot z\right) \leq -\infty:\\ \;\;\;\;0.91893853320467 + \left(\frac{y}{\frac{x}{z \cdot z}} - \mathsf{fma}\left(\log x, 0.5 - x, \mathsf{expm1}\left(\mathsf{log1p}\left(x\right)\right)\right)\right)\\ \mathbf{elif}\;z \cdot \left(-0.0027777777777778 + \left(y + 0.0007936500793651\right) \cdot z\right) \leq 10^{+302}:\\ \;\;\;\;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, \mathsf{expm1}\left(\mathsf{log1p}\left(x\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]

Alternatives

Alternative 1
Error0.9
Cost27976
\[\begin{array}{l} t_0 := z \cdot \left(-0.0027777777777778 + \left(y + 0.0007936500793651\right) \cdot z\right)\\ \mathbf{if}\;t_0 \leq -\infty:\\ \;\;\;\;0.91893853320467 + \left(\frac{y}{\frac{x}{z \cdot z}} - \mathsf{fma}\left(\log x, 0.5 - x, \mathsf{expm1}\left(\mathsf{log1p}\left(x\right)\right)\right)\right)\\ \mathbf{elif}\;t_0 \leq 10^{+273}:\\ \;\;\;\;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)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
Alternative 2
Error0.9
Cost27976
\[\begin{array}{l} t_0 := z \cdot \left(-0.0027777777777778 + \left(y + 0.0007936500793651\right) \cdot z\right)\\ \mathbf{if}\;t_0 \leq -\infty:\\ \;\;\;\;0.91893853320467 + \left(\frac{y}{\frac{x}{z \cdot z}} - \mathsf{fma}\left(\log x, 0.5 - x, \mathsf{expm1}\left(\mathsf{log1p}\left(x\right)\right)\right)\right)\\ \mathbf{elif}\;t_0 \leq 10^{+273}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x} + \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
Alternative 3
Error2.5
Cost9160
\[\begin{array}{l} t_0 := z \cdot \left(-0.0027777777777778 + \left(y + 0.0007936500793651\right) \cdot z\right)\\ t_1 := 0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\ \mathbf{if}\;t_0 \leq -1 \cdot 10^{+67}:\\ \;\;\;\;\left(x \cdot \log x - x\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ \mathbf{elif}\;t_0 \leq 2 \cdot 10^{+53}:\\ \;\;\;\;t_1 + \left(\frac{0.083333333333333}{x} + \frac{z}{x} \cdot \left(-0.0027777777777778 + 0.0007936500793651 \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
Alternative 4
Error0.6
Cost8004
\[\begin{array}{l} t_0 := 0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\ \mathbf{if}\;x \leq 1.2 \cdot 10^{+51}:\\ \;\;\;\;t_0 + \frac{z \cdot \left(-0.0027777777777778 + \left(y + 0.0007936500793651\right) \cdot z\right) + 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
Alternative 5
Error0.6
Cost8004
\[\begin{array}{l} t_0 := \log x \cdot \left(x + -0.5\right)\\ \mathbf{if}\;x \leq 1.2 \cdot 10^{+51}:\\ \;\;\;\;\left(t_0 + \left(0.91893853320467 - x\right)\right) + \frac{z \cdot \left(-0.0027777777777778 + \left(y + 0.0007936500793651\right) \cdot z\right) + 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(t_0 - x\right)\right) + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
Alternative 6
Error5.2
Cost7884
\[\begin{array}{l} t_0 := 0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\ t_1 := x \cdot \log x - x\\ \mathbf{if}\;z \leq -10.2:\\ \;\;\;\;t_1 + \frac{z}{x} \cdot \left(0.0007936500793651 \cdot z\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-5}:\\ \;\;\;\;t_0 + \frac{1}{x \cdot 12.000000000000048}\\ \mathbf{elif}\;z \leq 10^{+151}:\\ \;\;\;\;t_1 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;t_0 + z \cdot \frac{z}{\frac{x}{0.0007936500793651}}\\ \end{array} \]
Alternative 7
Error4.1
Cost7881
\[\begin{array}{l} t_0 := 0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{-5} \lor \neg \left(z \leq 2.75 \cdot 10^{-5}\right):\\ \;\;\;\;t_0 + z \cdot \frac{\left(y + 0.0007936500793651\right) \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{1}{x \cdot 12.000000000000048}\\ \end{array} \]
Alternative 8
Error3.1
Cost7881
\[\begin{array}{l} t_0 := 0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\ \mathbf{if}\;z \leq -1.02 \cdot 10^{-5} \lor \neg \left(z \leq 0.75\right):\\ \;\;\;\;t_0 + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{1}{x \cdot 12.000000000000048}\\ \end{array} \]
Alternative 9
Error5.2
Cost7756
\[\begin{array}{l} t_0 := x \cdot \log x - x\\ t_1 := t_0 + \frac{z}{x} \cdot \left(0.0007936500793651 \cdot z\right)\\ \mathbf{if}\;z \leq -10.8:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-5}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{1}{x \cdot 12.000000000000048}\\ \mathbf{elif}\;z \leq 10^{+151}:\\ \;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error1.1
Cost7748
\[\begin{array}{l} \mathbf{if}\;x \leq 0.0102:\\ \;\;\;\;\frac{z \cdot \left(-0.0027777777777778 + \left(y + 0.0007936500793651\right) \cdot z\right) + 0.083333333333333}{x} + \left(x \cdot \log x - x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
Alternative 11
Error6.5
Cost7625
\[\begin{array}{l} \mathbf{if}\;z \leq -10.2 \lor \neg \left(z \leq 10.2\right):\\ \;\;\;\;\left(x \cdot \log x - x\right) + \frac{z}{x} \cdot \left(0.0007936500793651 \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{1}{x \cdot 12.000000000000048}\\ \end{array} \]
Alternative 12
Error6.5
Cost7497
\[\begin{array}{l} \mathbf{if}\;z \leq -14.6 \lor \neg \left(z \leq 12\right):\\ \;\;\;\;\left(x \cdot \log x - x\right) + \frac{z}{x} \cdot \left(0.0007936500793651 \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 13
Error6.5
Cost7497
\[\begin{array}{l} \mathbf{if}\;z \leq -14.5 \lor \neg \left(z \leq 10.2\right):\\ \;\;\;\;\left(x \cdot \log x - x\right) + \frac{z}{x} \cdot \left(0.0007936500793651 \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\log x \cdot \left(x + -0.5\right) + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 14
Error11.3
Cost7232
\[\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{0.083333333333333}{x} \]
Alternative 15
Error12.3
Cost7104
\[\frac{0.083333333333333}{x} + x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right) \]
Alternative 16
Error12.3
Cost6976
\[\left(x \cdot \log x - x\right) + \frac{0.083333333333333}{x} \]
Alternative 17
Error43.0
Cost6656
\[{\left(x \cdot 12.000000000000048\right)}^{-1} \]
Alternative 18
Error43.1
Cost320
\[0.083333333333333 \cdot \frac{1}{x} \]
Alternative 19
Error43.1
Cost192
\[\frac{0.083333333333333}{x} \]

Error

Reproduce

herbie shell --seed 2022341 
(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)))