Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B

Percentage Accurate: 94.0% → 99.6%
Time: 18.8s
Alternatives: 16
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \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} \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)))
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);
}
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
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);
}
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)
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 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
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]
\begin{array}{l}

\\
\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}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 16 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 94.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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} \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)))
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);
}
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
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);
}
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)
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 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
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]
\begin{array}{l}

\\
\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}
\end{array}

Alternative 1: 99.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{-22}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) - \frac{z \cdot \left(0.0027777777777778 - z \cdot \left(0.0007936500793651 + y\right)\right) - 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{1}{x} \cdot 0.083333333333333 + z \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{z}{x}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 5e-22)
   (-
    (+ 0.91893853320467 (* (log x) -0.5))
    (/
     (-
      (* z (- 0.0027777777777778 (* z (+ 0.0007936500793651 y))))
      0.083333333333333)
     x))
   (+
    (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
    (+
     (* (/ 1.0 x) 0.083333333333333)
     (* z (* (+ 0.0007936500793651 y) (/ z x)))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 5e-22) {
		tmp = (0.91893853320467 + (log(x) * -0.5)) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x);
	} else {
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (((1.0 / x) * 0.083333333333333) + (z * ((0.0007936500793651 + y) * (z / 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
    real(8) :: tmp
    if (x <= 5d-22) then
        tmp = (0.91893853320467d0 + (log(x) * (-0.5d0))) - (((z * (0.0027777777777778d0 - (z * (0.0007936500793651d0 + y)))) - 0.083333333333333d0) / x)
    else
        tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (((1.0d0 / x) * 0.083333333333333d0) + (z * ((0.0007936500793651d0 + y) * (z / x))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 5e-22) {
		tmp = (0.91893853320467 + (Math.log(x) * -0.5)) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x);
	} else {
		tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (((1.0 / x) * 0.083333333333333) + (z * ((0.0007936500793651 + y) * (z / x))));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 5e-22:
		tmp = (0.91893853320467 + (math.log(x) * -0.5)) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x)
	else:
		tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (((1.0 / x) * 0.083333333333333) + (z * ((0.0007936500793651 + y) * (z / x))))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 5e-22)
		tmp = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) - Float64(Float64(Float64(z * Float64(0.0027777777777778 - Float64(z * Float64(0.0007936500793651 + y)))) - 0.083333333333333) / x));
	else
		tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(1.0 / x) * 0.083333333333333) + Float64(z * Float64(Float64(0.0007936500793651 + y) * Float64(z / x)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 5e-22)
		tmp = (0.91893853320467 + (log(x) * -0.5)) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x);
	else
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (((1.0 / x) * 0.083333333333333) + (z * ((0.0007936500793651 + y) * (z / x))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 5e-22], N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z * N[(0.0027777777777778 - N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(1.0 / x), $MachinePrecision] * 0.083333333333333), $MachinePrecision] + N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{-22}:\\
\;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) - \frac{z \cdot \left(0.0027777777777778 - z \cdot \left(0.0007936500793651 + y\right)\right) - 0.083333333333333}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 4.99999999999999954e-22

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in x around 0 99.6%

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

    if 4.99999999999999954e-22 < x

    1. Initial program 89.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. Add Preprocessing
    3. Taylor expanded in z around 0 99.5%

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\color{blue}{{z}^{2} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
    5. Step-by-step derivation
      1. unpow293.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\color{blue}{\left(z \cdot z\right)} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      2. associate-*l*99.5%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\color{blue}{z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      3. distribute-rgt-in98.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \color{blue}{\left(\left(0.0007936500793651 \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      4. associate-*r/98.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot 1}{x}} \cdot z + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      5. metadata-eval98.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\frac{\color{blue}{0.0007936500793651}}{x} \cdot z + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      6. associate-*l/98.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{\frac{0.0007936500793651 \cdot z}{x}} + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      7. associate-*r/98.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{0.0007936500793651 \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      8. associate-*l/98.2%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      9. associate-/l*98.9%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(0.0007936500793651 \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      10. distribute-rgt-out99.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{-22}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) - \frac{z \cdot \left(0.0027777777777778 - z \cdot \left(0.0007936500793651 + y\right)\right) - 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{1}{x} \cdot 0.083333333333333 + z \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{z}{x}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 95.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := z \cdot \left(0.0007936500793651 + y\right)\\ t_1 := t\_0 - 0.0027777777777778\\ \mathbf{if}\;z \cdot t\_1 \leq 5 \cdot 10^{+297}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) - \frac{z \cdot \left(0.0027777777777778 - t\_0\right) - 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \left(\frac{1}{x} \cdot 0.083333333333333 + z \cdot \frac{t\_1}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* z (+ 0.0007936500793651 y))) (t_1 (- t_0 0.0027777777777778)))
   (if (<= (* z t_1) 5e+297)
     (-
      (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
      (/ (- (* z (- 0.0027777777777778 t_0)) 0.083333333333333) x))
     (+
      (+ 0.91893853320467 (* (log x) -0.5))
      (+ (* (/ 1.0 x) 0.083333333333333) (* z (/ t_1 x)))))))
double code(double x, double y, double z) {
	double t_0 = z * (0.0007936500793651 + y);
	double t_1 = t_0 - 0.0027777777777778;
	double tmp;
	if ((z * t_1) <= 5e+297) {
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) - (((z * (0.0027777777777778 - t_0)) - 0.083333333333333) / x);
	} else {
		tmp = (0.91893853320467 + (log(x) * -0.5)) + (((1.0 / x) * 0.083333333333333) + (z * (t_1 / 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
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = z * (0.0007936500793651d0 + y)
    t_1 = t_0 - 0.0027777777777778d0
    if ((z * t_1) <= 5d+297) then
        tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) - (((z * (0.0027777777777778d0 - t_0)) - 0.083333333333333d0) / x)
    else
        tmp = (0.91893853320467d0 + (log(x) * (-0.5d0))) + (((1.0d0 / x) * 0.083333333333333d0) + (z * (t_1 / x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = z * (0.0007936500793651 + y);
	double t_1 = t_0 - 0.0027777777777778;
	double tmp;
	if ((z * t_1) <= 5e+297) {
		tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) - (((z * (0.0027777777777778 - t_0)) - 0.083333333333333) / x);
	} else {
		tmp = (0.91893853320467 + (Math.log(x) * -0.5)) + (((1.0 / x) * 0.083333333333333) + (z * (t_1 / x)));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = z * (0.0007936500793651 + y)
	t_1 = t_0 - 0.0027777777777778
	tmp = 0
	if (z * t_1) <= 5e+297:
		tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) - (((z * (0.0027777777777778 - t_0)) - 0.083333333333333) / x)
	else:
		tmp = (0.91893853320467 + (math.log(x) * -0.5)) + (((1.0 / x) * 0.083333333333333) + (z * (t_1 / x)))
	return tmp
function code(x, y, z)
	t_0 = Float64(z * Float64(0.0007936500793651 + y))
	t_1 = Float64(t_0 - 0.0027777777777778)
	tmp = 0.0
	if (Float64(z * t_1) <= 5e+297)
		tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) - Float64(Float64(Float64(z * Float64(0.0027777777777778 - t_0)) - 0.083333333333333) / x));
	else
		tmp = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) + Float64(Float64(Float64(1.0 / x) * 0.083333333333333) + Float64(z * Float64(t_1 / x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = z * (0.0007936500793651 + y);
	t_1 = t_0 - 0.0027777777777778;
	tmp = 0.0;
	if ((z * t_1) <= 5e+297)
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) - (((z * (0.0027777777777778 - t_0)) - 0.083333333333333) / x);
	else
		tmp = (0.91893853320467 + (log(x) * -0.5)) + (((1.0 / x) * 0.083333333333333) + (z * (t_1 / x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - 0.0027777777777778), $MachinePrecision]}, If[LessEqual[N[(z * t$95$1), $MachinePrecision], 5e+297], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] - N[(N[(N[(z * N[(0.0027777777777778 - t$95$0), $MachinePrecision]), $MachinePrecision] - 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(1.0 / x), $MachinePrecision] * 0.083333333333333), $MachinePrecision] + N[(z * N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := z \cdot \left(0.0007936500793651 + y\right)\\
t_1 := t\_0 - 0.0027777777777778\\
\mathbf{if}\;z \cdot t\_1 \leq 5 \cdot 10^{+297}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) - \frac{z \cdot \left(0.0027777777777778 - t\_0\right) - 0.083333333333333}{x}\\

\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \left(\frac{1}{x} \cdot 0.083333333333333 + z \cdot \frac{t\_1}{x}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 4.9999999999999998e297

    1. Initial program 98.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. Add Preprocessing

    if 4.9999999999999998e297 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z)

    1. Initial program 79.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. Add Preprocessing
    3. Taylor expanded in z around 0 99.9%

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{\frac{z \cdot \left(0.0007936500793651 + y\right)}{x}} - 0.0027777777777778 \cdot \frac{1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
    5. Taylor expanded in x around 0 88.8%

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

      \[\leadsto \left(-0.5 \cdot \log x + 0.91893853320467\right) + \left(\color{blue}{-1 \cdot \frac{z \cdot \left(0.0027777777777778 + -1 \cdot \left(z \cdot \left(0.0007936500793651 + y\right)\right)\right)}{x}} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
    7. Step-by-step derivation
      1. mul-1-neg79.9%

        \[\leadsto \left(-0.5 \cdot \log x + 0.91893853320467\right) + \left(\color{blue}{\left(-\frac{z \cdot \left(0.0027777777777778 + -1 \cdot \left(z \cdot \left(0.0007936500793651 + y\right)\right)\right)}{x}\right)} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      2. associate-/l*88.8%

        \[\leadsto \left(-0.5 \cdot \log x + 0.91893853320467\right) + \left(\left(-\color{blue}{z \cdot \frac{0.0027777777777778 + -1 \cdot \left(z \cdot \left(0.0007936500793651 + y\right)\right)}{x}}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      3. distribute-lft-neg-in88.8%

        \[\leadsto \left(-0.5 \cdot \log x + 0.91893853320467\right) + \left(\color{blue}{\left(-z\right) \cdot \frac{0.0027777777777778 + -1 \cdot \left(z \cdot \left(0.0007936500793651 + y\right)\right)}{x}} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      4. mul-1-neg88.8%

        \[\leadsto \left(-0.5 \cdot \log x + 0.91893853320467\right) + \left(\left(-z\right) \cdot \frac{0.0027777777777778 + \color{blue}{\left(-z \cdot \left(0.0007936500793651 + y\right)\right)}}{x} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      5. unsub-neg88.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right) \leq 5 \cdot 10^{+297}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) - \frac{z \cdot \left(0.0027777777777778 - z \cdot \left(0.0007936500793651 + y\right)\right) - 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \left(\frac{1}{x} \cdot 0.083333333333333 + z \cdot \frac{z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 97.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) - \left(z \cdot \left(0.0027777777777778 \cdot \frac{1}{x} - \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}\right) + 0.083333333333333 \cdot \frac{-1}{x}\right) \end{array} \]
(FPCore (x y z)
 :precision binary64
 (-
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (+
   (*
    z
    (- (* 0.0027777777777778 (/ 1.0 x)) (/ (* z (+ 0.0007936500793651 y)) x)))
   (* 0.083333333333333 (/ -1.0 x)))))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) - ((z * ((0.0027777777777778 * (1.0 / x)) - ((z * (0.0007936500793651 + y)) / x))) + (0.083333333333333 * (-1.0 / x)));
}
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) - ((z * ((0.0027777777777778d0 * (1.0d0 / x)) - ((z * (0.0007936500793651d0 + y)) / x))) + (0.083333333333333d0 * ((-1.0d0) / x)))
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) - ((z * ((0.0027777777777778 * (1.0 / x)) - ((z * (0.0007936500793651 + y)) / x))) + (0.083333333333333 * (-1.0 / x)));
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) - ((z * ((0.0027777777777778 * (1.0 / x)) - ((z * (0.0007936500793651 + y)) / x))) + (0.083333333333333 * (-1.0 / x)))
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) - Float64(Float64(z * Float64(Float64(0.0027777777777778 * Float64(1.0 / x)) - Float64(Float64(z * Float64(0.0007936500793651 + y)) / x))) + Float64(0.083333333333333 * Float64(-1.0 / x))))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) - ((z * ((0.0027777777777778 * (1.0 / x)) - ((z * (0.0007936500793651 + y)) / x))) + (0.083333333333333 * (-1.0 / x)));
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[(z * N[(N[(0.0027777777777778 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) - \left(z \cdot \left(0.0027777777777778 \cdot \frac{1}{x} - \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}\right) + 0.083333333333333 \cdot \frac{-1}{x}\right)
\end{array}
Derivation
  1. Initial program 93.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. Add Preprocessing
  3. Taylor expanded in z around 0 95.8%

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

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

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) - \left(z \cdot \left(0.0027777777777778 \cdot \frac{1}{x} - \frac{z \cdot \left(0.0007936500793651 + y\right)}{x}\right) + 0.083333333333333 \cdot \frac{-1}{x}\right) \]
  6. Add Preprocessing

Alternative 4: 84.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2500000:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) - \frac{z \cdot \left(0.0027777777777778 - z \cdot \left(0.0007936500793651 + y\right)\right) - 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 2500000.0)
   (-
    (+ 0.91893853320467 (* (log x) -0.5))
    (/
     (-
      (* z (- 0.0027777777777778 (* z (+ 0.0007936500793651 y))))
      0.083333333333333)
     x))
   (+
    (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
    (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 2500000.0) {
		tmp = (0.91893853320467 + (log(x) * -0.5)) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x);
	} else {
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (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
    real(8) :: tmp
    if (x <= 2500000.0d0) then
        tmp = (0.91893853320467d0 + (log(x) * (-0.5d0))) - (((z * (0.0027777777777778d0 - (z * (0.0007936500793651d0 + y)))) - 0.083333333333333d0) / x)
    else
        tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 2500000.0) {
		tmp = (0.91893853320467 + (Math.log(x) * -0.5)) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x);
	} else {
		tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 2500000.0:
		tmp = (0.91893853320467 + (math.log(x) * -0.5)) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x)
	else:
		tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 2500000.0)
		tmp = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) - Float64(Float64(Float64(z * Float64(0.0027777777777778 - Float64(z * Float64(0.0007936500793651 + y)))) - 0.083333333333333) / x));
	else
		tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 2500000.0)
		tmp = (0.91893853320467 + (log(x) * -0.5)) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x);
	else
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 2500000.0], N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z * N[(0.0027777777777778 - N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2500000:\\
\;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) - \frac{z \cdot \left(0.0027777777777778 - z \cdot \left(0.0007936500793651 + y\right)\right) - 0.083333333333333}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.5e6

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in x around 0 99.6%

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

    if 2.5e6 < x

    1. Initial program 88.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. Add Preprocessing
    3. Taylor expanded in z around 0 74.8%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2500000:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) - \frac{z \cdot \left(0.0027777777777778 - z \cdot \left(0.0007936500793651 + y\right)\right) - 0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 94.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) - \frac{z \cdot \left(0.0027777777777778 - z \cdot \left(0.0007936500793651 + y\right)\right) - 0.083333333333333}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (-
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (/
   (-
    (* z (- 0.0027777777777778 (* z (+ 0.0007936500793651 y))))
    0.083333333333333)
   x)))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x);
}
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) - (((z * (0.0027777777777778d0 - (z * (0.0007936500793651d0 + y)))) - 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x);
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x)
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) - Float64(Float64(Float64(z * Float64(0.0027777777777778 - Float64(z * Float64(0.0007936500793651 + y)))) - 0.083333333333333) / x))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x);
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[(z * N[(0.0027777777777778 - N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) - \frac{z \cdot \left(0.0027777777777778 - z \cdot \left(0.0007936500793651 + y\right)\right) - 0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 93.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. Add Preprocessing
  3. Final simplification93.9%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) - \frac{z \cdot \left(0.0027777777777778 - z \cdot \left(0.0007936500793651 + y\right)\right) - 0.083333333333333}{x} \]
  4. Add Preprocessing

Alternative 6: 63.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.22 \cdot 10^{-17}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \left(\frac{1}{x} \cdot 0.083333333333333 + \frac{z}{x} \cdot -0.0027777777777778\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 1.22e-17)
   (+
    (+ 0.91893853320467 (* (log x) -0.5))
    (+ (* (/ 1.0 x) 0.083333333333333) (* (/ z x) -0.0027777777777778)))
   (+
    (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
    (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 1.22e-17) {
		tmp = (0.91893853320467 + (log(x) * -0.5)) + (((1.0 / x) * 0.083333333333333) + ((z / x) * -0.0027777777777778));
	} else {
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (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
    real(8) :: tmp
    if (x <= 1.22d-17) then
        tmp = (0.91893853320467d0 + (log(x) * (-0.5d0))) + (((1.0d0 / x) * 0.083333333333333d0) + ((z / x) * (-0.0027777777777778d0)))
    else
        tmp = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + (0.083333333333333d0 / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 1.22e-17) {
		tmp = (0.91893853320467 + (Math.log(x) * -0.5)) + (((1.0 / x) * 0.083333333333333) + ((z / x) * -0.0027777777777778));
	} else {
		tmp = ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 1.22e-17:
		tmp = (0.91893853320467 + (math.log(x) * -0.5)) + (((1.0 / x) * 0.083333333333333) + ((z / x) * -0.0027777777777778))
	else:
		tmp = ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 1.22e-17)
		tmp = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) + Float64(Float64(Float64(1.0 / x) * 0.083333333333333) + Float64(Float64(z / x) * -0.0027777777777778)));
	else
		tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 1.22e-17)
		tmp = (0.91893853320467 + (log(x) * -0.5)) + (((1.0 / x) * 0.083333333333333) + ((z / x) * -0.0027777777777778));
	else
		tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 1.22e-17], N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(1.0 / x), $MachinePrecision] * 0.083333333333333), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.22 \cdot 10^{-17}:\\
