?

Average Accuracy: 90.8% → 99.0%
Time: 26.0s
Precision: binary64
Cost: 27268

?

\[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
\[\begin{array}{l} \mathbf{if}\;x \leq 2.1 \cdot 10^{+73}:\\ \;\;\;\;\left(\left(1 + \mathsf{fma}\left(x + -0.5, \log x, -e^{\mathsf{log1p}\left(x\right)}\right)\right) + 0.91893853320467\right) + \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (/
   (+
    (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
    0.083333333333333)
   x)))
(FPCore (x y z)
 :precision binary64
 (if (<= x 2.1e+73)
   (+
    (+ (+ 1.0 (fma (+ x -0.5) (log x) (- (exp (log1p x))))) 0.91893853320467)
    (/
     (+
      (* z (+ (* z (+ y 0.0007936500793651)) -0.0027777777777778))
      0.083333333333333)
     x))
   (+
    (+ 0.91893853320467 (- (* (log x) (+ x -0.5)) x))
    (/ z (/ (/ x (+ y 0.0007936500793651)) z)))))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
double code(double x, double y, double z) {
	double tmp;
	if (x <= 2.1e+73) {
		tmp = ((1.0 + fma((x + -0.5), log(x), -exp(log1p(x)))) + 0.91893853320467) + (((z * ((z * (y + 0.0007936500793651)) + -0.0027777777777778)) + 0.083333333333333) / x);
	} else {
		tmp = (0.91893853320467 + ((log(x) * (x + -0.5)) - x)) + (z / ((x / (y + 0.0007936500793651)) / z));
	}
	return tmp;
}
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x))
end
function code(x, y, z)
	tmp = 0.0
	if (x <= 2.1e+73)
		tmp = Float64(Float64(Float64(1.0 + fma(Float64(x + -0.5), log(x), Float64(-exp(log1p(x))))) + 0.91893853320467) + Float64(Float64(Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) + -0.0027777777777778)) + 0.083333333333333) / x));
	else
		tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x + -0.5)) - x)) + Float64(z / Float64(Float64(x / Float64(y + 0.0007936500793651)) / z)));
	end
	return tmp
