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

Percentage Accurate: 93.7% → 99.4%
Time: 32.0s
Alternatives: 20
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 20 alternatives:

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

Initial Program: 93.7% accurate, 1.0× speedup?

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

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

Alternative 1: 99.4% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.06000000000000005e39 < x

    1. Initial program 81.5%

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

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

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

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

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

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

        \[\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)} \]
      2. associate-/l*99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

    if 4.7e15 < x

    1. Initial program 83.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 82.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. +-commutative82.6%

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

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

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}}} \]
    5. Step-by-step derivation
      1. associate-/r/87.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)} \]
      2. associate-/l*99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 98.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

      \[\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 5e15 < x

    1. Initial program 83.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 82.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. +-commutative82.6%

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

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

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}}} \]
    5. Step-by-step derivation
      1. associate-/r/87.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)} \]
      2. associate-/l*99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 98.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

    if 0.0800000000000000017 < x

    1. Initial program 84.7%

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

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

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

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

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}}} \]
    5. Step-by-step derivation
      1. associate-/r/88.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)} \]
      2. associate-/l*99.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 98.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

    if 2.8e10 < x

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 98.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

    if 3.6e10 < x

    1. Initial program 83.6%

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

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

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

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

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

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

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

        \[\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)} \]
      2. associate-/l*99.7%

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

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

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

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

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

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

Alternative 7: 99.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

    if 0.0800000000000000017 < x

    1. Initial program 84.7%

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

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

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

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

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{\frac{z \cdot z}{\frac{x}{0.0007936500793651 + y}}} \]
    5. Step-by-step derivation
      1. associate-/r/88.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)} \]
      2. associate-/l*99.7%

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

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

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

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

Alternative 8: 95.3% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.99999999999999971e-31 or 1.10000000000000009e-62 < z

    1. Initial program 88.6%

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

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

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

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

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

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

        \[\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)} \]
      2. associate-/l*96.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.99999999999999971e-31 < z < 1.10000000000000009e-62

    1. Initial program 99.5%

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

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

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

Alternative 9: 95.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 85.1%

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

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

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

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

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

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

        \[\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)} \]
      2. associate-/l*97.6%

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

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

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

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

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

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

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

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

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

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

    if -6.8000000000000002e-31 < z < 1.05e-62

    1. Initial program 99.5%

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

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

    if 1.05e-62 < z

    1. Initial program 91.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 85.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. +-commutative85.6%

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

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

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

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

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

        \[\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)} \]
      2. associate-/l*95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 95.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 9.2 \cdot 10^{-63}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{1}{x \cdot 12.000000000000048}\\

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


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

    1. Initial program 85.1%

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

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

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

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

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

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

        \[\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)} \]
      2. associate-/l*97.6%

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

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

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

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

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

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

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

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

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

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

    if -6.8000000000000002e-31 < z < 9.2e-63

    1. Initial program 99.5%

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

        \[\leadsto \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}} \]
      2. inv-pow42.5%

        \[\leadsto \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
      3. div-inv42.7%

        \[\leadsto {\color{blue}{\left(x \cdot \frac{1}{0.083333333333333}\right)}}^{-1} \]
      4. metadata-eval42.7%

        \[\leadsto {\left(x \cdot \color{blue}{12.000000000000048}\right)}^{-1} \]
    4. Applied egg-rr94.4%

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(x \cdot 12.000000000000048\right)}^{-1}} \]
    5. Step-by-step derivation
      1. unpow-142.7%

        \[\leadsto \color{blue}{\frac{1}{x \cdot 12.000000000000048}} \]
    6. Simplified94.4%

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

    if 9.2e-63 < z

    1. Initial program 91.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 85.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. +-commutative85.6%

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

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

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

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

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

        \[\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)} \]
      2. associate-/l*95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 76.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_0 := x \cdot \left(\log x + -1\right)\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{-8} \lor \neg \left(z \leq 5.2 \cdot 10^{-13}\right):\\
\;\;\;\;t_0 + 0.0007936500793651 \cdot \frac{z \cdot z}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4999999999999999e-8 or 5.2000000000000001e-13 < z

    1. Initial program 87.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 86.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. +-commutative86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4999999999999999e-8 < z < 5.2000000000000001e-13

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 78.2% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.99999999999999971e-31 or 1.85999999999999995e-31 < z

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.99999999999999971e-31 < z < 1.85999999999999995e-31

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 78.2% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.8000000000000002e-31 or 1.45e-31 < z

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.8000000000000002e-31 < z < 1.45e-31

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}} \]
      2. inv-pow42.6%

        \[\leadsto \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
      3. div-inv42.7%

        \[\leadsto {\color{blue}{\left(x \cdot \frac{1}{0.083333333333333}\right)}}^{-1} \]
      4. metadata-eval42.7%

        \[\leadsto {\left(x \cdot \color{blue}{12.000000000000048}\right)}^{-1} \]
    7. Applied egg-rr89.7%

      \[\leadsto \left(\left(x \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(x \cdot 12.000000000000048\right)}^{-1}} \]
    8. Step-by-step derivation
      1. unpow-142.7%

        \[\leadsto \color{blue}{\frac{1}{x \cdot 12.000000000000048}} \]
    9. Simplified89.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{-31} \lor \neg \left(z \leq 1.45 \cdot 10^{-31}\right):\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{z \cdot z}{\frac{x}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{x \cdot 12.000000000000048} + \left(0.91893853320467 + \left(x \cdot \log x - x\right)\right)\\ \end{array} \]

Alternative 14: 79.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{-31} \lor \neg \left(z \leq 6 \cdot 10^{-17}\right):\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{z \cdot z}{\frac{x}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.8000000000000002e-31 or 6.00000000000000012e-17 < z

    1. Initial program 88.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 86.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. +-commutative86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.8000000000000002e-31 < z < 6.00000000000000012e-17

    1. Initial program 99.5%

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

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

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

Alternative 15: 76.9% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;z \leq 5.2 \cdot 10^{-13}:\\
\;\;\;\;t_0 + \frac{0.083333333333333}{x}\\

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


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

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4999999999999999e-8 < z < 5.2000000000000001e-13

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

    if 5.2000000000000001e-13 < z

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\log x + -1\right) + \frac{z \cdot z}{\color{blue}{x \cdot 1260.0011340009878}} \]
    10. Simplified61.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{-8}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + 0.0007936500793651 \cdot \frac{z \cdot z}{x}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-13}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{z \cdot z}{x \cdot 1260.0011340009878}\\ \end{array} \]

