?

Average Accuracy: 90.6% → 99.4%
Time: 20.0s
Precision: binary64
Cost: 26952

?

\[\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(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\ \mathbf{if}\;z \leq -1350000000:\\ \;\;\;\;t_0 + z \cdot \left(\left(y + 0.0007936500793651\right) \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;z \leq 7000000:\\ \;\;\;\;\mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \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)))
   (if (<= z -1350000000.0)
     (+ t_0 (* z (* (+ y 0.0007936500793651) (/ z x))))
     (if (<= z 7000000.0)
       (+
        (fma (+ x -0.5) (log x) (- 0.91893853320467 x))
        (/
         (fma
          z
          (fma (+ y 0.0007936500793651) z -0.0027777777777778)
          0.083333333333333)
         x))
       (+ t_0 (/ 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;
	double tmp;
	if (z <= -1350000000.0) {
		tmp = t_0 + (z * ((y + 0.0007936500793651) * (z / x)));
	} else if (z <= 7000000.0) {
		tmp = fma((x + -0.5), log(x), (0.91893853320467 - x)) + (fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x);
	} else {
		tmp = t_0 + (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(x - 0.5) * log(x)) - x) + 0.91893853320467)
	tmp = 0.0
	if (z <= -1350000000.0)
		tmp = Float64(t_0 + Float64(z * Float64(Float64(y + 0.0007936500793651) * Float64(z / x))));
	elseif (z <= 7000000.0)
		tmp = Float64(fma(Float64(x + -0.5), log(x), Float64(0.91893853320467 - x)) + Float64(fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x));
	else
		tmp = Float64(t_0 + 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[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[z, -1350000000.0], N[(t$95$0 + N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7000000.0], N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + 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(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;z \leq -1350000000:\\
\;\;\;\;t_0 + z \cdot \left(\left(y + 0.0007936500793651\right) \cdot \frac{z}{x}\right)\\

\mathbf{elif}\;z \leq 7000000:\\
\;\;\;\;\mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\

\mathbf{else}:\\
\;\;\;\;t_0 + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\


\end{array}

Error?

Target

Original90.6%
Target97.8%
Herbie99.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 3 regimes
  2. if z < -1.35e9

    1. Initial program 68.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. Applied egg-rr67.9%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right) \cdot \frac{1}{x}} \]
      Proof

      [Start]68.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} \]

      div-inv [=>]67.9

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

      *-commutative [=>]67.9

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

      fma-def [=>]67.9

      \[ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)} \cdot \frac{1}{x} \]

      fma-neg [=>]67.9

      \[ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right) \cdot \frac{1}{x} \]

      metadata-eval [=>]67.9

      \[ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right) \cdot \frac{1}{x} \]
    3. Taylor expanded in z around inf 67.6%

      \[\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}} \]
    4. Simplified99.2%

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

      [Start]67.6

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

      unpow2 [=>]67.6

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

      associate-*l* [=>]67.7

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

      associate-*l/ [<=]92.8

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

      *-rgt-identity [<=]92.8

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

      associate-*r/ [<=]92.7

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

      *-commutative [<=]92.7

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

      *-commutative [=>]92.7

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

      associate-*l* [=>]99.2

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

      +-commutative [=>]99.2

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

      associate-*l/ [=>]99.2

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

      *-lft-identity [=>]99.2

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

    if -1.35e9 < z < 7e6

    1. Initial program 99.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. Simplified99.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}} \]
      Proof

      [Start]99.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} \]

      remove-double-neg [<=]99.4

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

      sub-neg [=>]99.4

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

      associate-+l+ [=>]99.5

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

      fma-def [=>]99.5

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

      sub-neg [=>]99.5

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

      metadata-eval [=>]99.5

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

      +-commutative [=>]99.5

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

      unsub-neg [=>]99.5

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

      remove-double-neg [=>]99.5

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

      *-commutative [=>]99.5

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

      fma-def [=>]99.5

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

      fma-neg [=>]99.5

      \[ \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}{x} \]

      metadata-eval [=>]99.5

      \[ \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x} \]

    if 7e6 < z

    1. Initial program 67.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. Applied egg-rr66.9%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right) \cdot \frac{1}{x}} \]
      Proof

      [Start]67.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} \]

      div-inv [=>]66.9

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

      *-commutative [=>]66.9

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

      fma-def [=>]66.9

      \[ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)} \cdot \frac{1}{x} \]

      fma-neg [=>]66.9

      \[ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right) \cdot \frac{1}{x} \]

      metadata-eval [=>]66.9

      \[ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right) \cdot \frac{1}{x} \]
    3. Taylor expanded in z around inf 66.2%

      \[\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}} \]
    4. Simplified98.8%

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

      [Start]66.2

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

      associate-/l* [=>]77.4

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

      unpow2 [=>]77.4

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

      associate-/l* [=>]98.8

      \[ \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}}} \]

      +-commutative [=>]98.8

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

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

Alternatives

