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

Percentage Accurate: 93.7% → 99.5%
Time: 15.3s
Alternatives: 12
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 12 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: 93.7% 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.5% accurate, 0.2× speedup?

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

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

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


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

    1. Initial program 99.7%

      \[\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. flip3--99.7%

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000004e43 < x

    1. Initial program 87.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around inf 87.5%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(-0.0027777777777778 \cdot \frac{z}{x} + \frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}\right)} \]
      2. fma-def87.5%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}\right)} \]
      3. associate-/l*90.8%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \frac{{z}^{2}}{\frac{x}{\color{blue}{y + 0.0007936500793651}}}\right) \]
      5. associate-/r/90.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t_0 \leq 2000000:\\
\;\;\;\;t_1 + \frac{0.083333333333333}{x}\\

\mathbf{else}:\\
\;\;\;\;t_1 + z \cdot \left(z \cdot \frac{0.0007936500793651}{x}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < -1.00000000000000006e63

    1. Initial program 90.6%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in y around inf 90.0%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
    3. Step-by-step derivation
      1. associate-/l*96.8%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\frac{x}{\color{blue}{z \cdot z}}} \]
    4. Simplified96.8%

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

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

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{y \cdot \frac{z}{\frac{x}{z}}} \]
    7. Step-by-step derivation
      1. associate-/r/99.2%

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

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

    if -1.00000000000000006e63 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 2e6

    1. Initial program 99.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around 0 98.5%

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

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

    1. Initial program 88.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around inf 76.6%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(-0.0027777777777778 \cdot \frac{z}{x} + \frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}\right)} \]
      2. fma-def76.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}\right)} \]
      3. associate-/l*77.6%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \frac{{z}^{2}}{\frac{x}{\color{blue}{y + 0.0007936500793651}}}\right) \]
      5. associate-/r/77.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \color{blue}{\left(0.0007936500793651 \cdot \frac{z}{x}\right)} \]
    9. Step-by-step derivation
      1. associate-*r/93.8%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \color{blue}{\left(\frac{0.0007936500793651}{x} \cdot z\right)} \]
      3. *-commutative93.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \color{blue}{\left(z \cdot \frac{0.0007936500793651}{x}\right)} \]
    10. Simplified93.8%

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

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

Alternative 3: 99.6% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t_0 + z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{0.0007936500793651}{x}\right)\right)\\


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

    1. Initial program 99.7%

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

    if 3e5 < x

    1. Initial program 89.2%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around inf 89.2%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}\right)} \]
      3. associate-/l*92.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \color{blue}{\frac{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}}\right) \]
      4. +-commutative92.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \frac{{z}^{2}}{\frac{x}{\color{blue}{y + 0.0007936500793651}}}\right) \]
      5. associate-/r/92.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 83.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\ t_1 := 0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+154}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -2.25 \cdot 10^{+108}:\\ \;\;\;\;t_1 + y \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{+30} \lor \neg \left(z \leq 5.1 \cdot 10^{+20}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1 + \frac{0.083333333333333}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0
         (+
          (+ 0.91893853320467 (* -0.5 (log x)))
          (/ (* z z) (/ x (+ y 0.0007936500793651)))))
        (t_1 (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))))
   (if (<= z -5.2e+154)
     t_0
     (if (<= z -2.25e+108)
       (+ t_1 (* y (* z (/ z x))))
       (if (or (<= z -8.8e+30) (not (<= z 5.1e+20)))
         t_0
         (+ t_1 (/ 0.083333333333333 x)))))))