Alternative 16: 59.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{+91} \lor \neg \left(z \leq 7 \cdot 10^{+157}\right):\\ \;\;\;\;\sqrt[3]{\frac{0.083333333333333}{x} \cdot \left(\frac{0.083333333333333}{x} \cdot \frac{0.083333333333333}{x}\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -2.25e+91) (not (<= z 7e+157)))
   (cbrt
    (*
     (/ 0.083333333333333 x)
     (* (/ 0.083333333333333 x) (/ 0.083333333333333 x))))
   (+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -2.25e+91) || !(z <= 7e+157)) {
		tmp = cbrt(((0.083333333333333 / x) * ((0.083333333333333 / x) * (0.083333333333333 / x))));
	} else {
		tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
	}
	return tmp;
}
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -2.25e+91) || !(z <= 7e+157)) {
		tmp = Math.cbrt(((0.083333333333333 / x) * ((0.083333333333333 / x) * (0.083333333333333 / x))));
	} else {
		tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if ((z <= -2.25e+91) || !(z <= 7e+157))
		tmp = cbrt(Float64(Float64(0.083333333333333 / x) * Float64(Float64(0.083333333333333 / x) * Float64(0.083333333333333 / x))));
	else
		tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x));
	end
	return tmp
end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.25e+91], N[Not[LessEqual[z, 7e+157]], $MachinePrecision]], N[Power[N[(N[(0.083333333333333 / x), $MachinePrecision] * N[(N[(0.083333333333333 / x), $MachinePrecision] * N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+91} \lor \neg \left(z \leq 7 \cdot 10^{+157}\right):\\
\;\;\;\;\sqrt[3]{\frac{0.083333333333333}{x} \cdot \left(\frac{0.083333333333333}{x} \cdot \frac{0.083333333333333}{x}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.25e91 or 7.00000000000000004e157 < z

    1. Initial program 83.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 10.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 10.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
    7. Step-by-step derivation
      1. add-cbrt-cube_binary6423.9%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\frac{0.083333333333333}{x} \cdot \frac{0.083333333333333}{x}\right) \cdot \frac{0.083333333333333}{x}}} \]
    8. Applied rewrite-once23.9%

      \[\leadsto \color{blue}{\sqrt[3]{\left(\frac{0.083333333333333}{x} \cdot \frac{0.083333333333333}{x}\right) \cdot \frac{0.083333333333333}{x}}} \]

    if -2.25e91 < z < 7.00000000000000004e157

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.25 \cdot 10^{+91} \lor \neg \left(z \leq 7 \cdot 10^{+157}\right):\\ \;\;\;\;\sqrt[3]{\frac{0.083333333333333}{x} \cdot \left(\frac{0.083333333333333}{x} \cdot \frac{0.083333333333333}{x}\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\ \end{array} \]

Alternative 17: 55.9% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 55.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 16500000000:\\
\;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\

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


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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
    7. Step-by-step derivation
      1. clear-num30.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{x}{0.083333333333333}}} \]
      2. inv-pow30.6%

        \[\leadsto \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
      3. div-inv30.7%

        \[\leadsto {\color{blue}{\left(x \cdot \frac{1}{0.083333333333333}\right)}}^{-1} \]
      4. metadata-eval30.7%

        \[\leadsto {\left(x \cdot \color{blue}{12.000000000000048}\right)}^{-1} \]
    8. Applied egg-rr30.7%

      \[\leadsto \color{blue}{{\left(x \cdot 12.000000000000048\right)}^{-1}} \]
    9. Step-by-step derivation
      1. unpow-130.7%

        \[\leadsto \color{blue}{\frac{1}{x \cdot 12.000000000000048}} \]
    10. Simplified30.7%

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

    if 1.65e10 < x

    1. Initial program 83.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. Step-by-step derivation
      1. fma-neg84.0%

        \[\leadsto \left(\color{blue}{\mathsf{fma}\left(x - 0.5, \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. sub-neg84.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 24.0% accurate, 24.6× speedup?

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

\\
0.91893853320467 + \frac{0.083333333333333}{x}
\end{array}
Derivation
  1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{0.91893853320467 + 0.083333333333333 \cdot \frac{1}{x}} \]
  7. Step-by-step derivation
    1. +-commutative17.9%

      \[\leadsto \color{blue}{0.083333333333333 \cdot \frac{1}{x} + 0.91893853320467} \]
    2. associate-*r/17.9%

      \[\leadsto \color{blue}{\frac{0.083333333333333 \cdot 1}{x}} + 0.91893853320467 \]
    3. metadata-eval17.9%

      \[\leadsto \frac{\color{blue}{0.083333333333333}}{x} + 0.91893853320467 \]
  8. Simplified17.9%

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x} + 0.91893853320467} \]
  9. Final simplification17.9%

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

Alternative 20: 23.4% accurate, 41.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer target: 98.5% 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 2023297 
(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)))