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

Percentage Accurate: 93.7% → 96.9%
Time: 14.5s
Alternatives: 14
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 14 alternatives:

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

Initial Program: 93.7% accurate, 1.0× speedup?

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

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

Alternative 1: 96.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.8 \cdot 10^{+193}:\\ \;\;\;\;\left(0.91893853320467 - \mathsf{fma}\left(\log x, 0.5 - x, x\right)\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + y \cdot \frac{z}{\frac{x}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x 1.8e+193)
   (+
    (- 0.91893853320467 (fma (log x) (- 0.5 x) x))
    (/
     (fma
      z
      (fma (+ y 0.0007936500793651) z -0.0027777777777778)
      0.083333333333333)
     x))
   (+ (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x)) (* y (/ z (/ x z))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= 1.8e+193) {
		tmp = (0.91893853320467 - fma(log(x), (0.5 - x), x)) + (fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x);
	} else {
		tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (y * (z / (x / z)));
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (x <= 1.8e+193)
		tmp = Float64(Float64(0.91893853320467 - fma(log(x), Float64(0.5 - x), x)) + Float64(fma(z, fma(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(y * Float64(z / Float64(x / z))));
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[x, 1.8e+193], N[(N[(0.91893853320467 - N[(N[Log[x], $MachinePrecision] * N[(0.5 - x), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $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[(y * N[(z / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 97.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. remove-double-neg97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8e193 < x

    1. Initial program 87.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 inf 87.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 97.0% 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 5 \cdot 10^{+176}:\\ \;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;t_0 + y \cdot \frac{z}{\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 5e+176)
     (+
      t_0
      (/
       (+
        0.083333333333333
        (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
       x))
     (+ t_0 (* y (/ z (/ 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 <= 5e+176) {
		tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
	} else {
		tmp = t_0 + (y * (z / (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 <= 5d+176) then
        tmp = t_0 + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
    else
        tmp = t_0 + (y * (z / (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 <= 5e+176) {
		tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
	} else {
		tmp = t_0 + (y * (z / (x / z)));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = 0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)
	tmp = 0
	if x <= 5e+176:
		tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x)
	else:
		tmp = t_0 + (y * (z / (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 <= 5e+176)
		tmp = Float64(t_0 + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x));
	else
		tmp = Float64(t_0 + Float64(y * Float64(z / 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 <= 5e+176)
		tmp = t_0 + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
	else
		tmp = t_0 + (y * (z / (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, 5e+176], N[(t$95$0 + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(y * N[(z / 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 5 \cdot 10^{+176}:\\
\;\;\;\;t_0 + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\

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


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

    1. Initial program 97.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} \]

    if 5e176 < x

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 97.0% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 97.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. Step-by-step derivation
      1. associate-+l-97.3%

        \[\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} \]
      2. sub-neg97.3%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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} \]
      3. metadata-eval97.3%

        \[\leadsto \left(\left(x + \color{blue}{-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} \]
    3. Applied egg-rr97.3%

      \[\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 2.6999999999999998e176 < x

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 95.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+192}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{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) + y \cdot \frac{z}{\frac{x}{z}}\\


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

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

      \[\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 1.00000000000000004e192 < x

    1. Initial program 87.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 inf 87.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 91.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-20} \lor \neg \left(z \leq 1.15 \cdot 10^{-33}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \left(y + 0.0007936500793651\right) \cdot \frac{z \cdot z}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.19999999999999996e-20 or 1.14999999999999993e-33 < z

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.19999999999999996e-20 < z < 1.14999999999999993e-33

    1. Initial program 99.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l-99.4%

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

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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} \]
      3. metadata-eval99.4%

        \[\leadsto \left(\left(x + \color{blue}{-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} \]
    3. Applied egg-rr99.4%

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

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

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

Alternative 6: 91.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 1.3 \cdot 10^{-37}:\\
\;\;\;\;\left(\log x \cdot \left(x + -0.5\right) + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.19999999999999982e-19

    1. Initial program 91.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 inf 89.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.19999999999999982e-19 < z < 1.2999999999999999e-37

    1. Initial program 99.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l-99.4%

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

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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} \]
      3. metadata-eval99.4%

        \[\leadsto \left(\left(x + \color{blue}{-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} \]
    3. Applied egg-rr99.4%

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

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

    if 1.2999999999999999e-37 < z

    1. Initial program 93.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. Step-by-step derivation
      1. associate-+l-93.0%

        \[\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} \]
      2. sub-neg93.0%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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} \]
      3. metadata-eval93.0%

        \[\leadsto \left(\left(x + \color{blue}{-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} \]
    3. Applied egg-rr93.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{y}{\frac{x}{z \cdot z}} \]
      2. sub-neg76.7%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(-1\right)\right)} + \frac{y}{\frac{x}{z \cdot z}} \]
      3. mul-1-neg76.7%

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

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

        \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(-1\right)\right) + \frac{y}{\frac{x}{z \cdot z}} \]
      6. metadata-eval76.7%

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

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

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

Alternative 7: 79.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-14} \lor \neg \left(z \leq 7 \cdot 10^{-36}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{x}{z \cdot z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9000000000000001e-14 or 6.9999999999999999e-36 < z

    1. Initial program 91.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-91.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} \]
      2. sub-neg91.7%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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} \]
      3. metadata-eval91.7%

        \[\leadsto \left(\left(x + \color{blue}{-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} \]
    3. Applied egg-rr91.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} \]
    4. Taylor expanded in y around inf 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9000000000000001e-14 < z < 6.9999999999999999e-36

    1. Initial program 99.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l-99.4%

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

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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} \]
      3. metadata-eval99.4%

        \[\leadsto \left(\left(x + \color{blue}{-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} \]
    3. Applied egg-rr99.4%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 80.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-14} \lor \neg \left(z \leq 2.3 \cdot 10^{-36}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{x}{z \cdot z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.6999999999999999e-14 or 2.29999999999999996e-36 < z

    1. Initial program 91.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-91.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} \]
      2. sub-neg91.7%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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} \]
      3. metadata-eval91.7%

        \[\leadsto \left(\left(x + \color{blue}{-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} \]
    3. Applied egg-rr91.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} \]
    4. Taylor expanded in y around inf 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6999999999999999e-14 < z < 2.29999999999999996e-36

    1. Initial program 99.3%

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

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

Alternative 9: 80.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{-14} \lor \neg \left(z \leq 1.05 \cdot 10^{-35}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{y}{\frac{x}{z \cdot z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9499999999999999e-14 or 1.05e-35 < z

    1. Initial program 91.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-91.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} \]
      2. sub-neg91.7%

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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} \]
      3. metadata-eval91.7%

        \[\leadsto \left(\left(x + \color{blue}{-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} \]
    3. Applied egg-rr91.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} \]
    4. Taylor expanded in y around inf 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9499999999999999e-14 < z < 1.05e-35

    1. Initial program 99.3%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Step-by-step derivation
      1. associate-+l-99.4%

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

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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} \]
      3. metadata-eval99.4%

        \[\leadsto \left(\left(x + \color{blue}{-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} \]
    3. Applied egg-rr99.4%

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

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

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

Alternative 10: 56.6% 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 95.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 56.6% accurate, 1.1× speedup?

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

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

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


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

    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 z around 0 45.2%

      \[\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. add-cube-cbrt45.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(0.91893853320467 + -1 \cdot x\right)} + \frac{0.083333333333333}{x} \]
    6. Step-by-step derivation
      1. neg-mul-144.0%

        \[\leadsto \left(0.91893853320467 + \color{blue}{\left(-x\right)}\right) + \frac{0.083333333333333}{x} \]
      2. unsub-neg44.0%

        \[\leadsto \color{blue}{\left(0.91893853320467 - x\right)} + \frac{0.083333333333333}{x} \]
    7. Simplified44.0%

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

    if 1.75 < x

    1. Initial program 90.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. Step-by-step derivation
      1. associate-+l-90.4%

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

        \[\leadsto \left(\color{blue}{\left(x + \left(-0.5\right)\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} \]
      3. metadata-eval90.4%

        \[\leadsto \left(\left(x + \color{blue}{-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} \]
    3. Applied egg-rr90.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 23.4% accurate, 17.6× speedup?

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

\\
\frac{0.083333333333333}{x} + \left(0.91893853320467 - x\right)
\end{array}
Derivation
  1. Initial program 95.2%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left(0.91893853320467 + -1 \cdot x\right)} + \frac{0.083333333333333}{x} \]
  6. Step-by-step derivation
    1. neg-mul-123.2%

      \[\leadsto \left(0.91893853320467 + \color{blue}{\left(-x\right)}\right) + \frac{0.083333333333333}{x} \]
    2. unsub-neg23.2%

      \[\leadsto \color{blue}{\left(0.91893853320467 - x\right)} + \frac{0.083333333333333}{x} \]
  7. Simplified23.2%

    \[\leadsto \color{blue}{\left(0.91893853320467 - x\right)} + \frac{0.083333333333333}{x} \]
  8. Final simplification23.2%

    \[\leadsto \frac{0.083333333333333}{x} + \left(0.91893853320467 - x\right) \]

Alternative 13: 23.4% accurate, 24.6× speedup?

\[\begin{array}{l} \\ \frac{0.083333333333333}{x} - x \end{array} \]
(FPCore (x y z) :precision binary64 (- (/ 0.083333333333333 x) x))
double code(double x, double y, double z) {
	return (0.083333333333333 / x) - 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) - x
end function
public static double code(double x, double y, double z) {
	return (0.083333333333333 / x) - x;
}
def code(x, y, z):
	return (0.083333333333333 / x) - x
function code(x, y, z)
	return Float64(Float64(0.083333333333333 / x) - x)
end
function tmp = code(x, y, z)
	tmp = (0.083333333333333 / x) - x;
end
code[x_, y_, z_] := N[(N[(0.083333333333333 / x), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}

\\
\frac{0.083333333333333}{x} - x
\end{array}
Derivation
  1. Initial program 95.2%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{-1 \cdot x} + \frac{0.083333333333333}{x} \]
  6. Step-by-step derivation
    1. neg-mul-123.2%

      \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
  7. Simplified23.2%

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

    \[\leadsto \color{blue}{-1 \cdot x + 0.083333333333333 \cdot \frac{1}{x}} \]
  9. Step-by-step derivation
    1. neg-mul-123.2%

      \[\leadsto \color{blue}{\left(-x\right)} + 0.083333333333333 \cdot \frac{1}{x} \]
    2. associate-*r/23.2%

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x} + \left(-x\right)} \]
    5. unsub-neg23.2%

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x} - x} \]
  10. Simplified23.2%

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

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

Alternative 14: 1.3% accurate, 61.5× speedup?

\[\begin{array}{l} \\ -x \end{array} \]
(FPCore (x y z) :precision binary64 (- x))
double code(double x, double y, double z) {
	return -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
end function
public static double code(double x, double y, double z) {
	return -x;
}
def code(x, y, z):
	return -x
function code(x, y, z)
	return Float64(-x)
end
function tmp = code(x, y, z)
	tmp = -x;
end
code[x_, y_, z_] := (-x)
\begin{array}{l}

\\
-x
\end{array}
Derivation
  1. Initial program 95.2%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{-1 \cdot x} + \frac{0.083333333333333}{x} \]
  6. Step-by-step derivation
    1. neg-mul-123.2%

      \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
  7. Simplified23.2%

    \[\leadsto \color{blue}{\left(-x\right)} + \frac{0.083333333333333}{x} \]
  8. Taylor expanded in x around inf 1.3%

    \[\leadsto \color{blue}{-1 \cdot x} \]
  9. Step-by-step derivation
    1. neg-mul-11.3%

      \[\leadsto \color{blue}{-x} \]
  10. Simplified1.3%

    \[\leadsto \color{blue}{-x} \]
  11. Final simplification1.3%

    \[\leadsto -x \]

Developer target: 98.4% 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 2023257 
(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)))