double code(double x, double y, double z) {
	double t_0 = (0.91893853320467 + (-0.5 * log(x))) + ((z * z) / (x / (y + 0.0007936500793651)));
	double t_1 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x);
	double tmp;
	if (z <= -5.2e+154) {
		tmp = t_0;
	} else if (z <= -2.25e+108) {
		tmp = t_1 + (y * (z * (z / x)));
	} else if ((z <= -8.8e+30) || !(z <= 5.1e+20)) {
		tmp = t_0;
	} else {
		tmp = t_1 + (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) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (0.91893853320467d0 + ((-0.5d0) * log(x))) + ((z * z) / (x / (y + 0.0007936500793651d0)))
    t_1 = 0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)
    if (z <= (-5.2d+154)) then
        tmp = t_0
    else if (z <= (-2.25d+108)) then
        tmp = t_1 + (y * (z * (z / x)))
    else if ((z <= (-8.8d+30)) .or. (.not. (z <= 5.1d+20))) then
        tmp = t_0
    else
        tmp = t_1 + (0.083333333333333d0 / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (0.91893853320467 + (-0.5 * Math.log(x))) + ((z * z) / (x / (y + 0.0007936500793651)));
	double t_1 = 0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x);
	double tmp;
	if (z <= -5.2e+154) {
		tmp = t_0;
	} else if (z <= -2.25e+108) {
		tmp = t_1 + (y * (z * (z / x)));
	} else if ((z <= -8.8e+30) || !(z <= 5.1e+20)) {
		tmp = t_0;
	} else {
		tmp = t_1 + (0.083333333333333 / x);
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (0.91893853320467 + (-0.5 * math.log(x))) + ((z * z) / (x / (y + 0.0007936500793651)))
	t_1 = 0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)
	tmp = 0
	if z <= -5.2e+154:
		tmp = t_0
	elif z <= -2.25e+108:
		tmp = t_1 + (y * (z * (z / x)))
	elif (z <= -8.8e+30) or not (z <= 5.1e+20):
		tmp = t_0
	else:
		tmp = t_1 + (0.083333333333333 / x)
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(0.91893853320467 + Float64(-0.5 * log(x))) + Float64(Float64(z * z) / Float64(x / Float64(y + 0.0007936500793651))))
	t_1 = Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x))
	tmp = 0.0
	if (z <= -5.2e+154)
		tmp = t_0;
	elseif (z <= -2.25e+108)
		tmp = Float64(t_1 + Float64(y * Float64(z * Float64(z / x))));
	elseif ((z <= -8.8e+30) || !(z <= 5.1e+20))
		tmp = t_0;
	else
		tmp = Float64(t_1 + Float64(0.083333333333333 / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (0.91893853320467 + (-0.5 * log(x))) + ((z * z) / (x / (y + 0.0007936500793651)));
	t_1 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x);
	tmp = 0.0;
	if (z <= -5.2e+154)
		tmp = t_0;
	elseif (z <= -2.25e+108)
		tmp = t_1 + (y * (z * (z / x)));
	elseif ((z <= -8.8e+30) || ~((z <= 5.1e+20)))
		tmp = t_0;
	else
		tmp = t_1 + (0.083333333333333 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * z), $MachinePrecision] / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+154], t$95$0, If[LessEqual[z, -2.25e+108], N[(t$95$1 + N[(y * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -8.8e+30], N[Not[LessEqual[z, 5.1e+20]], $MachinePrecision]], t$95$0, N[(t$95$1 + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\
t_1 := 0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+154}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;z \leq -2.25 \cdot 10^{+108}:\\
\;\;\;\;t_1 + y \cdot \left(z \cdot \frac{z}{x}\right)\\

\mathbf{elif}\;z \leq -8.8 \cdot 10^{+30} \lor \neg \left(z \leq 5.1 \cdot 10^{+20}\right):\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;t_1 + \frac{0.083333333333333}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.19999999999999978e154 or -2.25e108 < z < -8.7999999999999999e30 or 5.1e20 < z

    1. Initial program 88.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around inf 88.6%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}} \]
    3. Step-by-step derivation
      1. associate-/l*89.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}} \]
      2. unpow289.4%

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

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

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

    if -5.19999999999999978e154 < z < -2.25e108

    1. Initial program 79.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. Taylor expanded in y around inf 71.5%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
    3. Step-by-step derivation
      1. associate-/l*92.5%

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + y \cdot \color{blue}{\frac{z}{\frac{x}{z}}} \]
    6. Applied egg-rr92.5%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{y \cdot \frac{z}{\frac{x}{z}}} \]
    7. Step-by-step derivation
      1. associate-/r/92.5%

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

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

    if -8.7999999999999999e30 < z < 5.1e20

    1. Initial program 99.4%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around 0 92.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+154}:\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\ \mathbf{elif}\;z \leq -2.25 \cdot 10^{+108}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + y \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{+30} \lor \neg \left(z \leq 5.1 \cdot 10^{+20}\right):\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]

