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

Percentage Accurate: 94.3% → 99.4%
Time: 16.4s
Alternatives: 19
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 19 alternatives:

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

Initial Program: 94.3% 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.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 5.3 \cdot 10^{+54}:\\ \;\;\;\;\left(\left(-0.5 \cdot \log x + x \cdot \left(\log x + -1\right)\right) + 0.91893853320467\right) + \frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 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
 (if (<= x 5.3e+54)
   (+
    (+ (+ (* -0.5 (log x)) (* x (+ (log x) -1.0))) 0.91893853320467)
    (/
     (+
      (* z (- (* (+ y 0.0007936500793651) z) 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 tmp;
	if (x <= 5.3e+54) {
		tmp = (((-0.5 * log(x)) + (x * (log(x) + -1.0))) + 0.91893853320467) + (((z * (((y + 0.0007936500793651) * z) - 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) :: tmp
    if (x <= 5.3d+54) then
        tmp = ((((-0.5d0) * log(x)) + (x * (log(x) + (-1.0d0)))) + 0.91893853320467d0) + (((z * (((y + 0.0007936500793651d0) * z) - 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 tmp;
	if (x <= 5.3e+54) {
		tmp = (((-0.5 * Math.log(x)) + (x * (Math.log(x) + -1.0))) + 0.91893853320467) + (((z * (((y + 0.0007936500793651) * z) - 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):
	tmp = 0
	if x <= 5.3e+54:
		tmp = (((-0.5 * math.log(x)) + (x * (math.log(x) + -1.0))) + 0.91893853320467) + (((z * (((y + 0.0007936500793651) * z) - 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)
	tmp = 0.0
	if (x <= 5.3e+54)
		tmp = Float64(Float64(Float64(Float64(-0.5 * log(x)) + Float64(x * Float64(log(x) + -1.0))) + 0.91893853320467) + Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 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)
	tmp = 0.0;
	if (x <= 5.3e+54)
		tmp = (((-0.5 * log(x)) + (x * (log(x) + -1.0))) + 0.91893853320467) + (((z * (((y + 0.0007936500793651) * z) - 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_] := If[LessEqual[x, 5.3e+54], N[(N[(N[(N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $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}
\mathbf{if}\;x \leq 5.3 \cdot 10^{+54}:\\
\;\;\;\;\left(\left(-0.5 \cdot \log x + x \cdot \left(\log x + -1\right)\right) + 0.91893853320467\right) + \frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 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.30000000000000018e54

    1. Initial program 99.6%

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

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

    if 5.30000000000000018e54 < x

    1. Initial program 83.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 0 73.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{x}{\color{blue}{z \cdot z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      11. associate-/r*90.5%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\color{blue}{\frac{\frac{x}{z}}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      12. associate-*r/90.5%

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{\frac{x}{z}}{z}} + \frac{0.083333333333333}{x}\right)\right)} \]
    5. Taylor expanded in z around inf 88.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. *-commutative88.0%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{z}^{2} \cdot \left(\frac{y}{x} + 0.0007936500793651 \cdot \frac{1}{x}\right)} \]
      2. unpow288.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.7%

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

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

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

      \[\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.3 \cdot 10^{+54}:\\ \;\;\;\;\left(\left(-0.5 \cdot \log x + x \cdot \left(\log x + -1\right)\right) + 0.91893853320467\right) + \frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 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: 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 3 \cdot 10^{+22}:\\ \;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 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 3e+22)
     (+
      (/
       (+
        (* z (- (* (+ y 0.0007936500793651) z) 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 <= 3e+22) {
		tmp = (((z * (((y + 0.0007936500793651) * z) - 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 <= 3d+22) then
        tmp = (((z * (((y + 0.0007936500793651d0) * z) - 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 <= 3e+22) {
		tmp = (((z * (((y + 0.0007936500793651) * z) - 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 <= 3e+22:
		tmp = (((z * (((y + 0.0007936500793651) * z) - 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 <= 3e+22)
		tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 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 <= 3e+22)
		tmp = (((z * (((y + 0.0007936500793651) * z) - 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, 3e+22], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $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 3 \cdot 10^{+22}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 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 < 3e22

    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 3e22 < x

    1. Initial program 84.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 0 74.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{x}{\color{blue}{z \cdot z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      11. associate-/r*89.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\color{blue}{\frac{\frac{x}{z}}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      12. associate-*r/89.8%

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{\frac{x}{z}}{z}} + \frac{0.083333333333333}{x}\right)\right)} \]
    5. 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{y}{x} + 0.0007936500793651 \cdot \frac{1}{x}\right) \cdot {z}^{2}} \]
    6. 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}{{z}^{2} \cdot \left(\frac{y}{x} + 0.0007936500793651 \cdot \frac{1}{x}\right)} \]
      2. unpow289.2%

        \[\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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3 \cdot 10^{+22}:\\ \;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 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 3: 99.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{+21}:\\ \;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\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} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 5e+21)
   (+
    (/
     (+
      (* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
      0.083333333333333)
     x)
    (- (* (log x) (+ x -0.5)) (+ x -0.91893853320467)))
   (+
    (+ 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 <= 5e+21) {
		tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((log(x) * (x + -0.5)) - (x + -0.91893853320467));
	} 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 <= 5d+21) then
        tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + ((log(x) * (x + (-0.5d0))) - (x + (-0.91893853320467d0)))
    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 <= 5e+21) {
		tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((Math.log(x) * (x + -0.5)) - (x + -0.91893853320467));
	} 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 <= 5e+21:
		tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((math.log(x) * (x + -0.5)) - (x + -0.91893853320467))
	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 <= 5e+21)
		tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(Float64(log(x) * Float64(x + -0.5)) - Float64(x + -0.91893853320467)));
	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 <= 5e+21)
		tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((log(x) * (x + -0.5)) - (x + -0.91893853320467));
	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, 5e+21], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision]), $MachinePrecision] - N[(x + -0.91893853320467), $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 5 \cdot 10^{+21}:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\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}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 5e21

    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. associate-+l-50.8%

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

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

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

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

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

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

    if 5e21 < x

    1. Initial program 84.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 0 74.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{x}{\color{blue}{z \cdot z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      11. associate-/r*89.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\color{blue}{\frac{\frac{x}{z}}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      12. associate-*r/89.8%

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{\frac{x}{z}}{z}} + \frac{0.083333333333333}{x}\right)\right)} \]
    5. 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{y}{x} + 0.0007936500793651 \cdot \frac{1}{x}\right) \cdot {z}^{2}} \]
    6. 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}{{z}^{2} \cdot \left(\frac{y}{x} + 0.0007936500793651 \cdot \frac{1}{x}\right)} \]
      2. unpow289.2%

        \[\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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{+21}:\\ \;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(\log x \cdot \left(x + -0.5\right) - \left(x + -0.91893853320467\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: 96.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 33000000:\\ \;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(-0.5 \cdot \log x + 0.91893853320467\right)\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{+223}:\\ \;\;\;\;t_0 + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\ \mathbf{else}:\\ \;\;\;\;t_0 + z \cdot \frac{y}{\frac{x}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))))
   (if (<= x 33000000.0)
     (+
      (/
       (+
        (* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
        0.083333333333333)
       x)
      (+ (* -0.5 (log x)) 0.91893853320467))
     (if (<= x 3.8e+223)
       (+ t_0 (/ (* z z) (/ x (+ y 0.0007936500793651))))
       (+ t_0 (* z (/ y (/ x z))))))))
double code(double x, double y, double z) {
	double t_0 = 0.91893853320467 + ((log(x) * (x - 0.5)) - x);
	double tmp;
	if (x <= 33000000.0) {
		tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * log(x)) + 0.91893853320467);
	} else if (x <= 3.8e+223) {
		tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)));
	} else {
		tmp = t_0 + (z * (y / (x / z)));
	}
	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 <= 33000000.0d0) then
        tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (((-0.5d0) * log(x)) + 0.91893853320467d0)
    else if (x <= 3.8d+223) then
        tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651d0)))
    else
        tmp = t_0 + (z * (y / (x / z)))
    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 <= 33000000.0) {
		tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * Math.log(x)) + 0.91893853320467);
	} else if (x <= 3.8e+223) {
		tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)));
	} else {
		tmp = t_0 + (z * (y / (x / z)));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = 0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)
	tmp = 0
	if x <= 33000000.0:
		tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * math.log(x)) + 0.91893853320467)
	elif x <= 3.8e+223:
		tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)))
	else:
		tmp = t_0 + (z * (y / (x / z)))
	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 <= 33000000.0)
		tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(Float64(-0.5 * log(x)) + 0.91893853320467));
	elseif (x <= 3.8e+223)
		tmp = Float64(t_0 + Float64(Float64(z * z) / Float64(x / Float64(y + 0.0007936500793651))));
	else
		tmp = Float64(t_0 + Float64(z * Float64(y / Float64(x / z))));
	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 <= 33000000.0)
		tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * log(x)) + 0.91893853320467);
	elseif (x <= 3.8e+223)
		tmp = t_0 + ((z * z) / (x / (y + 0.0007936500793651)));
	else
		tmp = t_0 + (z * (y / (x / z)));
	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, 33000000.0], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision] + 0.91893853320467), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e+223], N[(t$95$0 + N[(N[(z * z), $MachinePrecision] / N[(x / N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(z * N[(y / N[(x / z), $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 33000000:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(-0.5 \cdot \log x + 0.91893853320467\right)\\

\mathbf{elif}\;x \leq 3.8 \cdot 10^{+223}:\\
\;\;\;\;t_0 + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\

\mathbf{else}:\\
\;\;\;\;t_0 + z \cdot \frac{y}{\frac{x}{z}}\\


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

    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.7%

      \[\leadsto \left(\color{blue}{\left(-0.5 \cdot \log x + \left(\log x - 1\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. Taylor expanded in x around 0 99.2%

      \[\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 3.3e7 < x < 3.8e223

    1. Initial program 88.8%

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

      \[\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*30.6%

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

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

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

    if 3.8e223 < x

    1. Initial program 73.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 y around 0 73.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{x}{\color{blue}{z \cdot z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      11. associate-/r*99.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\color{blue}{\frac{\frac{x}{z}}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      12. associate-*r/99.4%

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{\frac{x}{z}}{z}} + \frac{0.083333333333333}{x}\right)\right)} \]
    5. Taylor expanded in y around inf 73.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}} \]
    6. Step-by-step derivation
      1. associate-*l/79.2%

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \color{blue}{\left(z \cdot \frac{y}{x}\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 \frac{y}{x}\right)} \]
    8. Taylor expanded in z around 0 95.6%

      \[\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. associate-/l*98.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 33000000:\\ \;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(-0.5 \cdot \log x + 0.91893853320467\right)\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{+223}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\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) + z \cdot \frac{y}{\frac{x}{z}}\\ \end{array} \]

Alternative 5: 99.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.075:\\ \;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(-0.5 \cdot \log x + 0.91893853320467\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.075)
   (+
    (/
     (+
      (* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
      0.083333333333333)
     x)
    (+ (* -0.5 (log x)) 0.91893853320467))
   (+
    (+ 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.075) {
		tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * log(x)) + 0.91893853320467);
	} 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.075d0) then
        tmp = (((z * (((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0)) + 0.083333333333333d0) / x) + (((-0.5d0) * log(x)) + 0.91893853320467d0)
    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.075) {
		tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * Math.log(x)) + 0.91893853320467);
	} 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.075:
		tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * math.log(x)) + 0.91893853320467)
	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.075)
		tmp = Float64(Float64(Float64(Float64(z * Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + Float64(Float64(-0.5 * log(x)) + 0.91893853320467));
	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.075)
		tmp = (((z * (((y + 0.0007936500793651) * z) - 0.0027777777777778)) + 0.083333333333333) / x) + ((-0.5 * log(x)) + 0.91893853320467);
	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.075], N[(N[(N[(N[(z * N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision] + N[(N[(-0.5 * N[Log[x], $MachinePrecision]), $MachinePrecision] + 0.91893853320467), $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.075:\\
\;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(-0.5 \cdot \log x + 0.91893853320467\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.0749999999999999972

    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.7%

      \[\leadsto \left(\color{blue}{\left(-0.5 \cdot \log x + \left(\log x - 1\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. Taylor expanded in x around 0 99.2%

      \[\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.0749999999999999972 < x

    1. Initial program 86.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 0 75.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{x}{\color{blue}{z \cdot z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      11. associate-/r*89.3%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\color{blue}{\frac{\frac{x}{z}}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      12. associate-*r/89.3%

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

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

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

      \[\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. *-commutative90.2%

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

        \[\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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.075:\\ \;\;\;\;\frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x} + \left(-0.5 \cdot \log x + 0.91893853320467\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 6: 83.9% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 33000000:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 6.2000000000000004e-50

    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.7%

      \[\leadsto \left(\color{blue}{\left(-0.5 \cdot \log x + \left(\log x - 1\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. Taylor expanded in x around 0 99.7%

      \[\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} \]
    4. Taylor expanded in y around inf 90.0%

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

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

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

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

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

    if 6.2000000000000004e-50 < x < 3.3e7

    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.7%

      \[\leadsto \left(\color{blue}{\left(-0.5 \cdot \log x + \left(\log x - 1\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. Taylor expanded in x around 0 97.5%

      \[\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} \]
    4. Taylor expanded in y around 0 83.1%

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

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

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

    if 3.3e7 < x

    1. Initial program 85.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 y around 0 76.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{x}{\color{blue}{z \cdot z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      11. associate-/r*90.3%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\color{blue}{\frac{\frac{x}{z}}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      12. associate-*r/90.3%

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{\frac{x}{z}}{z}} + \frac{0.083333333333333}{x}\right)\right)} \]
    5. Taylor expanded in y around inf 79.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}} \]
    6. Step-by-step derivation
      1. associate-*l/82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 83.9% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 33000000:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 5.00000000000000004e-51

    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.7%

      \[\leadsto \left(\color{blue}{\left(-0.5 \cdot \log x + \left(\log x - 1\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. Taylor expanded in x around 0 99.7%

      \[\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} \]
    4. Taylor expanded in y around inf 90.0%

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

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

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

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

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

    if 5.00000000000000004e-51 < x < 3.3e7

    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.7%

      \[\leadsto \left(\color{blue}{\left(-0.5 \cdot \log x + \left(\log x - 1\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. Taylor expanded in x around 0 97.5%

      \[\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} \]
    4. Taylor expanded in y around 0 83.1%

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

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

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

    if 3.3e7 < x

    1. Initial program 85.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 y around 0 76.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{x}{\color{blue}{z \cdot z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      11. associate-/r*90.3%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\color{blue}{\frac{\frac{x}{z}}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      12. associate-*r/90.3%

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{\frac{x}{z}}{z}} + \frac{0.083333333333333}{x}\right)\right)} \]
    5. Taylor expanded in y around inf 79.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}} \]
    6. Step-by-step derivation
      1. associate-*l/82.5%

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

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

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

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

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

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

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

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

Alternative 8: 84.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 33000000:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 3.00000000000000002e-51

    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.7%

      \[\leadsto \left(\color{blue}{\left(-0.5 \cdot \log x + \left(\log x - 1\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. Taylor expanded in x around 0 99.7%

      \[\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} \]
    4. Taylor expanded in y around inf 90.0%

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

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

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

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

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

    if 3.00000000000000002e-51 < x < 3.3e7

    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.7%

      \[\leadsto \left(\color{blue}{\left(-0.5 \cdot \log x + \left(\log x - 1\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. Taylor expanded in x around 0 97.5%

      \[\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} \]
    4. Taylor expanded in y around 0 83.1%

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

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

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

    if 3.3e7 < x

    1. Initial program 85.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 y around inf 79.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*83.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. unpow283.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}}} \]
      3. associate-/r*88.4%

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

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

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

Alternative 9: 95.3% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

    if 3.3e223 < x

    1. Initial program 73.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 y around 0 73.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{x}{\color{blue}{z \cdot z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      11. associate-/r*99.4%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\color{blue}{\frac{\frac{x}{z}}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      12. associate-*r/99.4%

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{\frac{x}{z}}{z}} + \frac{0.083333333333333}{x}\right)\right)} \]
    5. Taylor expanded in y around inf 73.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}} \]
    6. Step-by-step derivation
      1. associate-*l/79.2%

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + z \cdot \color{blue}{\left(z \cdot \frac{y}{x}\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 \frac{y}{x}\right)} \]
    8. Taylor expanded in z around 0 95.6%

      \[\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. associate-/l*98.9%

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

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

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

Alternative 10: 98.9% accurate, 1.0× speedup?

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

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

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


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

    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.7%

      \[\leadsto \left(\color{blue}{\left(-0.5 \cdot \log x + \left(\log x - 1\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. Taylor expanded in x around 0 99.2%

      \[\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 3.3e7 < x

    1. Initial program 85.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. Step-by-step derivation
      1. *-un-lft-identity85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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}} \]
    7. Step-by-step derivation
      1. *-commutative85.5%

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

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

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

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

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

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

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

Alternative 11: 83.6% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.4e14 or 3.2e21 < z

    1. Initial program 83.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 x around 0 83.6%

      \[\leadsto \left(\color{blue}{\left(-0.5 \cdot \log x + \left(\log x - 1\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. Taylor expanded in x around 0 71.6%

      \[\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} \]
    4. Taylor expanded in z around inf 71.5%

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

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

        \[\leadsto \left(0.91893853320467 + -0.5 \cdot \log x\right) + \frac{{z}^{2}}{\frac{x}{\color{blue}{y + 0.0007936500793651}}} \]
      3. associate-/r/73.9%

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

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

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

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

    if -4.4e14 < z < 3.2e21

    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 90.3%

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

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

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

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

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

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

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

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

Alternative 12: 83.6% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.1e14 or 1.0500000000000001e23 < z

    1. Initial program 83.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 x around 0 83.6%

      \[\leadsto \left(\color{blue}{\left(-0.5 \cdot \log x + \left(\log x - 1\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. Taylor expanded in x around 0 71.6%

      \[\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} \]
    4. Taylor expanded in z around inf 71.5%

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

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

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

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

    if -5.1e14 < z < 1.0500000000000001e23

    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 90.3%

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

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

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

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

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

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

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

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

Alternative 13: 84.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 52000000:\\
\;\;\;\;t_0 + \frac{z \cdot z}{\frac{x}{y + 0.0007936500793651}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 3.80000000000000028e-8

    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.7%

      \[\leadsto \left(\color{blue}{\left(-0.5 \cdot \log x + \left(\log x - 1\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. Taylor expanded in x around 0 99.7%

      \[\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} \]
    4. Taylor expanded in y around inf 86.6%

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

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

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

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

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

    if 3.80000000000000028e-8 < x < 5.2e7

    1. Initial program 100.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 x around 0 100.0%

      \[\leadsto \left(\color{blue}{\left(-0.5 \cdot \log x + \left(\log x - 1\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. Taylor expanded in x around 0 93.5%

      \[\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} \]
    4. Taylor expanded in z around inf 90.0%

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

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

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

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

    if 5.2e7 < x

    1. Initial program 85.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 y around 0 76.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{x}{\color{blue}{z \cdot z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      11. associate-/r*90.3%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\color{blue}{\frac{\frac{x}{z}}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      12. associate-*r/90.3%

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{\frac{x}{z}}{z}} + \frac{0.083333333333333}{x}\right)\right)} \]
    5. Taylor expanded in y around inf 79.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}} \]
    6. Step-by-step derivation
      1. associate-*l/82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(\log x + -1\right)} + z \cdot \left(z \cdot \frac{y}{x}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification86.5%

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

Alternative 14: 80.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{-17} \lor \neg \left(z \leq 1.95 \cdot 10^{-21}\right):\\
\;\;\;\;t_0 + z \cdot \left(z \cdot \frac{y}{x}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.00000000000000057e-17 or 1.95e-21 < z

    1. Initial program 85.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 0 61.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{x}{\color{blue}{z \cdot z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      11. associate-/r*72.6%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\color{blue}{\frac{\frac{x}{z}}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      12. associate-*r/72.6%

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{\frac{x}{z}}{z}} + \frac{0.083333333333333}{x}\right)\right)} \]
    5. Taylor expanded in y around inf 62.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}} \]
    6. Step-by-step derivation
      1. associate-*l/66.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) + \frac{0.083333333333333}{x} \]
    10. Simplified69.9%

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

    if -8.00000000000000057e-17 < z < 1.95e-21

    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.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-17} \lor \neg \left(z \leq 1.95 \cdot 10^{-21}\right):\\ \;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\ \end{array} \]

Alternative 15: 81.3% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{-59} \lor \neg \left(z \leq 4.6 \cdot 10^{-22}\right):\\ \;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\ \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 -5.5e-59) (not (<= z 4.6e-22)))
   (+ (* x (+ (log x) -1.0)) (* z (* z (/ y x))))
   (+
    (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
    (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -5.5e-59) || !(z <= 4.6e-22)) {
		tmp = (x * (log(x) + -1.0)) + (z * (z * (y / x)));
	} 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 <= (-5.5d-59)) .or. (.not. (z <= 4.6d-22))) then
        tmp = (x * (log(x) + (-1.0d0))) + (z * (z * (y / x)))
    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 <= -5.5e-59) || !(z <= 4.6e-22)) {
		tmp = (x * (Math.log(x) + -1.0)) + (z * (z * (y / x)));
	} 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 <= -5.5e-59) or not (z <= 4.6e-22):
		tmp = (x * (math.log(x) + -1.0)) + (z * (z * (y / x)))
	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 <= -5.5e-59) || !(z <= 4.6e-22))
		tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(z * Float64(z * Float64(y / x))));
	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 <= -5.5e-59) || ~((z <= 4.6e-22)))
		tmp = (x * (log(x) + -1.0)) + (z * (z * (y / x)));
	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, -5.5e-59], N[Not[LessEqual[z, 4.6e-22]], $MachinePrecision]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * N[(y / 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[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-59} \lor \neg \left(z \leq 4.6 \cdot 10^{-22}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\

\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 < -5.50000000000000014e-59 or 4.5999999999999996e-22 < z

    1. Initial program 86.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 0 62.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{x}{\color{blue}{z \cdot z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      11. associate-/r*73.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\color{blue}{\frac{\frac{x}{z}}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      12. associate-*r/73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + \frac{0.083333333333333}{x} \]
      3. mul-1-neg28.9%

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

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

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

        \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) + \frac{0.083333333333333}{x} \]
    10. Simplified69.8%

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

    if -5.50000000000000014e-59 < z < 4.5999999999999996e-22

    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 94.0%

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

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

Alternative 16: 81.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{-57} \lor \neg \left(z \leq 3.6 \cdot 10^{-21}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + z \cdot \left(z \cdot \frac{y}{x}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.80000000000000013e-57 or 3.59999999999999989e-21 < z

    1. Initial program 86.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 0 62.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\frac{x}{\color{blue}{z \cdot z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      11. associate-/r*73.8%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x} \cdot z + \left(\frac{y}{\color{blue}{\frac{\frac{x}{z}}{z}}} + 0.083333333333333 \cdot \frac{1}{x}\right)\right) \]
      12. associate-*r/73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + \frac{0.083333333333333}{x} \]
      3. mul-1-neg28.9%

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

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

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

        \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) + \frac{0.083333333333333}{x} \]
    10. Simplified69.8%

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

    if -7.80000000000000013e-57 < z < 3.59999999999999989e-21

    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 94.0%

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

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

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

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

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

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + \color{blue}{-0.91893853320467}\right)\right) + \frac{0.083333333333333}{x} \]
    4. Applied egg-rr94.0%

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

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

Alternative 17: 61.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -124000000:\\
\;\;\;\;t_0 + z \cdot \frac{-0.0027777777777778}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.24e8

    1. Initial program 87.6%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Taylor expanded in z around inf 77.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. +-commutative77.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. associate-/l*82.1%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \left(-0.0027777777777778 \cdot \frac{z}{x} + \frac{\color{blue}{z \cdot z}}{\frac{x}{0.0007936500793651 + y}}\right) \]
    4. Simplified82.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 \cdot z}{\frac{x}{0.0007936500793651 + y}}\right)} \]
    5. Taylor expanded in z around 0 33.2%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{-0.0027777777777778 \cdot z}{1 \cdot x}} \]
      3. *-commutative33.2%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\color{blue}{z \cdot -0.0027777777777778}}{1 \cdot x} \]
      4. times-frac33.2%

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{z}{1} \cdot \frac{-0.0027777777777778}{x}} \]
      5. /-rgt-identity33.2%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + \frac{0.083333333333333}{x} \]
      3. mul-1-neg24.9%

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

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

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

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

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

    if -1.24e8 < z

    1. Initial program 94.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 z around 0 70.3%

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

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

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

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

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

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

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

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

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

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

Alternative 18: 57.4% accurate, 1.1× speedup?

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

\\
x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 92.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 59.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 inf 58.9%

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

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

      \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + \frac{0.083333333333333}{x} \]
    3. mul-1-neg58.9%

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

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

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

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

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

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

Alternative 19: 23.6% 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 92.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 59.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 inf 58.9%

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

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

      \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + \frac{0.083333333333333}{x} \]
    3. mul-1-neg58.9%

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

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

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

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

    \[\leadsto \color{blue}{x \cdot \left(\log x + -1\right)} + \frac{0.083333333333333}{x} \]
  6. Taylor expanded in x around 0 25.7%

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
  7. Final simplification25.7%

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

Developer target: 98.7% accurate, 1.0× speedup?

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

\\
\left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)
\end{array}

Reproduce

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