?

Average Accuracy: 90.3% → 99.4%
Time: 22.2s
Precision: binary64
Cost: 27976

?

\[\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 + z \cdot \left(y + 0.0007936500793651\right)\right)\\ t_1 := \left(x \cdot \log x - x\right) + 0.91893853320467\\ \mathbf{if}\;t_0 \leq -2 \cdot 10^{+47}:\\ \;\;\;\;t_1 + y \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{elif}\;t_0 \leq 5 \cdot 10^{+285}:\\ \;\;\;\;\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_1 + z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right)\\ \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (/
   (+
    (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
    0.083333333333333)
   x)))
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* z (+ -0.0027777777777778 (* z (+ y 0.0007936500793651)))))
        (t_1 (+ (- (* x (log x)) x) 0.91893853320467)))
   (if (<= t_0 -2e+47)
     (+ t_1 (* y (/ z (/ x z))))
     (if (<= t_0 5e+285)
       (+
        (fma (+ x -0.5) (log x) (- 0.91893853320467 x))
        (/
         (fma
          z
          (fma (+ y 0.0007936500793651) z -0.0027777777777778)
          0.083333333333333)
         x))
       (+ t_1 (* z (* z (/ (+ y 0.0007936500793651) x))))))))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
double code(double x, double y, double z) {
	double t_0 = z * (-0.0027777777777778 + (z * (y + 0.0007936500793651)));
	double t_1 = ((x * log(x)) - x) + 0.91893853320467;
	double tmp;
	if (t_0 <= -2e+47) {
		tmp = t_1 + (y * (z / (x / z)));
	} else if (t_0 <= 5e+285) {
		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_1 + (z * (z * ((y + 0.0007936500793651) / x)));
	}
	return tmp;
}
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x))
end
function code(x, y, z)
	t_0 = Float64(z * Float64(-0.0027777777777778 + Float64(z * Float64(y + 0.0007936500793651))))
	t_1 = Float64(Float64(Float64(x * log(x)) - x) + 0.91893853320467)
	tmp = 0.0
	if (t_0 <= -2e+47)
		tmp = Float64(t_1 + Float64(y * Float64(z / Float64(x / z))));
	elseif (t_0 <= 5e+285)
		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_1 + Float64(z * Float64(z * Float64(Float64(y + 0.0007936500793651) / x))));
	end
	return tmp
end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(-0.0027777777777778 + N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+47], N[(t$95$1 + N[(y * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+285], 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$1 + N[(z * N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] / x), $MachinePrecision]), $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 + z \cdot \left(y + 0.0007936500793651\right)\right)\\
t_1 := \left(x \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;t_0 \leq -2 \cdot 10^{+47}:\\
\;\;\;\;t_1 + y \cdot \frac{z}{\frac{x}{z}}\\

\mathbf{elif}\;t_0 \leq 5 \cdot 10^{+285}:\\
\;\;\;\;\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_1 + z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right)\\


\end{array}

Error?

Target

Original90.3%
Target97.9%
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 (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < -2.0000000000000001e47

    1. Initial program 71.1%

      \[\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 71.1%

      \[\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. Simplified83.4%

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

      [Start]71.1

      \[ \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* [=>]83.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 [=>]83.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}} \]
    4. Taylor expanded in x around inf 83.4%

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

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

      [Start]83.4

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

      associate-*r* [=>]83.4

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

      *-commutative [=>]83.4

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

      mul-1-neg [=>]83.4

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

      log-rec [=>]83.4

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

      remove-double-neg [=>]83.4

      \[ \left(\left(x \cdot \color{blue}{\log x} - x\right) + 0.91893853320467\right) + \frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}} \]
    6. Taylor expanded in y around inf 70.2%

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

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

      [Start]70.2

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

      unpow2 [=>]70.2

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

      associate-*r/ [<=]88.3

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

      associate-/l* [=>]97.9

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

    if -2.0000000000000001e47 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 5.00000000000000016e285

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

      associate-+l- [=>]99.4

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

      sub-neg [=>]99.4

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

      associate--r+ [=>]99.4

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

      associate--r+ [<=]99.4

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

      sub-neg [<=]99.4

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

      fma-neg [=>]99.5

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

      sub-neg [=>]99.5

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

      metadata-eval [=>]99.5

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

      neg-sub0 [=>]99.5

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

      associate-+l- [<=]99.5

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

      neg-sub0 [<=]99.5

      \[ \mathsf{fma}\left(x + -0.5, \log x, \color{blue}{\left(-x\right)} + 0.91893853320467\right) + \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, \color{blue}{0.91893853320467 + \left(-x\right)}\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]

      unsub-neg [=>]99.5

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

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

    1. Initial program 11.1%

      \[\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 9.7%

      \[\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. Simplified29.3%

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

      [Start]9.7

      \[ \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* [=>]29.3

      \[ \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 [=>]29.3

      \[ \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}} \]
    4. Taylor expanded in x around inf 29.3%

      \[\leadsto \left(\left(\color{blue}{-1 \cdot \left(\log \left(\frac{1}{x}\right) \cdot x\right)} - x\right) + 0.91893853320467\right) + \frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}} \]
    5. Simplified29.3%

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

      [Start]29.3

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

      associate-*r* [=>]29.3

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

      *-commutative [=>]29.3

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

      mul-1-neg [=>]29.3

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

      log-rec [=>]29.3

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

      remove-double-neg [=>]29.3

      \[ \left(\left(x \cdot \color{blue}{\log x} - x\right) + 0.91893853320467\right) + \frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}} \]
    6. Applied egg-rr99.4%

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

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