Alternative 5: 95.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 98.2%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in x around inf 96.5%

      \[\leadsto \left(\color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right) \cdot x} + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    3. Step-by-step derivation
      1. *-commutative51.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} \]
      2. sub-neg51.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} \]
      3. mul-1-neg51.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} \]
      4. log-rec51.0%

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

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

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

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

    if 2.4000000000000001e176 < x

    1. Initial program 81.9%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around inf 81.9%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(-0.0027777777777778 \cdot \frac{z}{x} + \frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}\right)} \]
      2. fma-def81.9%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}\right)} \]
      3. associate-/l*87.9%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \frac{{z}^{2}}{\frac{x}{\color{blue}{y + 0.0007936500793651}}}\right) \]
      5. associate-/r/87.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \color{blue}{\frac{z}{\frac{x}{y}}} \]
    10. Simplified93.7%

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

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

Alternative 6: 99.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in x around 0 99.1%

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

    if 0.0074999999999999997 < x

    1. Initial program 89.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around inf 89.1%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}\right)} \]
      3. associate-/l*91.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \color{blue}{\frac{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}}\right) \]
      4. +-commutative91.7%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(-0.0027777777777778, \frac{z}{x}, \frac{{z}^{2}}{\frac{x}{\color{blue}{y + 0.0007936500793651}}}\right) \]
      5. associate-/r/91.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 83.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.85 \cdot 10^{+28} \lor \neg \left(z \leq 5.4 \cdot 10^{+21}\right):\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -2.85e+28) (not (<= z 5.4e+21)))
   (+
    (+ 0.91893853320467 (* -0.5 (log x)))
    (/ (* z z) (/ x (+ y 0.0007936500793651))))
   (+
    (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
    (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -2.85e+28) || !(z <= 5.4e+21)) {
		tmp = (0.91893853320467 + (-0.5 * log(x))) + ((z * z) / (x / (y + 0.0007936500793651)));
	} else {
		tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((z <= (-2.85d+28)) .or. (.not. (z <= 5.4d+21))) then
        tmp = (0.91893853320467d0 + ((-0.5d0) * log(x))) + ((z * z) / (x / (y + 0.0007936500793651d0)))
    else
        tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (0.083333333333333d0 / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -2.85e+28) || !(z <= 5.4e+21)) {
		tmp = (0.91893853320467 + (-0.5 * Math.log(x))) + ((z * z) / (x / (y + 0.0007936500793651)));
	} else {
		tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -2.85e+28) or not (z <= 5.4e+21):
		tmp = (0.91893853320467 + (-0.5 * math.log(x))) + ((z * z) / (x / (y + 0.0007936500793651)))
	else:
		tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -2.85e+28) || !(z <= 5.4e+21))
		tmp = Float64(Float64(0.91893853320467 + Float64(-0.5 * log(x))) + Float64(Float64(z * z) / Float64(x / Float64(y + 0.0007936500793651))));
	else
		tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(0.083333333333333 / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -2.85e+28) || ~((z <= 5.4e+21)))
		tmp = (0.91893853320467 + (-0.5 * log(x))) + ((z * z) / (x / (y + 0.0007936500793651)));
	else
		tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.85e+28], N[Not[LessEqual[z, 5.4e+21]], $MachinePrecision]], N[(N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * z), $MachinePrecision] / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.85 \cdot 10^{+28} \lor \neg \left(z \leq 5.4 \cdot 10^{+21}\right):\\
\;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8500000000000001e28 or 5.4e21 < z

    1. Initial program 87.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around inf 87.4%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{{z}^{2} \cdot \left(0.0007936500793651 + y\right)}{x}} \]
    3. Step-by-step derivation
      1. associate-/l*90.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{{z}^{2}}{\frac{x}{0.0007936500793651 + y}}} \]
      2. unpow290.8%

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

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

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

    if -2.8500000000000001e28 < z < 5.4e21

    1. Initial program 99.4%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around 0 92.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.85 \cdot 10^{+28} \lor \neg \left(z \leq 5.4 \cdot 10^{+21}\right):\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]

Alternative 8: 71.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+133} \lor \neg \left(z \leq 6.6 \cdot 10^{+23}\right):\\
\;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{y}{\frac{x}{z \cdot z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2999999999999999e133 or 6.60000000000000059e23 < z

    1. Initial program 86.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in y around inf 61.9%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
    3. Step-by-step derivation
      1. associate-/l*66.0%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\frac{x}{\color{blue}{z \cdot z}}} \]
    4. Simplified66.0%

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

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

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

    if -1.2999999999999999e133 < z < 6.60000000000000059e23

    1. Initial program 98.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around 0 86.1%

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

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

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

        \[\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} \]
      3. mul-1-neg84.2%

        \[\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} \]
      4. log-rec84.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+133} \lor \neg \left(z \leq 6.6 \cdot 10^{+23}\right):\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{y}{\frac{x}{z \cdot z}}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]

