?

Average Error: 5.8 → 2.6
Time: 31.5s
Precision: binary64
Cost: 15240

?

\[\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\\ t_1 := 0.083333333333333 \cdot \frac{1}{x}\\ \mathbf{if}\;x \leq 10^{-18}:\\ \;\;\;\;t_0 + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} + \left(\frac{y \cdot {z}^{2}}{x} + t_1\right)\right)\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{+174}:\\ \;\;\;\;t_0 + \left(\left(t_1 + -0.0027777777777778 \cdot \frac{z}{x}\right) + {z}^{2} \cdot \left(\frac{y}{x} + 0.0007936500793651 \cdot \frac{1}{x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right) + \frac{0.083333333333333}{x}\\ \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))
        (t_1 (* 0.083333333333333 (/ 1.0 x))))
   (if (<= x 1e-18)
     (+
      t_0
      (+
       (/ (* z (- (* 0.0007936500793651 z) 0.0027777777777778)) x)
       (+ (/ (* y (pow z 2.0)) x) t_1)))
     (if (<= x 2.05e+174)
       (+
        t_0
        (+
         (+ t_1 (* -0.0027777777777778 (/ z x)))
         (* (pow z 2.0) (+ (/ y x) (* 0.0007936500793651 (/ 1.0 x))))))
       (+ (* x (- -1.0 (log (/ 1.0 x)))) (/ 0.083333333333333 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 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
	double t_1 = 0.083333333333333 * (1.0 / x);
	double tmp;
	if (x <= 1e-18) {
		tmp = t_0 + (((z * ((0.0007936500793651 * z) - 0.0027777777777778)) / x) + (((y * pow(z, 2.0)) / x) + t_1));
	} else if (x <= 2.05e+174) {
		tmp = t_0 + ((t_1 + (-0.0027777777777778 * (z / x))) + (pow(z, 2.0) * ((y / x) + (0.0007936500793651 * (1.0 / x)))));
	} else {
		tmp = (x * (-1.0 - log((1.0 / x)))) + (0.083333333333333 / x);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0
    t_1 = 0.083333333333333d0 * (1.0d0 / x)
    if (x <= 1d-18) then
        tmp = t_0 + (((z * ((0.0007936500793651d0 * z) - 0.0027777777777778d0)) / x) + (((y * (z ** 2.0d0)) / x) + t_1))
    else if (x <= 2.05d+174) then
        tmp = t_0 + ((t_1 + ((-0.0027777777777778d0) * (z / x))) + ((z ** 2.0d0) * ((y / x) + (0.0007936500793651d0 * (1.0d0 / x)))))
    else
        tmp = (x * ((-1.0d0) - log((1.0d0 / x)))) + (0.083333333333333d0 / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
public static double code(double x, double y, double z) {
	double t_0 = (((x - 0.5) * Math.log(x)) - x) + 0.91893853320467;
	double t_1 = 0.083333333333333 * (1.0 / x);
	double tmp;
	if (x <= 1e-18) {
		tmp = t_0 + (((z * ((0.0007936500793651 * z) - 0.0027777777777778)) / x) + (((y * Math.pow(z, 2.0)) / x) + t_1));
	} else if (x <= 2.05e+174) {
		tmp = t_0 + ((t_1 + (-0.0027777777777778 * (z / x))) + (Math.pow(z, 2.0) * ((y / x) + (0.0007936500793651 * (1.0 / x)))));
	} else {
		tmp = (x * (-1.0 - Math.log((1.0 / x)))) + (0.083333333333333 / x);
	}
	return tmp;
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
def code(x, y, z):
	t_0 = (((x - 0.5) * math.log(x)) - x) + 0.91893853320467
	t_1 = 0.083333333333333 * (1.0 / x)
	tmp = 0
	if x <= 1e-18:
		tmp = t_0 + (((z * ((0.0007936500793651 * z) - 0.0027777777777778)) / x) + (((y * math.pow(z, 2.0)) / x) + t_1))
	elif x <= 2.05e+174:
		tmp = t_0 + ((t_1 + (-0.0027777777777778 * (z / x))) + (math.pow(z, 2.0) * ((y / x) + (0.0007936500793651 * (1.0 / x)))))
	else:
		tmp = (x * (-1.0 - math.log((1.0 / x)))) + (0.083333333333333 / 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(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467)
	t_1 = Float64(0.083333333333333 * Float64(1.0 / x))
	tmp = 0.0
	if (x <= 1e-18)
		tmp = Float64(t_0 + Float64(Float64(Float64(z * Float64(Float64(0.0007936500793651 * z) - 0.0027777777777778)) / x) + Float64(Float64(Float64(y * (z ^ 2.0)) / x) + t_1)));
	elseif (x <= 2.05e+174)
		tmp = Float64(t_0 + Float64(Float64(t_1 + Float64(-0.0027777777777778 * Float64(z / x))) + Float64((z ^ 2.0) * Float64(Float64(y / x) + Float64(0.0007936500793651 * Float64(1.0 / x))))));
	else
		tmp = Float64(Float64(x * Float64(-1.0 - log(Float64(1.0 / x)))) + Float64(0.083333333333333 / x));
	end
	return tmp
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
end
function tmp_2 = code(x, y, z)
	t_0 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
	t_1 = 0.083333333333333 * (1.0 / x);
	tmp = 0.0;
	if (x <= 1e-18)
		tmp = t_0 + (((z * ((0.0007936500793651 * z) - 0.0027777777777778)) / x) + (((y * (z ^ 2.0)) / x) + t_1));
	elseif (x <= 2.05e+174)
		tmp = t_0 + ((t_1 + (-0.0027777777777778 * (z / x))) + ((z ^ 2.0) * ((y / x) + (0.0007936500793651 * (1.0 / x)))));
	else
		tmp = (x * (-1.0 - log((1.0 / x)))) + (0.083333333333333 / x);
	end
	tmp_2 = 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]}, Block[{t$95$1 = N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1e-18], N[(t$95$0 + N[(N[(N[(z * N[(N[(0.0007936500793651 * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(N[(N[(y * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.05e+174], N[(t$95$0 + N[(N[(t$95$1 + N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[z, 2.0], $MachinePrecision] * N[(N[(y / x), $MachinePrecision] + N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 - N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $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\\
t_1 := 0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{if}\;x \leq 10^{-18}:\\
\;\;\;\;t_0 + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} + \left(\frac{y \cdot {z}^{2}}{x} + t_1\right)\right)\\

\mathbf{elif}\;x \leq 2.05 \cdot 10^{+174}:\\
\;\;\;\;t_0 + \left(\left(t_1 + -0.0027777777777778 \cdot \frac{z}{x}\right) + {z}^{2} \cdot \left(\frac{y}{x} + 0.0007936500793651 \cdot \frac{1}{x}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right) + \frac{0.083333333333333}{x}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original5.8
Target1.4
Herbie2.6
\[\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 x < 1.0000000000000001e-18

    1. Initial program 0.3

      \[\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 y around 0 0.4

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

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

      [Start]0.4

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

      rational.json-simplify-41 [<=]0.4

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

      rational.json-simplify-2 [=>]0.4

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

    if 1.0000000000000001e-18 < x < 2.05000000000000015e174

    1. Initial program 5.6

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(0.083333333333333 \cdot \frac{1}{x} + \left(-0.0027777777777778 \cdot \frac{z}{x} + \left(\frac{y}{x} + 0.0007936500793651 \cdot \frac{1}{x}\right) \cdot {z}^{2}\right)\right)} \]
    3. Simplified3.7

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

      [Start]3.7

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

      rational.json-simplify-41 [<=]3.7

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

      rational.json-simplify-1 [=>]3.7

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

      rational.json-simplify-2 [=>]3.7

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

    if 2.05000000000000015e174 < x

    1. Initial program 13.6

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    3. Taylor expanded in x around inf 4.6

      \[\leadsto \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \cdot x} + \frac{0.083333333333333}{x} \]
    4. Simplified4.6

      \[\leadsto \color{blue}{x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right)} + \frac{0.083333333333333}{x} \]
      Proof

      [Start]4.6

      \[ \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \cdot x + \frac{0.083333333333333}{x} \]

      rational.json-simplify-2 [=>]4.6

      \[ \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{0.083333333333333}{x} \]

      rational.json-simplify-2 [=>]4.6

      \[ x \cdot \left(\color{blue}{\log \left(\frac{1}{x}\right) \cdot -1} - 1\right) + \frac{0.083333333333333}{x} \]

      rational.json-simplify-9 [=>]4.6

      \[ x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} - 1\right) + \frac{0.083333333333333}{x} \]

      rational.json-simplify-64 [=>]4.6

      \[ x \cdot \color{blue}{\left(\left(-1 - \log \left(\frac{1}{x}\right)\right) + \left(1 - 1\right)\right)} + \frac{0.083333333333333}{x} \]

      metadata-eval [=>]4.6

      \[ x \cdot \left(\left(-1 - \log \left(\frac{1}{x}\right)\right) + \color{blue}{0}\right) + \frac{0.083333333333333}{x} \]

      rational.json-simplify-4 [=>]4.6

      \[ x \cdot \color{blue}{\left(-1 - \log \left(\frac{1}{x}\right)\right)} + \frac{0.083333333333333}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification2.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 10^{-18}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x} + \left(\frac{y \cdot {z}^{2}}{x} + 0.083333333333333 \cdot \frac{1}{x}\right)\right)\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{+174}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\left(0.083333333333333 \cdot \frac{1}{x} + -0.0027777777777778 \cdot \frac{z}{x}\right) + {z}^{2} \cdot \left(\frac{y}{x} + 0.0007936500793651 \cdot \frac{1}{x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]

Alternatives

Alternative 1
Error4.0
Cost8140
\[\begin{array}{l} t_0 := x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right)\\ t_1 := \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ \mathbf{if}\;x \leq 2.5 \cdot 10^{-10}:\\ \;\;\;\;\left(-0.5 \cdot \log x + 0.91893853320467\right) + t_1\\ \mathbf{elif}\;x \leq 31000000000000:\\ \;\;\;\;\left(\left(x - 0.5\right) \cdot \log x - \left(x - 0.91893853320467\right)\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+129}:\\ \;\;\;\;t_0 + t_1\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 2
Error3.8
Cost8140
\[\begin{array}{l} t_0 := x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right)\\ t_1 := \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ \mathbf{if}\;x \leq 5.4 \cdot 10^{-14}:\\ \;\;\;\;x \cdot \left(-1 + \log x\right) + t_1\\ \mathbf{elif}\;x \leq 68000000000000:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333 + \left(0.0007936500793651 \cdot z - 0.0027777777777778\right) \cdot z}{x}\\ \mathbf{elif}\;x \leq 2 \cdot 10^{+130}:\\ \;\;\;\;t_0 + t_1\\ \mathbf{else}:\\ \;\;\;\;t_0 + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 3
Error4.0
Cost8012
\[\begin{array}{l} t_0 := \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ \mathbf{if}\;x \leq 2.5 \cdot 10^{-10}:\\ \;\;\;\;\left(-0.5 \cdot \log x + 0.91893853320467\right) + t_0\\ \mathbf{elif}\;x \leq 31000000000000:\\ \;\;\;\;\left(\left(x - 0.5\right) \cdot \log x - \left(x - 0.91893853320467\right)\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{+130}:\\ \;\;\;\;x \cdot \left(-1 + \log x\right) + t_0\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 4
Error3.3
Cost8004
\[\begin{array}{l} \mathbf{if}\;x \leq 10^{+130}:\\ \;\;\;\;\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}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 5
Error3.3
Cost8004
\[\begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{+129}:\\ \;\;\;\;\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}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 6
Error4.3
Cost7748
\[\begin{array}{l} \mathbf{if}\;x \leq 1.5 \cdot 10^{+130}:\\ \;\;\;\;x \cdot \left(-1 + \log x\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 7
Error9.1
Cost7620
\[\begin{array}{l} \mathbf{if}\;x \leq 2.5 \cdot 10^{-10}:\\ \;\;\;\;\left(-0.5 \cdot \log x + 0.91893853320467\right) + \frac{\left(0.0007936500793651 \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x - 0.5\right) \cdot \log x - \left(x - 0.91893853320467\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 8
Error9.3
Cost7620
\[\begin{array}{l} \mathbf{if}\;x \leq 3.3 \cdot 10^{-12}:\\ \;\;\;\;\left(-0.5 \cdot \log x + 0.91893853320467\right) + \frac{\left(z \cdot y - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x - 0.5\right) \cdot \log x - \left(x - 0.91893853320467\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
Alternative 9
Error12.0
Cost7360
\[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.0069444444444443885}{0.083333333333333 \cdot x} \]
Alternative 10
Error12.0
Cost7232
\[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
Alternative 11
Error12.0
Cost7232
\[\left(\left(x - 0.5\right) \cdot \log x - \left(x - 0.91893853320467\right)\right) + \frac{0.083333333333333}{x} \]
Alternative 12
Error13.0
Cost7104
\[x \cdot \left(-1 - \log \left(\frac{1}{x}\right)\right) + \frac{0.083333333333333}{x} \]
Alternative 13
Error42.9
Cost192
\[\frac{0.083333333333333}{x} \]

Error

Reproduce?

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