Alternatives

Alternative 1
Accuracy99.5%
Cost8004
\[\begin{array}{l} \mathbf{if}\;x \leq 1.55 \cdot 10^{+17}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right) + 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) - z \cdot \frac{z}{\frac{x}{-0.0007936500793651 - y}}\\ \end{array} \]
Alternative 2
Accuracy86.6%
Cost7756
\[\begin{array}{l} t_0 := \left(\left(x \cdot \log x - x\right) + 0.91893853320467\right) + 0.0007936500793651 \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{if}\;z \leq -10.5:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+49}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{+125}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Accuracy86.7%
Cost7756
\[\begin{array}{l} t_0 := \left(x \cdot \log x - x\right) + 0.91893853320467\\ \mathbf{if}\;z \leq -10.2:\\ \;\;\;\;t_0 + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+48}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{+125}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + 0.0007936500793651 \cdot \left(z \cdot \frac{z}{x}\right)\\ \end{array} \]
Alternative 4
Accuracy88.9%
Cost7756
\[\begin{array}{l} t_0 := z \cdot \frac{z}{x}\\ t_1 := \left(x \cdot \log x - x\right) + 0.91893853320467\\ \mathbf{if}\;z \leq -14.6:\\ \;\;\;\;t_1 + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-25}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+100}:\\ \;\;\;\;t_1 + y \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;t_1 + 0.0007936500793651 \cdot t_0\\ \end{array} \]
Alternative 5
Accuracy88.9%
Cost7756
\[\begin{array}{l} t_0 := \frac{z}{\frac{x}{z}}\\ t_1 := \left(x \cdot \log x - x\right) + 0.91893853320467\\ \mathbf{if}\;z \leq -10.2:\\ \;\;\;\;t_1 + 0.0007936500793651 \cdot t_0\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-25}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+99}:\\ \;\;\;\;t_1 + y \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;t_1 + 0.0007936500793651 \cdot \left(z \cdot \frac{z}{x}\right)\\ \end{array} \]
Alternative 6
Accuracy88.9%
Cost7756
\[\begin{array}{l} t_0 := \frac{z}{\frac{x}{z}}\\ t_1 := \left(x \cdot \log x - x\right) + 0.91893853320467\\ \mathbf{if}\;z \leq -10.2:\\ \;\;\;\;t_1 + 0.0007936500793651 \cdot t_0\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-25}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + 0.083333333333333 \cdot \frac{1}{x}\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{+101}:\\ \;\;\;\;t_1 + y \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;t_1 + 0.0007936500793651 \cdot \left(z \cdot \frac{z}{x}\right)\\ \end{array} \]
Alternative 7
Accuracy94.7%
Cost7753
\[\begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{-10} \lor \neg \left(z \leq 8.5 \cdot 10^{-25}\right):\\ \;\;\;\;\left(\left(x \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + 0.083333333333333 \cdot \frac{1}{x}\\ \end{array} \]
Alternative 8
Accuracy94.8%
Cost7753
\[\begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{-10} \lor \neg \left(z \leq 2.05 \cdot 10^{-25}\right):\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) - z \cdot \frac{z}{\frac{x}{-0.0007936500793651 - y}}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + 0.083333333333333 \cdot \frac{1}{x}\\ \end{array} \]
Alternative 9
Accuracy94.0%
Cost7752
\[\begin{array}{l} t_0 := \left(x \cdot \log x - x\right) + 0.91893853320467\\ \mathbf{if}\;z \leq -1.12 \cdot 10^{-10}:\\ \;\;\;\;t_0 + z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right)\\ \mathbf{elif}\;z \leq 1.18 \cdot 10^{-25}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + 0.083333333333333 \cdot \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)\\ \end{array} \]
Alternative 10
Accuracy98.4%
Cost7748
\[\begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;\frac{z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\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) - z \cdot \frac{z}{\frac{x}{-0.0007936500793651 - y}}\\ \end{array} \]
Alternative 11
Accuracy98.8%
Cost7748
\[\begin{array}{l} \mathbf{if}\;x \leq 0.24:\\ \;\;\;\;\frac{z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right) + 0.083333333333333}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(z \cdot \frac{y + 0.0007936500793651}{x}\right) + \left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right)\\ \end{array} \]
Alternative 12
Accuracy98.8%
Cost7748
\[\begin{array}{l} \mathbf{if}\;x \leq 0.195:\\ \;\;\;\;\frac{z \cdot \left(-0.0027777777777778 + z \cdot \left(y + 0.0007936500793651\right)\right) + 0.083333333333333}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) - z \cdot \frac{z}{\frac{x}{-0.0007936500793651 - y}}\\ \end{array} \]
Alternative 13
Accuracy79.6%
Cost7492
\[\begin{array}{l} \mathbf{if}\;z \leq 2.1 \cdot 10^{+49}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\ \end{array} \]
Alternative 14
Accuracy81.2%
Cost7232
\[\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{0.083333333333333}{x} \]
Alternative 15
Accuracy79.9%
Cost7104
\[\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \frac{0.083333333333333}{x} \]
Alternative 16
Accuracy32.9%
Cost192
\[\frac{0.083333333333333}{x} \]

Error

Reproduce?

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