\;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \left(\frac{1}{x} \cdot 0.083333333333333 + \frac{z}{x} \cdot -0.0027777777777778\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.22e-17

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in z around 0 91.4%

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(z \cdot \left(\color{blue}{\frac{z \cdot \left(0.0007936500793651 + y\right)}{x}} - 0.0027777777777778 \cdot \frac{1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
    5. Taylor expanded in x around 0 97.3%

      \[\leadsto \left(\color{blue}{-0.5 \cdot \log x} + 0.91893853320467\right) + \left(z \cdot \left(\frac{z \cdot \left(0.0007936500793651 + y\right)}{x} - 0.0027777777777778 \cdot \frac{1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right) \]
    6. Taylor expanded in z around 0 58.1%

      \[\leadsto \left(-0.5 \cdot \log x + 0.91893853320467\right) + \left(\color{blue}{-0.0027777777777778 \cdot \frac{z}{x}} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
    7. Step-by-step derivation
      1. *-commutative58.1%

        \[\leadsto \left(-0.5 \cdot \log x + 0.91893853320467\right) + \left(\color{blue}{\frac{z}{x} \cdot -0.0027777777777778} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
    8. Simplified58.1%

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

    if 1.22e-17 < x

    1. Initial program 89.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. Add Preprocessing
    3. Taylor expanded in z around 0 72.1%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.22 \cdot 10^{-17}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + \left(\frac{1}{x} \cdot 0.083333333333333 + \frac{z}{x} \cdot -0.0027777777777778\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 93.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) - \frac{z \cdot \left(0.0027777777777778 - z \cdot \left(0.0007936500793651 + y\right)\right) - 0.083333333333333}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (-
  (+ 0.91893853320467 (* x (+ (log x) -1.0)))
  (/
   (-
    (* z (- 0.0027777777777778 (* z (+ 0.0007936500793651 y))))
    0.083333333333333)
   x)))
double code(double x, double y, double z) {
	return (0.91893853320467 + (x * (log(x) + -1.0))) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (0.91893853320467d0 + (x * (log(x) + (-1.0d0)))) - (((z * (0.0027777777777778d0 - (z * (0.0007936500793651d0 + y)))) - 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
	return (0.91893853320467 + (x * (Math.log(x) + -1.0))) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x);
}
def code(x, y, z):
	return (0.91893853320467 + (x * (math.log(x) + -1.0))) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x)
function code(x, y, z)
	return Float64(Float64(0.91893853320467 + Float64(x * Float64(log(x) + -1.0))) - Float64(Float64(Float64(z * Float64(0.0027777777777778 - Float64(z * Float64(0.0007936500793651 + y)))) - 0.083333333333333) / x))
end
function tmp = code(x, y, z)
	tmp = (0.91893853320467 + (x * (log(x) + -1.0))) - (((z * (0.0027777777777778 - (z * (0.0007936500793651 + y)))) - 0.083333333333333) / x);
end
code[x_, y_, z_] := N[(N[(0.91893853320467 + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z * N[(0.0027777777777778 - N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) - \frac{z \cdot \left(0.0027777777777778 - z \cdot \left(0.0007936500793651 + y\right)\right) - 0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 93.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. Add Preprocessing
  3. Taylor expanded in x around inf 93.3%

    \[\leadsto \left(\color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  4. Step-by-step derivation
    1. sub-neg60.0%

      \[\leadsto \left(x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    2. mul-1-neg60.0%

      \[\leadsto \left(x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + \left(-1\right)\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    3. log-rec59.6%

      \[\leadsto \left(x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    4. remove-double-neg59.6%

      \[\leadsto \left(x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    5. metadata-eval59.6%

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

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

    \[\leadsto \left(\color{blue}{x \cdot \left(-1 + \log x\right)} + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  6. Final simplification93.3%

    \[\leadsto \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) - \frac{z \cdot \left(0.0027777777777778 - z \cdot \left(0.0007936500793651 + y\right)\right) - 0.083333333333333}{x} \]
  7. Add Preprocessing

Alternative 8: 57.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.33:\\ \;\;\;\;\frac{1}{x} \cdot 0.083333333333333 + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 0.33)
   (+ (* (/ 1.0 x) 0.083333333333333) (+ 0.91893853320467 (* (log x) -0.5)))
   (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 0.33) {
		tmp = ((1.0 / x) * 0.083333333333333) + (0.91893853320467 + (log(x) * -0.5));
	} else {
		tmp = x * (log(x) + -1.0);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= 0.33d0) then
        tmp = ((1.0d0 / x) * 0.083333333333333d0) + (0.91893853320467d0 + (log(x) * (-0.5d0)))
    else
        tmp = x * (log(x) + (-1.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 0.33) {
		tmp = ((1.0 / x) * 0.083333333333333) + (0.91893853320467 + (Math.log(x) * -0.5));
	} else {
		tmp = x * (Math.log(x) + -1.0);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 0.33:
		tmp = ((1.0 / x) * 0.083333333333333) + (0.91893853320467 + (math.log(x) * -0.5))
	else:
		tmp = x * (math.log(x) + -1.0)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 0.33)
		tmp = Float64(Float64(Float64(1.0 / x) * 0.083333333333333) + Float64(0.91893853320467 + Float64(log(x) * -0.5)));
	else
		tmp = Float64(x * Float64(log(x) + -1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 0.33)
		tmp = ((1.0 / x) * 0.083333333333333) + (0.91893853320467 + (log(x) * -0.5));
	else
		tmp = x * (log(x) + -1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 0.33], N[(N[(N[(1.0 / x), $MachinePrecision] * 0.083333333333333), $MachinePrecision] + N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.33:\\
\;\;\;\;\frac{1}{x} \cdot 0.083333333333333 + \left(0.91893853320467 + \log x \cdot -0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 0.330000000000000016

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in z around 0 45.7%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    4. Taylor expanded in x around 0 45.7%

      \[\leadsto \left(\color{blue}{-0.5 \cdot \log x} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    5. Step-by-step derivation
      1. div-inv45.3%

        \[\leadsto \color{blue}{0.083333333333333 \cdot \frac{1}{x}} \]
      2. *-commutative45.3%

        \[\leadsto \color{blue}{\frac{1}{x} \cdot 0.083333333333333} \]
    6. Applied egg-rr45.7%

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

    if 0.330000000000000016 < x

    1. Initial program 88.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. Step-by-step derivation
      1. sub-neg88.6%

        \[\leadsto \left(\color{blue}{\left(\left(x - 0.5\right) \cdot \log x + \left(-x\right)\right)} + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. associate-+l+88.6%

        \[\leadsto \color{blue}{\left(\left(x - 0.5\right) \cdot \log x + \left(\left(-x\right) + 0.91893853320467\right)\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      3. fma-define88.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 0.5, \log x, \left(-x\right) + 0.91893853320467\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      4. sub-neg88.8%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-0.5\right)}, \log x, \left(-x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      5. metadata-eval88.8%

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

        \[\leadsto \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} \]
      7. unsub-neg88.8%

        \[\leadsto \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} \]
      8. *-commutative88.8%

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}{x} \]
      11. metadata-eval88.8%

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

      \[\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}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 73.4%

      \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\color{blue}{0.083333333333333}}{x} \]
    6. Taylor expanded in x around inf 72.6%

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} \]
    7. Step-by-step derivation
      1. sub-neg72.6%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} \]
      2. mul-1-neg72.6%

        \[\leadsto x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + \left(-1\right)\right) \]
      3. log-rec72.6%

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) \]
      4. remove-double-neg72.6%

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) \]
      5. metadata-eval72.6%

        \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) \]
    8. Simplified72.6%

      \[\leadsto \color{blue}{x \cdot \left(\log x + -1\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.33:\\ \;\;\;\;\frac{1}{x} \cdot 0.083333333333333 + \left(0.91893853320467 + \log x \cdot -0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 57.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x} \cdot 0.083333333333333 \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (* (/ 1.0 x) 0.083333333333333)))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((1.0 / x) * 0.083333333333333);
}
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) + ((1.0d0 / x) * 0.083333333333333d0)
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((1.0 / x) * 0.083333333333333);
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((1.0 / x) * 0.083333333333333)
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(1.0 / x) * 0.083333333333333))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((1.0 / x) * 0.083333333333333);
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[(1.0 / x), $MachinePrecision] * 0.083333333333333), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x} \cdot 0.083333333333333
\end{array}
Derivation
  1. Initial program 93.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. Add Preprocessing
  3. Taylor expanded in z around 0 60.1%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
  4. Step-by-step derivation
    1. div-inv23.3%

      \[\leadsto \color{blue}{0.083333333333333 \cdot \frac{1}{x}} \]
    2. *-commutative23.3%

      \[\leadsto \color{blue}{\frac{1}{x} \cdot 0.083333333333333} \]
  5. Applied egg-rr60.1%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{x} \cdot 0.083333333333333} \]
  6. Final simplification60.1%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x} \cdot 0.083333333333333 \]
  7. Add Preprocessing

Alternative 10: 57.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
  (/ 1.0 (* x 12.000000000000048))))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048));
}
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) + (1.0d0 / (x * 12.000000000000048d0))
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048));
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048))
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(1.0 / Float64(x * 12.000000000000048)))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (1.0 / (x * 12.000000000000048));
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[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048}
\end{array}
Derivation
  1. Initial program 93.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. Add Preprocessing
  3. Step-by-step derivation
    1. add-cbrt-cube71.3%

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \sqrt[3]{\color{blue}{{\left(\frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\right)}^{3}}} \]
    3. *-commutative71.3%

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \sqrt[3]{{\left(\frac{\color{blue}{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778, 0.083333333333333\right)}}{x}\right)}^{3}} \]
    5. fma-neg71.3%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \sqrt[3]{{\left(\frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}{x}\right)}^{3}} \]
    6. metadata-eval71.3%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \sqrt[3]{{\left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, \color{blue}{-0.0027777777777778}\right), 0.083333333333333\right)}{x}\right)}^{3}} \]
  4. Applied egg-rr71.3%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\sqrt[3]{{\left(\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}\right)}^{3}}} \]
  5. Taylor expanded in z around 0 56.9%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \sqrt[3]{\color{blue}{\frac{0.0005787037037036967}{{x}^{3}}}} \]
  6. Step-by-step derivation
    1. metadata-eval56.9%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \sqrt[3]{\frac{\color{blue}{{0.083333333333333}^{3}}}{{x}^{3}}} \]
    2. cube-div56.9%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \sqrt[3]{\color{blue}{{\left(\frac{0.083333333333333}{x}\right)}^{3}}} \]
  7. Simplified56.9%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \sqrt[3]{\color{blue}{{\left(\frac{0.083333333333333}{x}\right)}^{3}}} \]
  8. Step-by-step derivation
    1. rem-cbrt-cube60.1%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    2. clear-num60.1%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}} \]
    3. div-inv60.2%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{\color{blue}{x \cdot \frac{1}{0.083333333333333}}} \]
    4. metadata-eval60.2%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot \color{blue}{12.000000000000048}} \]
  9. Applied egg-rr60.2%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{1}{x \cdot 12.000000000000048}} \]
  10. Final simplification60.2%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048} \]
  11. Add Preprocessing

