?

Average Accuracy: 90.1% → 99.3%
Time: 26.7s
Precision: binary64
Cost: 39753

?

\[\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}\;z \leq -1.15 \cdot 10^{+63} \lor \neg \left(z \leq 5.4 \cdot 10^{+29}\right):\\ \;\;\;\;\left(0.91893853320467 - \left(x - x \cdot \log x\right)\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(0.0007936500793651 + y, 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)\\ \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 (or (<= z -1.15e+63) (not (<= z 5.4e+29)))
   (+
    (- 0.91893853320467 (- x (* x (log x))))
    (* z (* z (/ (+ 0.0007936500793651 y) x))))
   (+
    0.91893853320467
    (-
     (/
      (fma
       z
       (fma (+ 0.0007936500793651 y) z -0.0027777777777778)
       0.083333333333333)
      x)
     (fma (log x) (- 0.5 x) (expm1 (log1p 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 tmp;
	if ((z <= -1.15e+63) || !(z <= 5.4e+29)) {
		tmp = (0.91893853320467 - (x - (x * log(x)))) + (z * (z * ((0.0007936500793651 + y) / x)));
	} else {
		tmp = 0.91893853320467 + ((fma(z, fma((0.0007936500793651 + y), z, -0.0027777777777778), 0.083333333333333) / x) - fma(log(x), (0.5 - x), expm1(log1p(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)
	tmp = 0.0
	if ((z <= -1.15e+63) || !(z <= 5.4e+29))
		tmp = Float64(Float64(0.91893853320467 - Float64(x - Float64(x * log(x)))) + Float64(z * Float64(z * Float64(Float64(0.0007936500793651 + y) / x))));
	else
		tmp = Float64(0.91893853320467 + Float64(Float64(fma(z, fma(Float64(0.0007936500793651 + y), z, -0.0027777777777778), 0.083333333333333) / x) - fma(log(x), Float64(0.5 - x), expm1(log1p(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_] := If[Or[LessEqual[z, -1.15e+63], N[Not[LessEqual[z, 5.4e+29]], $MachinePrecision]], N[(N[(0.91893853320467 - N[(x - N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.91893853320467 + N[(N[(N[(z * N[(N[(0.0007936500793651 + y), $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]]
\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}\;z \leq -1.15 \cdot 10^{+63} \lor \neg \left(z \leq 5.4 \cdot 10^{+29}\right):\\
\;\;\;\;\left(0.91893853320467 - \left(x - x \cdot \log x\right)\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;0.91893853320467 + \left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(0.0007936500793651 + y, 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)\\


\end{array}

Error?

Target

Original90.1%
Target98.0%
Herbie99.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 2 regimes
  2. if z < -1.14999999999999997e63 or 5.4e29 < z

    1. Initial program 55.9%

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

      \[\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. Simplified68.1%

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

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

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

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

      \[\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. Simplified68.1%

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

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

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

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

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

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

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

      [Start]68.1

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

      clear-num [=>]68.0

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

      associate-/r* [=>]99.4

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

      associate-/r/ [=>]99.4

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

      associate-/r/ [=>]99.4

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

      clear-num [<=]99.4

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

    if -1.14999999999999997e63 < z < 5.4e29

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

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

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

      +-commutative [=>]99.0

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

      associate-+l+ [=>]99.0

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

      +-commutative [<=]99.0

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

      sub-neg [=>]99.0

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

      +-commutative [=>]99.0

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

      associate-+r+ [=>]99.0

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

      unsub-neg [=>]99.0

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

      associate-+l- [=>]99.0

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

      remove-double-neg [<=]99.0

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

      neg-mul-1 [=>]99.0

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

      *-commutative [<=]99.0

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

      \[\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) \]
      Proof

      [Start]99.1

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

      fma-udef [=>]99.0

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

      +-commutative [=>]99.0

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

      expm1-log1p-u [=>]99.1

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

      expm1-udef [=>]99.1

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

      associate-+l- [=>]99.1

      \[ 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. Simplified99.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}{\mathsf{fma}\left(\log x, 0.5 - x, \mathsf{expm1}\left(\mathsf{log1p}\left(x\right)\right)\right)}\right) \]
      Proof

      [Start]99.1

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

      associate--r- [=>]99.1

      \[ 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(\left(e^{\mathsf{log1p}\left(x\right)} - 1\right) + \log x \cdot \left(0.5 - x\right)\right)}\right) \]

      +-commutative [<=]99.1

      \[ 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(\log x \cdot \left(0.5 - x\right) + \left(e^{\mathsf{log1p}\left(x\right)} - 1\right)\right)}\right) \]

      fma-def [=>]99.3

      \[ 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, e^{\mathsf{log1p}\left(x\right)} - 1\right)}\right) \]

      expm1-def [=>]99.3

      \[ 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, \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x\right)\right)}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+63} \lor \neg \left(z \leq 5.4 \cdot 10^{+29}\right):\\ \;\;\;\;\left(0.91893853320467 - \left(x - x \cdot \log x\right)\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(0.0007936500793651 + y, 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)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy99.2%
Cost14537
\[\begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+63} \lor \neg \left(z \leq 5 \cdot 10^{+29}\right):\\ \;\;\;\;\left(0.91893853320467 - \left(x - x \cdot \log x\right)\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \left(\frac{\left(0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right)\right)\right) + z \cdot -0.0027777777777778}{x} - \mathsf{fma}\left(\log x, 0.5 - x, x\right)\right)\\ \end{array} \]
Alternative 2
Accuracy97.1%
Cost8776
\[\begin{array}{l} t_0 := x \cdot \log x\\ t_1 := z \cdot \left(0.0007936500793651 + y\right)\\ t_2 := z \cdot \left(-0.0027777777777778 + t_1\right)\\ \mathbf{if}\;t_2 \leq -10000000:\\ \;\;\;\;\left(0.91893853320467 - \left(x - t_0\right)\right) + y \cdot \frac{z}{\frac{x}{z}}\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{-6}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{\frac{1}{x}}{12.000000000000048}\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \left(z \cdot \frac{t_1}{x} + \left(t_0 - x\right)\right)\\ \end{array} \]
Alternative 3
Accuracy99.3%
Cost8137
\[\begin{array}{l} \mathbf{if}\;z \leq -1.08 \cdot 10^{+33} \lor \neg \left(z \leq 5.6 \cdot 10^{+29}\right):\\ \;\;\;\;\left(0.91893853320467 - \left(x - x \cdot \log x\right)\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(0.0007936500793651 + y\right)\right)}{x}\\ \end{array} \]
Alternative 4
Accuracy98.4%
Cost7748
\[\begin{array}{l} \mathbf{if}\;x \leq 1:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(0.0007936500793651 + y\right)\right)}{x} + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 - \left(x - x \cdot \log x\right)\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \end{array} \]
Alternative 5
Accuracy98.0%
Cost7620
\[\begin{array}{l} \mathbf{if}\;x \leq 1.05:\\ \;\;\;\;\left(0.91893853320467 - x\right) + \frac{0.083333333333333 + \left(z \cdot -0.0027777777777778 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right)\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 - \left(x - x \cdot \log x\right)\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \end{array} \]
Alternative 6
Accuracy93.0%
Cost7492
\[\begin{array}{l} \mathbf{if}\;x \leq 24000:\\ \;\;\;\;\left(0.91893853320467 - x\right) + \frac{0.083333333333333 + \left(z \cdot -0.0027777777777778 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right)\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 - \left(x - x \cdot \log x\right)\right) + 0.0007936500793651 \cdot \frac{z}{\frac{x}{z}}\\ \end{array} \]
Alternative 7
Accuracy93.6%
Cost7492
\[\begin{array}{l} \mathbf{if}\;x \leq 2.2:\\ \;\;\;\;\left(0.91893853320467 - x\right) + \frac{0.083333333333333 + \left(z \cdot -0.0027777777777778 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right)\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 - \left(x - x \cdot \log x\right)\right) + y \cdot \frac{z}{\frac{x}{z}}\\ \end{array} \]
Alternative 8
Accuracy89.8%
Cost7364
\[\begin{array}{l} \mathbf{if}\;x \leq 1.25 \cdot 10^{-8}:\\ \;\;\;\;\left(0.91893853320467 - x\right) + \frac{0.083333333333333 + \left(z \cdot -0.0027777777777778 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right)\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 9
Accuracy89.4%
Cost7108
\[\begin{array}{l} \mathbf{if}\;x \leq 23000:\\ \;\;\;\;\left(0.91893853320467 - x\right) + \frac{0.083333333333333 + \left(z \cdot -0.0027777777777778 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right)\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \left(\log x \cdot \left(x + -0.5\right) - x\right)\\ \end{array} \]
Alternative 10
Accuracy89.1%
Cost6852
\[\begin{array}{l} \mathbf{if}\;x \leq 58000:\\ \;\;\;\;\left(0.91893853320467 - x\right) + \frac{0.083333333333333 + \left(z \cdot -0.0027777777777778 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right)\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right)\\ \end{array} \]
Alternative 11
Accuracy48.7%
Cost1348
\[\begin{array}{l} \mathbf{if}\;x \leq 8.6 \cdot 10^{+68}:\\ \;\;\;\;\left(0.91893853320467 - x\right) + \frac{0.083333333333333 + \left(z \cdot -0.0027777777777778 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right)\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;x + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\\ \end{array} \]
Alternative 12
Accuracy48.7%
Cost1220
\[\begin{array}{l} \mathbf{if}\;x \leq 8.2 \cdot 10^{+68}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(-0.0027777777777778 + z \cdot \left(0.0007936500793651 + y\right)\right)}{x} + \left(0.91893853320467 - x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\\ \end{array} \]
Alternative 13
Accuracy45.8%
Cost969
\[\begin{array}{l} \mathbf{if}\;z \leq -135000000000 \lor \neg \left(z \leq 2.1 \cdot 10^{-17}\right):\\ \;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right)\\ \end{array} \]
Alternative 14
Accuracy33.2%
Cost448
\[0.91893853320467 + 0.083333333333333 \cdot \frac{1}{x} \]
Alternative 15
Accuracy37.9%
Cost448
\[x + \left(0.91893853320467 + \frac{0.083333333333333}{x}\right) \]
Alternative 16
Accuracy33.2%
Cost320
\[0.91893853320467 + \frac{0.083333333333333}{x} \]
Alternative 17
Accuracy32.4%
Cost192
\[\frac{0.083333333333333}{x} \]
Alternative 18
Accuracy1.2%
Cost128
\[-x \]

Error

Reproduce?

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