Alternative 9: 72.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+132} \lor \neg \left(z \leq 7.3 \cdot 10^{+22}\right):\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{y}{\frac{x}{z \cdot z}}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -7.2e+132) (not (<= z 7.3e+22)))
   (+ (+ 0.91893853320467 (* -0.5 (log x))) (/ y (/ x (* z z))))
   (+
    (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
    (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -7.2e+132) || !(z <= 7.3e+22)) {
		tmp = (0.91893853320467 + (-0.5 * log(x))) + (y / (x / (z * z)));
	} else {
		tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((z <= (-7.2d+132)) .or. (.not. (z <= 7.3d+22))) then
        tmp = (0.91893853320467d0 + ((-0.5d0) * log(x))) + (y / (x / (z * z)))
    else
        tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (0.083333333333333d0 / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -7.2e+132) || !(z <= 7.3e+22)) {
		tmp = (0.91893853320467 + (-0.5 * Math.log(x))) + (y / (x / (z * z)));
	} else {
		tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -7.2e+132) or not (z <= 7.3e+22):
		tmp = (0.91893853320467 + (-0.5 * math.log(x))) + (y / (x / (z * z)))
	else:
		tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -7.2e+132) || !(z <= 7.3e+22))
		tmp = Float64(Float64(0.91893853320467 + Float64(-0.5 * log(x))) + Float64(y / Float64(x / Float64(z * z))));
	else
		tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(0.083333333333333 / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -7.2e+132) || ~((z <= 7.3e+22)))
		tmp = (0.91893853320467 + (-0.5 * log(x))) + (y / (x / (z * z)));
	else
		tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -7.2e+132], N[Not[LessEqual[z, 7.3e+22]], $MachinePrecision]], N[(N[(0.91893853320467 + N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+132} \lor \neg \left(z \leq 7.3 \cdot 10^{+22}\right):\\
\;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{y}{\frac{x}{z \cdot z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.20000000000000031e132 or 7.29999999999999979e22 < z

    1. Initial program 86.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in y around inf 61.9%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
    3. Step-by-step derivation
      1. associate-/l*66.0%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\frac{x}{\color{blue}{z \cdot z}}} \]
    4. Simplified66.0%

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

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

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

    if -7.20000000000000031e132 < z < 7.29999999999999979e22

    1. Initial program 98.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around 0 86.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 simplification77.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+132} \lor \neg \left(z \leq 7.3 \cdot 10^{+22}\right):\\ \;\;\;\;\left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{y}{\frac{x}{z \cdot z}}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]

Alternative 10: 71.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+132} \lor \neg \left(z \leq 4.1 \cdot 10^{+23}\right):\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -7.5e+132) (not (<= z 4.1e+23)))
   (- (/ y (/ x (* z z))) x)
   (+ (+ 0.91893853320467 (* x (+ (log x) -1.0))) (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -7.5e+132) || !(z <= 4.1e+23)) {
		tmp = (y / (x / (z * z))) - x;
	} else {
		tmp = (0.91893853320467 + (x * (log(x) + -1.0))) + (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 ((z <= (-7.5d+132)) .or. (.not. (z <= 4.1d+23))) then
        tmp = (y / (x / (z * z))) - x
    else
        tmp = (0.91893853320467d0 + (x * (log(x) + (-1.0d0)))) + (0.083333333333333d0 / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -7.5e+132) || !(z <= 4.1e+23)) {
		tmp = (y / (x / (z * z))) - x;
	} else {
		tmp = (0.91893853320467 + (x * (Math.log(x) + -1.0))) + (0.083333333333333 / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -7.5e+132) or not (z <= 4.1e+23):
		tmp = (y / (x / (z * z))) - x
	else:
		tmp = (0.91893853320467 + (x * (math.log(x) + -1.0))) + (0.083333333333333 / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -7.5e+132) || !(z <= 4.1e+23))
		tmp = Float64(Float64(y / Float64(x / Float64(z * z))) - x);
	else
		tmp = Float64(Float64(0.91893853320467 + Float64(x * Float64(log(x) + -1.0))) + Float64(0.083333333333333 / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -7.5e+132) || ~((z <= 4.1e+23)))
		tmp = (y / (x / (z * z))) - x;
	else
		tmp = (0.91893853320467 + (x * (log(x) + -1.0))) + (0.083333333333333 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -7.5e+132], N[Not[LessEqual[z, 4.1e+23]], $MachinePrecision]], N[(N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], 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}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+132} \lor \neg \left(z \leq 4.1 \cdot 10^{+23}\right):\\