Alternative 11: 57.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.33:\\ \;\;\;\;0.91893853320467 + \left(\log x \cdot -0.5 + \frac{0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 0.33)
   (+ 0.91893853320467 (+ (* (log x) -0.5) (/ 0.083333333333333 x)))
   (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 0.33) {
		tmp = 0.91893853320467 + ((log(x) * -0.5) + (0.083333333333333 / x));
	} else {
		tmp = x * (log(x) + -1.0);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= 0.33d0) then
        tmp = 0.91893853320467d0 + ((log(x) * (-0.5d0)) + (0.083333333333333d0 / x))
    else
        tmp = x * (log(x) + (-1.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 0.33) {
		tmp = 0.91893853320467 + ((Math.log(x) * -0.5) + (0.083333333333333 / x));
	} else {
		tmp = x * (Math.log(x) + -1.0);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 0.33:
		tmp = 0.91893853320467 + ((math.log(x) * -0.5) + (0.083333333333333 / x))
	else:
		tmp = x * (math.log(x) + -1.0)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 0.33)
		tmp = Float64(0.91893853320467 + Float64(Float64(log(x) * -0.5) + Float64(0.083333333333333 / x)));
	else
		tmp = Float64(x * Float64(log(x) + -1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 0.33)
		tmp = 0.91893853320467 + ((log(x) * -0.5) + (0.083333333333333 / x));
	else
		tmp = x * (log(x) + -1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 0.33], N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.33:\\
\;\;\;\;0.91893853320467 + \left(\log x \cdot -0.5 + \frac{0.083333333333333}{x}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 0.330000000000000016

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in z around 0 45.7%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    4. Taylor expanded in x around 0 45.7%

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

      \[\leadsto \color{blue}{0.91893853320467 + \left(0.5 \cdot \log \left(\frac{1}{x}\right) + 0.083333333333333 \cdot \frac{1}{x}\right)} \]
    6. Step-by-step derivation
      1. *-commutative45.7%

        \[\leadsto 0.91893853320467 + \left(\color{blue}{\log \left(\frac{1}{x}\right) \cdot 0.5} + 0.083333333333333 \cdot \frac{1}{x}\right) \]
      2. div-inv45.7%

        \[\leadsto 0.91893853320467 + \left(\log \left(\frac{1}{x}\right) \cdot 0.5 + \color{blue}{\frac{0.083333333333333}{x}}\right) \]
      3. fma-define45.7%

        \[\leadsto 0.91893853320467 + \color{blue}{\mathsf{fma}\left(\log \left(\frac{1}{x}\right), 0.5, \frac{0.083333333333333}{x}\right)} \]
      4. log-rec45.7%

        \[\leadsto 0.91893853320467 + \mathsf{fma}\left(\color{blue}{-\log x}, 0.5, \frac{0.083333333333333}{x}\right) \]
    7. Applied egg-rr45.7%

      \[\leadsto 0.91893853320467 + \color{blue}{\mathsf{fma}\left(-\log x, 0.5, \frac{0.083333333333333}{x}\right)} \]
    8. Step-by-step derivation
      1. fma-undefine45.7%

        \[\leadsto 0.91893853320467 + \color{blue}{\left(\left(-\log x\right) \cdot 0.5 + \frac{0.083333333333333}{x}\right)} \]
      2. *-commutative45.7%

        \[\leadsto 0.91893853320467 + \left(\color{blue}{0.5 \cdot \left(-\log x\right)} + \frac{0.083333333333333}{x}\right) \]
      3. +-commutative45.7%

        \[\leadsto 0.91893853320467 + \color{blue}{\left(\frac{0.083333333333333}{x} + 0.5 \cdot \left(-\log x\right)\right)} \]
      4. neg-mul-145.7%

        \[\leadsto 0.91893853320467 + \left(\frac{0.083333333333333}{x} + 0.5 \cdot \color{blue}{\left(-1 \cdot \log x\right)}\right) \]
      5. associate-*r*45.7%

        \[\leadsto 0.91893853320467 + \left(\frac{0.083333333333333}{x} + \color{blue}{\left(0.5 \cdot -1\right) \cdot \log x}\right) \]
      6. metadata-eval45.7%

        \[\leadsto 0.91893853320467 + \left(\frac{0.083333333333333}{x} + \color{blue}{-0.5} \cdot \log x\right) \]
      7. *-commutative45.7%

        \[\leadsto 0.91893853320467 + \left(\frac{0.083333333333333}{x} + \color{blue}{\log x \cdot -0.5}\right) \]
    9. Simplified45.7%

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

    if 0.330000000000000016 < x

    1. Initial program 88.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. Step-by-step derivation
      1. sub-neg88.6%

        \[\leadsto \left(\color{blue}{\left(\left(x - 0.5\right) \cdot \log x + \left(-x\right)\right)} + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. associate-+l+88.6%

        \[\leadsto \color{blue}{\left(\left(x - 0.5\right) \cdot \log x + \left(\left(-x\right) + 0.91893853320467\right)\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      3. fma-define88.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 0.5, \log x, \left(-x\right) + 0.91893853320467\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      4. sub-neg88.8%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-0.5\right)}, \log x, \left(-x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      5. metadata-eval88.8%

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

        \[\leadsto \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} \]
      7. unsub-neg88.8%

        \[\leadsto \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} \]
      8. *-commutative88.8%

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}{x} \]
      11. metadata-eval88.8%

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

      \[\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}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 73.4%

      \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\color{blue}{0.083333333333333}}{x} \]
    6. Taylor expanded in x around inf 72.6%

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} \]
    7. Step-by-step derivation
      1. sub-neg72.6%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} \]
      2. mul-1-neg72.6%

        \[\leadsto x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + \left(-1\right)\right) \]
      3. log-rec72.6%

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) \]
      4. remove-double-neg72.6%

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) \]
      5. metadata-eval72.6%

        \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) \]
    8. Simplified72.6%

      \[\leadsto \color{blue}{x \cdot \left(\log x + -1\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.33:\\ \;\;\;\;0.91893853320467 + \left(\log x \cdot -0.5 + \frac{0.083333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 57.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
}
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) + (0.083333333333333d0 / x)
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x)
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(0.083333333333333 / x))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + (0.083333333333333 / x);
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[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 93.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. Add Preprocessing
  3. Taylor expanded in z around 0 60.1%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
  4. Final simplification60.1%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
  5. Add Preprocessing

Alternative 13: 56.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \frac{0.083333333333333}{x} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+ (+ 0.91893853320467 (* x (+ (log x) -1.0))) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
	return (0.91893853320467 + (x * (log(x) + -1.0))) + (0.083333333333333 / x);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (0.91893853320467d0 + (x * (log(x) + (-1.0d0)))) + (0.083333333333333d0 / x)
end function
public static double code(double x, double y, double z) {
	return (0.91893853320467 + (x * (Math.log(x) + -1.0))) + (0.083333333333333 / x);
}
def code(x, y, z):
	return (0.91893853320467 + (x * (math.log(x) + -1.0))) + (0.083333333333333 / x)
function code(x, y, z)
	return Float64(Float64(0.91893853320467 + Float64(x * Float64(log(x) + -1.0))) + Float64(0.083333333333333 / x))
end
function tmp = code(x, y, z)
	tmp = (0.91893853320467 + (x * (log(x) + -1.0))) + (0.083333333333333 / x);
end
code[x_, y_, z_] := N[(N[(0.91893853320467 + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 93.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. Add Preprocessing
  3. Taylor expanded in z around 0 60.1%

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

    \[\leadsto \left(\color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
  5. Step-by-step derivation
    1. sub-neg60.0%

      \[\leadsto \left(x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    2. mul-1-neg60.0%

      \[\leadsto \left(x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + \left(-1\right)\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    3. log-rec59.6%

      \[\leadsto \left(x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    4. remove-double-neg59.6%

      \[\leadsto \left(x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    5. metadata-eval59.6%

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

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

    \[\leadsto \left(\color{blue}{x \cdot \left(-1 + \log x\right)} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
  7. Final simplification59.6%

    \[\leadsto \left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \frac{0.083333333333333}{x} \]
  8. Add Preprocessing

Alternative 14: 56.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.33:\\ \;\;\;\;\frac{1}{x} \cdot 0.083333333333333\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 0.33) (* (/ 1.0 x) 0.083333333333333) (* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 0.33) {
		tmp = (1.0 / x) * 0.083333333333333;
	} else {
		tmp = x * (log(x) + -1.0);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= 0.33d0) then
        tmp = (1.0d0 / x) * 0.083333333333333d0
    else
        tmp = x * (log(x) + (-1.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 0.33) {
		tmp = (1.0 / x) * 0.083333333333333;
	} else {
		tmp = x * (Math.log(x) + -1.0);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= 0.33:
		tmp = (1.0 / x) * 0.083333333333333
	else:
		tmp = x * (math.log(x) + -1.0)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= 0.33)
		tmp = Float64(Float64(1.0 / x) * 0.083333333333333);
	else
		tmp = Float64(x * Float64(log(x) + -1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 0.33)
		tmp = (1.0 / x) * 0.083333333333333;
	else
		tmp = x * (log(x) + -1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, 0.33], N[(N[(1.0 / x), $MachinePrecision] * 0.083333333333333), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.33:\\
\;\;\;\;\frac{1}{x} \cdot 0.083333333333333\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 0.330000000000000016

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in z around 0 45.7%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    4. Taylor expanded in x around 0 45.7%

      \[\leadsto \left(\color{blue}{-0.5 \cdot \log x} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
    5. Taylor expanded in x around 0 45.3%

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
    6. Step-by-step derivation
      1. div-inv45.3%

        \[\leadsto \color{blue}{0.083333333333333 \cdot \frac{1}{x}} \]
      2. *-commutative45.3%

        \[\leadsto \color{blue}{\frac{1}{x} \cdot 0.083333333333333} \]
    7. Applied egg-rr45.3%

      \[\leadsto \color{blue}{\frac{1}{x} \cdot 0.083333333333333} \]

    if 0.330000000000000016 < x

    1. Initial program 88.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. Step-by-step derivation
      1. sub-neg88.6%

        \[\leadsto \left(\color{blue}{\left(\left(x - 0.5\right) \cdot \log x + \left(-x\right)\right)} + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      2. associate-+l+88.6%

        \[\leadsto \color{blue}{\left(\left(x - 0.5\right) \cdot \log x + \left(\left(-x\right) + 0.91893853320467\right)\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      3. fma-define88.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x - 0.5, \log x, \left(-x\right) + 0.91893853320467\right)} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      4. sub-neg88.8%

        \[\leadsto \mathsf{fma}\left(\color{blue}{x + \left(-0.5\right)}, \log x, \left(-x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      5. metadata-eval88.8%

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

        \[\leadsto \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} \]
      7. unsub-neg88.8%

        \[\leadsto \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} \]
      8. *-commutative88.8%

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

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

        \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right)}, 0.083333333333333\right)}{x} \]
      11. metadata-eval88.8%

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

      \[\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}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 73.4%

      \[\leadsto \mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\color{blue}{0.083333333333333}}{x} \]
    6. Taylor expanded in x around inf 72.6%

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} \]
    7. Step-by-step derivation
      1. sub-neg72.6%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} \]
      2. mul-1-neg72.6%

        \[\leadsto x \cdot \left(\color{blue}{\left(-\log \left(\frac{1}{x}\right)\right)} + \left(-1\right)\right) \]
      3. log-rec72.6%

        \[\leadsto x \cdot \left(\left(-\color{blue}{\left(-\log x\right)}\right) + \left(-1\right)\right) \]
      4. remove-double-neg72.6%

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) \]
      5. metadata-eval72.6%

        \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) \]
    8. Simplified72.6%

      \[\leadsto \color{blue}{x \cdot \left(\log x + -1\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.33:\\ \;\;\;\;\frac{1}{x} \cdot 0.083333333333333\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 24.2% accurate, 24.6× speedup?

\[\begin{array}{l} \\ \frac{1}{x} \cdot 0.083333333333333 \end{array} \]
(FPCore (x y z) :precision binary64 (* (/ 1.0 x) 0.083333333333333))
double code(double x, double y, double z) {
	return (1.0 / x) * 0.083333333333333;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (1.0d0 / x) * 0.083333333333333d0
end function
public static double code(double x, double y, double z) {
	return (1.0 / x) * 0.083333333333333;
}
def code(x, y, z):
	return (1.0 / x) * 0.083333333333333
function code(x, y, z)
	return Float64(Float64(1.0 / x) * 0.083333333333333)
end
function tmp = code(x, y, z)
	tmp = (1.0 / x) * 0.083333333333333;
end
code[x_, y_, z_] := N[(N[(1.0 / x), $MachinePrecision] * 0.083333333333333), $MachinePrecision]
\begin{array}{l}

\\
\frac{1}{x} \cdot 0.083333333333333
\end{array}
Derivation
  1. Initial program 93.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. Add Preprocessing
  3. Taylor expanded in z around 0 60.1%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
  4. Taylor expanded in x around 0 22.3%

    \[\leadsto \left(\color{blue}{-0.5 \cdot \log x} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
  5. Taylor expanded in x around 0 23.2%

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
  6. Step-by-step derivation
    1. div-inv23.3%

      \[\leadsto \color{blue}{0.083333333333333 \cdot \frac{1}{x}} \]
    2. *-commutative23.3%

      \[\leadsto \color{blue}{\frac{1}{x} \cdot 0.083333333333333} \]
  7. Applied egg-rr23.3%

    \[\leadsto \color{blue}{\frac{1}{x} \cdot 0.083333333333333} \]
  8. Final simplification23.3%

    \[\leadsto \frac{1}{x} \cdot 0.083333333333333 \]
  9. Add Preprocessing

Alternative 16: 24.2% accurate, 41.0× speedup?

\[\begin{array}{l} \\ \frac{0.083333333333333}{x} \end{array} \]
(FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
double code(double x, double y, double z) {
	return 0.083333333333333 / x;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = 0.083333333333333d0 / x
end function
public static double code(double x, double y, double z) {
	return 0.083333333333333 / x;
}
def code(x, y, z):
	return 0.083333333333333 / x
function code(x, y, z)
	return Float64(0.083333333333333 / x)
end
function tmp = code(x, y, z)
	tmp = 0.083333333333333 / x;
end
code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
\begin{array}{l}

\\
\frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 93.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. Add Preprocessing
  3. Taylor expanded in z around 0 60.1%

    \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
  4. Taylor expanded in x around 0 22.3%

    \[\leadsto \left(\color{blue}{-0.5 \cdot \log x} + 0.91893853320467\right) + \frac{0.083333333333333}{x} \]
  5. Taylor expanded in x around 0 23.2%

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
  6. Final simplification23.2%

    \[\leadsto \frac{0.083333333333333}{x} \]
  7. Add Preprocessing

Developer target: 98.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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) \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x))
  (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
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)) + (0.91893853320467d0 - x)) + (0.083333333333333d0 / x)) + ((z / x) * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) + Float64(0.91893853320467 - x)) + Float64(0.083333333333333 / x)) + Float64(Float64(z / x) * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\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)
\end{array}

Reproduce

?
herbie shell --seed 2024059 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
  :precision binary64

  :alt
  (+ (+ (+ (* (- 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)))