end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := If[LessEqual[x, 2.1e+73], N[(N[(N[(1.0 + N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + (-N[Exp[N[Log[1 + x], $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $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], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(z / N[(N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\begin{array}{l}
\mathbf{if}\;x \leq 2.1 \cdot 10^{+73}:\\
\;\;\;\;\left(\left(1 + \mathsf{fma}\left(x + -0.5, \log x, -e^{\mathsf{log1p}\left(x\right)}\right)\right) + 0.91893853320467\right) + \frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x}\\

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


\end{array}

Error?

Target

Original90.8%
Target98.0%
Herbie99.0%
\[\left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) \]

Derivation?

  1. Split input into 2 regimes
  2. if x < 2.1000000000000001e73

    1. Initial program 98.5%

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

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

      [Start]98.5

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

      add-sqr-sqrt [=>]98.3

      \[ \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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} \]

      pow2 [=>]98.3

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

      sub-neg [=>]98.3

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

      metadata-eval [=>]98.3

      \[ \left(\left({\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}\right)}^{2} - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    3. Applied egg-rr98.5%

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

      [Start]98.3

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

      expm1-log1p-u [=>]98.3

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

      expm1-udef [=>]98.3

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

      associate--r- [=>]98.3

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

      unpow2 [=>]98.3

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

      add-sqr-sqrt [<=]98.5

      \[ \left(\left(\left(\color{blue}{\left(x + -0.5\right) \cdot \log x} - e^{\mathsf{log1p}\left(x\right)}\right) + 1\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    4. Simplified98.5%

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

      [Start]98.5

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

      +-commutative [=>]98.5

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

      fma-neg [=>]98.5

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

      +-commutative [=>]98.5

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

    if 2.1000000000000001e73 < x

    1. Initial program 82.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. Applied egg-rr79.4%

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

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

      expm1-log1p-u [=>]79.4

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

      *-commutative [=>]79.4

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

      fma-def [=>]79.4

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

      fma-neg [=>]79.4

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

      metadata-eval [=>]79.4

      \[ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x}\right)\right) \]
    3. Applied egg-rr82.1%

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

      [Start]79.4

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

      expm1-log1p-u [<=]82.1

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

      clear-num [=>]82.1

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

      div-inv [=>]82.1

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

      associate-/r* [=>]82.1

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

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

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

      [Start]82.0

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

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

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

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

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

Alternatives

Alternative 1
Accuracy99.4%
Cost8132
\[\begin{array}{l} \mathbf{if}\;x \leq 1.2 \cdot 10^{+34}:\\ \;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 + \left(\frac{\log x}{\frac{1}{x + -0.5}} - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
Alternative 2
Accuracy99.4%
Cost8004
\[\begin{array}{l} t_0 := 0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\ \mathbf{if}\;x \leq 3 \cdot 10^{+34}:\\ \;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x} + t_0\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
Alternative 3
Accuracy95.2%
Cost7880
\[\begin{array}{l} \mathbf{if}\;x \leq 7600:\\ \;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{+173}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 4
Accuracy92.8%
Cost7752
\[\begin{array}{l} \mathbf{if}\;x \leq 320:\\ \;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 - x\right)\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{+173}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \left(z \cdot z\right) \cdot \frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 5
Accuracy92.7%
Cost7752
\[\begin{array}{l} \mathbf{if}\;x \leq 9000:\\ \;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 - x\right)\\ \mathbf{elif}\;x \leq 2.4 \cdot 10^{+173}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{y}{\frac{x}{z \cdot z}}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 6
Accuracy93.2%
Cost7752
\[\begin{array}{l} \mathbf{if}\;x \leq 7600:\\ \;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{+173}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{y}{\frac{x}{z \cdot z}}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 7
Accuracy98.6%
Cost7748
\[\begin{array}{l} \mathbf{if}\;x \leq 7600:\\ \;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 + -0.5 \cdot \log x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{z}{\frac{\frac{x}{y + 0.0007936500793651}}{z}}\\ \end{array} \]
Alternative 8
Accuracy92.5%
Cost7624
\[\begin{array}{l} t_0 := 0.91893853320467 + x \cdot \left(\log x + -1\right)\\ \mathbf{if}\;x \leq 7600:\\ \;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 - x\right)\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{+173}:\\ \;\;\;\;t_0 + \frac{z \cdot z}{\frac{x}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 9
Accuracy89.2%
Cost7236
\[\begin{array}{l} \mathbf{if}\;x \leq 3 \cdot 10^{+16}:\\ \;\;\;\;\frac{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right) + 0.083333333333333}{x} + \left(0.91893853320467 - x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 10
Accuracy48.2%
Cost2120
\[\begin{array}{l} t_0 := z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) + -0.0027777777777778\right)\\ \mathbf{if}\;t_0 \leq -2000000:\\ \;\;\;\;\frac{t_0 + 0.083333333333333}{x} + \left(0.91893853320467 - x\right)\\ \mathbf{elif}\;t_0 \leq 2 \cdot 10^{+14}:\\ \;\;\;\;x + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x} + \left(0.91893853320467 - x\right)\\ \end{array} \]
Alternative 11
Accuracy46.6%
Cost1228
\[\begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{+14}:\\ \;\;\;\;\left(0.91893853320467 - x\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-96}:\\ \;\;\;\;\left(0.91893853320467 - x\right) + \frac{0.083333333333333 + z \cdot \left(y \cdot z\right)}{x}\\ \mathbf{elif}\;z \leq 86:\\ \;\;\;\;x + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x} + \left(0.91893853320467 - x\right)\\ \end{array} \]
Alternative 12
Accuracy43.0%
Cost1100
\[\begin{array}{l} t_0 := \left(0.91893853320467 - x\right) + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+128}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-7}:\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}} + \left(0.91893853320467 - x\right)\\ \mathbf{elif}\;z \leq 390000000:\\ \;\;\;\;x + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 13
Accuracy43.0%
Cost1100
\[\begin{array}{l} t_0 := \left(0.91893853320467 - x\right) + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{if}\;z \leq -4.5 \cdot 10^{+127}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-7}:\\ \;\;\;\;\left(0.91893853320467 - x\right) + \frac{z \cdot z}{\frac{x}{y}}\\ \mathbf{elif}\;z \leq 370000000:\\ \;\;\;\;x + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 14
Accuracy46.0%
Cost1097
\[\begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{-8} \lor \neg \left(z \leq 340\right):\\ \;\;\;\;\left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x} + \left(0.91893853320467 - x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\\ \end{array} \]
Alternative 15
Accuracy46.0%
Cost1096
\[\begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{-8}:\\ \;\;\;\;\left(0.91893853320467 - x\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\ \mathbf{elif}\;z \leq 6.6:\\ \;\;\;\;x + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x} + \left(0.91893853320467 - x\right)\\ \end{array} \]
Alternative 16
Accuracy48.7%
Cost1092
\[\begin{array}{l} \mathbf{if}\;x \leq 2.9 \cdot 10^{+103}:\\ \;\;\;\;\left(0.91893853320467 - x\right) + \frac{0.083333333333333 + \left(y + 0.0007936500793651\right) \cdot \left(z \cdot z\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;x + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\\ \end{array} \]
Alternative 17
Accuracy43.6%
Cost969
\[\begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+14} \lor \neg \left(z \leq 440000000\right):\\ \;\;\;\;\left(0.91893853320467 - x\right) + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\\ \end{array} \]
Alternative 18
Accuracy38.1%
Cost448
\[x + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right) \]
Alternative 19
Accuracy33.4%
Cost320
\[0.91893853320467 + \frac{0.083333333333333}{x} \]
Alternative 20
Accuracy2.5%
Cost192
\[0.91893853320467 - x \]
Alternative 21
Accuracy32.6%
Cost192
\[\frac{0.083333333333333}{x} \]
Alternative 22
Accuracy1.1%
Cost128
\[-x \]

Error

Reproduce?

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