\;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.50000000000000017e132 or 4.09999999999999996e23 < z

    1. Initial program 86.7%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in y around inf 61.9%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
    3. Step-by-step derivation
      1. associate-/l*66.0%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{y}{\frac{x}{\color{blue}{z \cdot z}}} \]
    4. Simplified66.0%

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

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{y}{\frac{x}{z \cdot z}} \]
    7. Step-by-step derivation
      1. mul-1-neg60.3%

        \[\leadsto \color{blue}{\left(-x\right)} + \frac{y}{\frac{x}{z \cdot z}} \]
    8. Simplified60.3%

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

    if -7.50000000000000017e132 < z < 4.09999999999999996e23

    1. Initial program 98.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around 0 86.1%

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

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

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

        \[\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} \]
      3. mul-1-neg84.2%

        \[\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} \]
      4. log-rec84.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+132} \lor \neg \left(z \leq 4.1 \cdot 10^{+23}\right):\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + x \cdot \left(\log x + -1\right)\right) + \frac{0.083333333333333}{x}\\ \end{array} \]

Alternative 11: 49.2% accurate, 9.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.85 \cdot 10^{-18} \lor \neg \left(z \leq 4.8 \cdot 10^{-19}\right):\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -2.85e-18) (not (<= z 4.8e-19)))
   (- (/ y (/ x (* z z))) x)
   (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -2.85e-18) || !(z <= 4.8e-19)) {
		tmp = (y / (x / (z * z))) - x;
	} else {
		tmp = 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 ((z <= (-2.85d-18)) .or. (.not. (z <= 4.8d-19))) then
        tmp = (y / (x / (z * z))) - x
    else
        tmp = 0.083333333333333d0 / x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -2.85e-18) || !(z <= 4.8e-19)) {
		tmp = (y / (x / (z * z))) - x;
	} else {
		tmp = 0.083333333333333 / x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -2.85e-18) or not (z <= 4.8e-19):
		tmp = (y / (x / (z * z))) - x
	else:
		tmp = 0.083333333333333 / x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -2.85e-18) || !(z <= 4.8e-19))
		tmp = Float64(Float64(y / Float64(x / Float64(z * z))) - x);
	else
		tmp = Float64(0.083333333333333 / x);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -2.85e-18) || ~((z <= 4.8e-19)))
		tmp = (y / (x / (z * z))) - x;
	else
		tmp = 0.083333333333333 / x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.85e-18], N[Not[LessEqual[z, 4.8e-19]], $MachinePrecision]], N[(N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.85 \cdot 10^{-18} \lor \neg \left(z \leq 4.8 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\

\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.84999999999999986e-18 or 4.80000000000000046e-19 < z

    1. Initial program 89.2%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in y around inf 64.3%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
    3. Step-by-step derivation
      1. associate-/l*68.6%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{y}{\frac{x}{z \cdot z}} \]
    7. Step-by-step derivation
      1. mul-1-neg48.2%

        \[\leadsto \color{blue}{\left(-x\right)} + \frac{y}{\frac{x}{z \cdot z}} \]
    8. Simplified48.2%

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

    if -2.84999999999999986e-18 < z < 4.80000000000000046e-19

    1. Initial program 99.5%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around 0 96.4%

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification47.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.85 \cdot 10^{-18} \lor \neg \left(z \leq 4.8 \cdot 10^{-19}\right):\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \end{array} \]

Alternative 12: 23.9% 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 94.2%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Taylor expanded in z around 0 60.7%

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

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

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
  5. Final simplification24.2%

    \[\leadsto \frac{0.083333333333333}{x} \]

Developer target: 98.6% 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 2023171 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
  :precision binary64

  :herbie-target
  (+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))

  (+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))