Alternative 1
Accuracy99.4%
Cost14920
\[\begin{array}{l} t_0 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\ \mathbf{if}\;z \leq -2.5 \cdot 10^{+23}:\\ \;\;\;\;t_0 + z \cdot \left(\left(y + 0.0007936500793651\right) \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;z \leq 7000000:\\ \;\;\;\;t_0 + \left(\frac{y}{\frac{x}{z \cdot z}} + \left(\frac{0.083333333333333}{x} + \frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{\frac{x}{z}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
Alternative 2
Accuracy99.3%
Cost9160
\[\begin{array}{l} t_0 := z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)\\ t_1 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\ \mathbf{if}\;t_0 \leq -5 \cdot 10^{+44}:\\ \;\;\;\;t_1 + y \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{elif}\;t_0 \leq 2 \cdot 10^{+161}:\\ \;\;\;\;t_1 + \frac{0.083333333333333 + t_0}{x}\\ \mathbf{else}:\\ \;\;\;\;t_1 + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
Alternative 3
Accuracy96.9%
Cost8904
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ t_1 := z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{+110}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + y \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{elif}\;t_1 \leq 10^{+299}:\\ \;\;\;\;\frac{0.083333333333333 + t_1}{x} + t_0\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{z}{x} \cdot \left(z \cdot 0.0007936500793651\right)\\ \end{array} \]
Alternative 4
Accuracy91.1%
Cost7756
\[\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 -3.4 \cdot 10^{-55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-11}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+143}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{z}{x} \cdot \left(z \cdot 0.0007936500793651\right)\\ \end{array} \]
Alternative 5
Accuracy97.6%
Cost7748
\[\begin{array}{l} \mathbf{if}\;x \leq 2.1 \cdot 10^{-15}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + x \cdot \left(\log x + -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \left(\left(y + 0.0007936500793651\right) \cdot \frac{z}{x}\right)\\ \end{array} \]
Alternative 6
Accuracy97.6%
Cost7748
\[\begin{array}{l} \mathbf{if}\;x \leq 2.1 \cdot 10^{-15}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + x \cdot \left(\log x + -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
Alternative 7
Accuracy90.5%
Cost7624
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;x \leq 2.1 \cdot 10^{-15}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot y\right)}{x}\\ \mathbf{elif}\;x \leq 2 \cdot 10^{+168}:\\ \;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{z}{x} \cdot \left(z \cdot 0.0007936500793651\right)\\ \end{array} \]
Alternative 8
Accuracy90.5%
Cost7624
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;x \leq 2.1 \cdot 10^{-15}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \left(\frac{y}{\frac{x}{z \cdot z}} + \frac{0.083333333333333}{x}\right)\\ \mathbf{elif}\;x \leq 10^{+168}:\\ \;\;\;\;t_0 + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{z}{x} \cdot \left(z \cdot 0.0007936500793651\right)\\ \end{array} \]
Alternative 9
Accuracy89.5%
Cost7620
\[\begin{array}{l} \mathbf{if}\;x \leq 0.2:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \left(\frac{y}{\frac{x}{z \cdot z}} + \frac{0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + y \cdot \frac{z}{\frac{x}{z}}\\ \end{array} \]
Alternative 10
Accuracy88.4%
Cost7497
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;z \leq -10.2 \lor \neg \left(z \leq 9.6 \cdot 10^{-6}\right):\\ \;\;\;\;t_0 + \frac{z}{x} \cdot \left(z \cdot 0.0007936500793651\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x} + t_0\\ \end{array} \]
Alternative 11
Accuracy84.1%
Cost7496
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{-55}:\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}} + t_0\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-6}:\\ \;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{z}{x} \cdot \left(z \cdot 0.0007936500793651\right)\\ \end{array} \]
Alternative 12
Accuracy84.1%
Cost7496
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;z \leq -1.92 \cdot 10^{-56}:\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}} + t_0\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-6}:\\ \;\;\;\;\frac{0.083333333333333}{x} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{z}{\frac{x}{z \cdot 0.0007936500793651}}\\ \end{array} \]
Alternative 13
Accuracy85.5%
Cost7496
\[\begin{array}{l} t_0 := x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;z \leq -2.9 \cdot 10^{-55}:\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}} + t_0\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-6}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{z}{\frac{x}{z \cdot 0.0007936500793651}}\\ \end{array} \]
Alternative 14
Accuracy80.3%
Cost6976
\[\frac{0.083333333333333}{x} + x \cdot \left(\log x + -1\right) \]
Alternative 15
Accuracy80.2%
Cost6852
\[\begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log x - x\\ \end{array} \]
Alternative 16
Accuracy37.5%
Cost713
\[\begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{-11} \lor \neg \left(z \leq 5.1 \cdot 10^{-14}\right):\\ \;\;\;\;z \cdot \left(y \cdot \frac{z}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 17
Accuracy32.9%
Cost192
\[\frac{0.083333333333333}{x} \]

Error

Reproduce?

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