Average Error: 6.4 → 0.3
Time: 21.9s
Precision: binary64
Cost: 55368
\[\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 := \left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x}\\ t_1 := 0.91893853320467 + x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;t_0 \leq -4 \cdot 10^{+307}:\\ \;\;\;\;t_1 + y \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;t_0 \leq 5 \cdot 10^{+305}:\\ \;\;\;\;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}:\\ \;\;\;\;t_1 + \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
         (+
          (+ (- (* (+ x -0.5) (log x)) x) 0.91893853320467)
          (/
           (+
            (* z (+ (* z (+ y 0.0007936500793651)) -0.0027777777777778))
            0.083333333333333)
           x)))
        (t_1 (+ 0.91893853320467 (* x (+ (log x) -1.0)))))
   (if (<= t_0 -4e+307)
     (+ t_1 (* y (* z (/ z x))))
     (if (<= t_0 5e+305)
       (+
        0.91893853320467
        (-
         (/
          (fma
           z
           (fma (+ y 0.0007936500793651) z -0.0027777777777778)
           0.083333333333333)
          x)
         (fma (log x) (- 0.5 x) (expm1 (log1p x)))))
       (+ t_1 (/ 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 = ((((x + -0.5) * log(x)) - x) + 0.91893853320467) + (((z * ((z * (y + 0.0007936500793651)) + -0.0027777777777778)) + 0.083333333333333) / x);
	double t_1 = 0.91893853320467 + (x * (log(x) + -1.0));
	double tmp;
	if (t_0 <= -4e+307) {
		tmp = t_1 + (y * (z * (z / x)));
	} else if (t_0 <= 5e+305) {
		tmp = 0.91893853320467 + ((fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x) - fma(log(x), (0.5 - x), expm1(log1p(x))));
	} else {
		tmp = t_1 + (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(Float64(Float64(Float64(Float64(x + -0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) + -0.0027777777777778)) + 0.083333333333333) / x))
	t_1 = Float64(0.91893853320467 + Float64(x * Float64(log(x) + -1.0)))
	tmp = 0.0
	if (t_0 <= -4e+307)
		tmp = Float64(t_1 + Float64(y * Float64(z * Float64(z / x))));
	elseif (t_0 <= 5e+305)
		tmp = Float64(0.91893853320467 + Float64(Float64(fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x) - fma(log(x), Float64(0.5 - x), expm1(log1p(x)))));
	else
		tmp = Float64(t_1 + 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[(N[(N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] + -0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.91893853320467 + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -4e+307], N[(t$95$1 + N[(y * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+305], N[(0.91893853320467 + N[(N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] - N[(N[Log[x], $MachinePrecision] * N[(0.5 - x), $MachinePrecision] + N[(Exp[N[Log[1 + x], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + 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 := \left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x}\\
t_1 := 0.91893853320467 + x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;t_0 \leq -4 \cdot 10^{+307}:\\
\;\;\;\;t_1 + y \cdot \left(z \cdot \frac{z}{x}\right)\\

\mathbf{elif}\;t_0 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;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}:\\
\;\;\;\;t_1 + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\


\end{array}

Error

Target

Original6.4
Target1.4
Herbie0.3
\[\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 (-.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)) < -3.99999999999999994e307

    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. Taylor expanded in x around inf 64.0

      \[\leadsto \left(\color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \cdot x} + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    3. Simplified64.0

      \[\leadsto \left(\color{blue}{x \cdot \left(\log x - 1\right)} + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      Proof
      (+.f64 (+.f64 (*.f64 x (-.f64 (log.f64 x) 1)) 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
      (+.f64 (+.f64 (*.f64 x (Rewrite=> sub-neg_binary64 (+.f64 (log.f64 x) (neg.f64 1)))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 x (+.f64 (log.f64 x) (Rewrite=> metadata-eval -1))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 0 points increase in error, 11 points decrease in error
      (+.f64 (+.f64 (Rewrite=> distribute-lft-in_binary64 (+.f64 (*.f64 x (log.f64 x)) (*.f64 x -1))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (+.f64 (*.f64 x (Rewrite<= remove-double-neg_binary64 (neg.f64 (neg.f64 (log.f64 x))))) (*.f64 x -1)) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 0 points increase in error, 11 points decrease in error
      (+.f64 (+.f64 (+.f64 (*.f64 x (neg.f64 (Rewrite<= log-rec_binary64 (log.f64 (/.f64 1 x))))) (*.f64 x -1)) 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
      (+.f64 (+.f64 (+.f64 (*.f64 x (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (log.f64 (/.f64 1 x))))) (*.f64 x -1)) 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
      (+.f64 (+.f64 (Rewrite<= distribute-lft-in_binary64 (*.f64 x (+.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) -1))) 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
      (+.f64 (+.f64 (*.f64 x (+.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) (Rewrite<= metadata-eval (neg.f64 1)))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 x (Rewrite<= sub-neg_binary64 (-.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) 1))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 0 points increase in error, 11 points decrease in error
      (+.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) 1) x)) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
    4. Taylor expanded in z around inf 64.0

      \[\leadsto \left(x \cdot \left(\log x - 1\right) + 0.91893853320467\right) + \color{blue}{\frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}} \]
    5. Simplified21.8

      \[\leadsto \left(x \cdot \left(\log x - 1\right) + 0.91893853320467\right) + \color{blue}{\frac{z \cdot z}{x} \cdot \left(0.0007936500793651 + y\right)} \]
      Proof
      (+.f64 (+.f64 (*.f64 x (-.f64 (log.f64 x) 1)) 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
      (+.f64 (+.f64 (*.f64 x (Rewrite=> sub-neg_binary64 (+.f64 (log.f64 x) (neg.f64 1)))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 x (+.f64 (log.f64 x) (Rewrite=> metadata-eval -1))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 0 points increase in error, 11 points decrease in error
      (+.f64 (+.f64 (Rewrite=> distribute-lft-in_binary64 (+.f64 (*.f64 x (log.f64 x)) (*.f64 x -1))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (+.f64 (*.f64 x (Rewrite<= remove-double-neg_binary64 (neg.f64 (neg.f64 (log.f64 x))))) (*.f64 x -1)) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 0 points increase in error, 11 points decrease in error
      (+.f64 (+.f64 (+.f64 (*.f64 x (neg.f64 (Rewrite<= log-rec_binary64 (log.f64 (/.f64 1 x))))) (*.f64 x -1)) 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
      (+.f64 (+.f64 (+.f64 (*.f64 x (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (log.f64 (/.f64 1 x))))) (*.f64 x -1)) 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
      (+.f64 (+.f64 (Rewrite<= distribute-lft-in_binary64 (*.f64 x (+.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) -1))) 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
      (+.f64 (+.f64 (*.f64 x (+.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) (Rewrite<= metadata-eval (neg.f64 1)))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 x (Rewrite<= sub-neg_binary64 (-.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) 1))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 0 points increase in error, 11 points decrease in error
      (+.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) 1) x)) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
    6. Taylor expanded in y around inf 64.0

      \[\leadsto \left(x \cdot \left(\log x - 1\right) + 0.91893853320467\right) + \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
    7. Simplified0.7

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

      \[\leadsto \left(x \cdot \left(\log x - 1\right) + 0.91893853320467\right) + \color{blue}{\left(z \cdot \frac{z}{x}\right) \cdot y} \]

    if -3.99999999999999994e307 < (+.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)) < 5.00000000000000009e305

    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))): 22 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, 22 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, 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<= 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-+l-_binary64 (-.f64 0 (-.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) (fma.f64 (log.f64 x) (Rewrite<= neg-sub0_binary64 (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) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (log.f64 x) (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) (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (neg.f64 (-.f64 x 1/2)) (log.f64 x))) x))): 0 points increase in error, 10 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)))))): 0 points increase in error, 12 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, 0 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))))): 0 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, 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 (*.f64 (-.f64 x 1/2) (log.f64 x)) (neg.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 (*.f64 (-.f64 x 1/2) (log.f64 x)) x)))): 12 points increase in error, 0 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))): 22 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, 22 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))))): 5 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, 5 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)))))): 5 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))))))): 0 points increase in error, 5 points decrease in error

    if 5.00000000000000009e305 < (+.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. Initial program 57.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. Taylor expanded in x around inf 57.6

      \[\leadsto \left(\color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \cdot x} + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    3. Simplified57.4

      \[\leadsto \left(\color{blue}{x \cdot \left(\log x - 1\right)} + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      Proof
      (+.f64 (+.f64 (*.f64 x (-.f64 (log.f64 x) 1)) 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
      (+.f64 (+.f64 (*.f64 x (Rewrite=> sub-neg_binary64 (+.f64 (log.f64 x) (neg.f64 1)))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 x (+.f64 (log.f64 x) (Rewrite=> metadata-eval -1))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 0 points increase in error, 11 points decrease in error
      (+.f64 (+.f64 (Rewrite=> distribute-lft-in_binary64 (+.f64 (*.f64 x (log.f64 x)) (*.f64 x -1))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (+.f64 (*.f64 x (Rewrite<= remove-double-neg_binary64 (neg.f64 (neg.f64 (log.f64 x))))) (*.f64 x -1)) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 0 points increase in error, 11 points decrease in error
      (+.f64 (+.f64 (+.f64 (*.f64 x (neg.f64 (Rewrite<= log-rec_binary64 (log.f64 (/.f64 1 x))))) (*.f64 x -1)) 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
      (+.f64 (+.f64 (+.f64 (*.f64 x (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (log.f64 (/.f64 1 x))))) (*.f64 x -1)) 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
      (+.f64 (+.f64 (Rewrite<= distribute-lft-in_binary64 (*.f64 x (+.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) -1))) 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
      (+.f64 (+.f64 (*.f64 x (+.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) (Rewrite<= metadata-eval (neg.f64 1)))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 x (Rewrite<= sub-neg_binary64 (-.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) 1))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 0 points increase in error, 11 points decrease in error
      (+.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) 1) x)) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
    4. Taylor expanded in z around inf 58.7

      \[\leadsto \left(x \cdot \left(\log x - 1\right) + 0.91893853320467\right) + \color{blue}{\frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}} \]
    5. Simplified47.4

      \[\leadsto \left(x \cdot \left(\log x - 1\right) + 0.91893853320467\right) + \color{blue}{\frac{z \cdot z}{x} \cdot \left(0.0007936500793651 + y\right)} \]
      Proof
      (+.f64 (+.f64 (*.f64 x (-.f64 (log.f64 x) 1)) 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
      (+.f64 (+.f64 (*.f64 x (Rewrite=> sub-neg_binary64 (+.f64 (log.f64 x) (neg.f64 1)))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 x (+.f64 (log.f64 x) (Rewrite=> metadata-eval -1))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 0 points increase in error, 11 points decrease in error
      (+.f64 (+.f64 (Rewrite=> distribute-lft-in_binary64 (+.f64 (*.f64 x (log.f64 x)) (*.f64 x -1))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (+.f64 (*.f64 x (Rewrite<= remove-double-neg_binary64 (neg.f64 (neg.f64 (log.f64 x))))) (*.f64 x -1)) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 0 points increase in error, 11 points decrease in error
      (+.f64 (+.f64 (+.f64 (*.f64 x (neg.f64 (Rewrite<= log-rec_binary64 (log.f64 (/.f64 1 x))))) (*.f64 x -1)) 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
      (+.f64 (+.f64 (+.f64 (*.f64 x (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (log.f64 (/.f64 1 x))))) (*.f64 x -1)) 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
      (+.f64 (+.f64 (Rewrite<= distribute-lft-in_binary64 (*.f64 x (+.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) -1))) 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
      (+.f64 (+.f64 (*.f64 x (+.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) (Rewrite<= metadata-eval (neg.f64 1)))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
      (+.f64 (+.f64 (*.f64 x (Rewrite<= sub-neg_binary64 (-.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) 1))) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 0 points increase in error, 11 points decrease in error
      (+.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (-.f64 (*.f64 -1 (log.f64 (/.f64 1 x))) 1) x)) 91893853320467/100000000000000) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) 83333333333333/1000000000000000) x)): 11 points increase in error, 0 points decrease in error
    6. Applied egg-rr1.8

      \[\leadsto \left(x \cdot \left(\log x - 1\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.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x} \leq -4 \cdot 10^{+307}:\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + y \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x} \leq 5 \cdot 10^{+305}:\\ \;\;\;\;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 + x \cdot \left(\log x + -1\right)\right) + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]

Alternatives

Alternative 1
Error0.4
Cost36680
\[\begin{array}{l} t_0 := \left(x + -0.5\right) \cdot \log x\\ t_1 := 0.91893853320467 + x \cdot \left(\log x + -1\right)\\ t_2 := \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x}\\ t_3 := \left(\left(t_0 - x\right) + 0.91893853320467\right) + t_2\\ \mathbf{if}\;t_3 \leq -4 \cdot 10^{+307}:\\ \;\;\;\;t_1 + y \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;t_3 \leq 5 \cdot 10^{+305}:\\ \;\;\;\;t_2 + \left(0.91893853320467 + \left(t_0 + \left(1 - e^{\mathsf{log1p}\left(x\right)}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
Alternative 2
Error0.5
Cost23752
\[\begin{array}{l} t_0 := \left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x}\\ t_1 := 0.91893853320467 + x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;t_0 \leq -4 \cdot 10^{+307}:\\ \;\;\;\;t_1 + y \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;t_0 \leq 5 \cdot 10^{+305}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1 + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
Alternative 3
Error5.5
Cost7888
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ t_1 := t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ t_2 := t_0 + \frac{y}{\frac{\frac{x}{z}}{z}}\\ \mathbf{if}\;z \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-33}:\\ \;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+143}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error5.5
Cost7888
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ t_1 := t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ \mathbf{if}\;z \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;t_0 + \frac{y}{\frac{\frac{x}{z}}{z}}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-33}:\\ \;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+143}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + t_0\right) + z \cdot \left(y \cdot \frac{z}{x}\right)\\ \end{array} \]
Alternative 5
Error4.4
Cost7888
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ t_1 := t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ t_2 := \left(0.91893853320467 + t_0\right) + z \cdot \left(z \cdot \frac{0.0007936500793651}{x}\right)\\ \mathbf{if}\;z \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{-65}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-33}:\\ \;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{+154}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Error4.4
Cost7888
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ t_1 := t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ t_2 := \left(0.91893853320467 + t_0\right) + z \cdot \left(z \cdot \frac{0.0007936500793651}{x}\right)\\ \mathbf{if}\;z \leq -1 \cdot 10^{+154}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{-33}:\\ \;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048}\\ \mathbf{elif}\;z \leq 1.32 \cdot 10^{+154}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 7
Error1.2
Cost7876
\[\begin{array}{l} \mathbf{if}\;x \leq 8000:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \frac{0.083333333333333 + \left(z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right) + z \cdot -0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \left(z \cdot \frac{z}{x}\right) \cdot \left(y + 0.0007936500793651\right)\\ \end{array} \]
Alternative 8
Error10.8
Cost7761
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ t_1 := t_0 + \frac{y}{\frac{\frac{x}{z}}{z}}\\ \mathbf{if}\;z \leq -1.62 \cdot 10^{+46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -350000:\\ \;\;\;\;0.91893853320467 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-64} \lor \neg \left(z \leq 1.65 \cdot 10^{-34}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + t_0\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 9
Error10.0
Cost7761
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right) + \frac{y}{\frac{\frac{x}{z}}{z}}\\ \mathbf{if}\;z \leq -1.62 \cdot 10^{+46}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -350000:\\ \;\;\;\;0.91893853320467 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-65} \lor \neg \left(z \leq 1.7 \cdot 10^{-34}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x + -0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 10
Error3.5
Cost7756
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ t_1 := 0.91893853320467 + t_0\\ \mathbf{if}\;x \leq 8000:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)}{x}\\ \mathbf{elif}\;x \leq 1.82 \cdot 10^{+77}:\\ \;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ \mathbf{elif}\;x \leq 5 \cdot 10^{+174}:\\ \;\;\;\;t_1 + z \cdot \left(z \cdot \frac{0.0007936500793651}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + z \cdot \left(y \cdot \frac{z}{x}\right)\\ \end{array} \]
Alternative 11
Error1.2
Cost7748
\[\begin{array}{l} \mathbf{if}\;x \leq 8000:\\ \;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \left(z \cdot \frac{z}{x}\right) \cdot \left(y + 0.0007936500793651\right)\\ \end{array} \]
Alternative 12
Error1.6
Cost7620
\[\begin{array}{l} \mathbf{if}\;x \leq 0.00192:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \left(z \cdot \frac{z}{x}\right) \cdot \left(y + 0.0007936500793651\right)\\ \end{array} \]
Alternative 13
Error13.5
Cost7369
\[\begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+123} \lor \neg \left(z \leq -5 \cdot 10^{-12}\right):\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ \end{array} \]
Alternative 14
Error37.1
Cost6921
\[\begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{-74} \lor \neg \left(z \leq 1.35 \cdot 10^{-34}\right):\\ \;\;\;\;0.91893853320467 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;{\left(x \cdot 12.000000000000048\right)}^{-1}\\ \end{array} \]
Alternative 15
Error37.1
Cost969
\[\begin{array}{l} \mathbf{if}\;z \leq -2.35 \cdot 10^{-74} \lor \neg \left(z \leq 7 \cdot 10^{-33}\right):\\ \;\;\;\;0.91893853320467 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 16
Error40.5
Cost841
\[\begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{-74} \lor \neg \left(z \leq 2.7 \cdot 10^{-33}\right):\\ \;\;\;\;0.91893853320467 + \frac{y}{\frac{\frac{x}{z}}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 17
Error43.1
Cost192
\[\frac{0.083333333333333}{x} \]

Error

Reproduce

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