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

Percentage Accurate: 93.8% → 98.5%
Time: 16.0s
Alternatives: 14
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 93.8% 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: 98.5% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 99.6%

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

    if 1.99999999999999987e146 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 95.9% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.6%

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

    if 1.3e148 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 94.3% accurate, 1.0× speedup?

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

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

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


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

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

    if 3.5999999999999997e166 < x

    1. Initial program 81.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 97.3% accurate, 1.0× speedup?

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

\\
\left(0.91893853320467 + \left(0.083333333333333 \cdot \frac{1}{x} + \left(\log x \cdot \left(x - 0.5\right) - z \cdot \frac{0.0027777777777778 + z \cdot \left(-0.0007936500793651 - y\right)}{x}\right)\right)\right) - x
\end{array}
Derivation
  1. Initial program 95.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 93.3% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t\_0\\


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

    1. Initial program 99.1%

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

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

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

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

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

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

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

      \[\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} \]
    6. Step-by-step derivation
      1. sub-neg97.4%

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

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

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

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

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

      \[\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 9.9999999999999994e165 < x

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 84.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.15 \cdot 10^{+45}:\\
\;\;\;\;\frac{0.083333333333333 + {z}^{2} \cdot \left(0.0007936500793651 + \left(y - \frac{0.0027777777777778}{z}\right)\right)}{x}\\

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


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

    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. Step-by-step derivation
      1. associate-+l+99.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.083333333333333 + {z}^{2} \cdot \left(0.0007936500793651 + \left(y - \frac{\color{blue}{0.0027777777777778}}{z}\right)\right)}{x} \]
    8. Simplified92.8%

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

    if 1.15000000000000006e45 < x

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 84.4% accurate, 1.1× speedup?

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

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

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


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

    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. Step-by-step derivation
      1. associate-+l+99.6%

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

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

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

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

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

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

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

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

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

    if 7.00000000000000047e42 < x

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 63.5% accurate, 5.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.00078 \lor \neg \left(y \leq 15\right):\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.79999999999999986e-4 or 15 < y

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.083333333333333 + z \cdot \left(\color{blue}{z \cdot y} - 0.0027777777777778\right)}{x} \]
    8. Simplified65.6%

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

    if -7.79999999999999986e-4 < y < 15

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{0.083333333333333 + z \cdot \left(\color{blue}{z \cdot 0.0007936500793651} - 0.0027777777777778\right)}{x} \]
    8. Simplified55.0%

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

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

Alternative 9: 59.8% accurate, 5.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-54} \lor \neg \left(z \leq 4.1 \cdot 10^{-29}\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.39999999999999987e-54 or 4.0999999999999998e-29 < z

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)} \]
    8. Step-by-step derivation
      1. unpow269.4%

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

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

    if -3.39999999999999987e-54 < z < 4.0999999999999998e-29

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{x \cdot 12.000000000000048}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{-54} \lor \neg \left(z \leq 4.1 \cdot 10^{-29}\right):\\ \;\;\;\;\left(z \cdot z\right) \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 49.0% accurate, 7.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-54} \lor \neg \left(z \leq 9.5 \cdot 10^{-30}\right):\\
\;\;\;\;y \cdot \frac{z \cdot z}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1e-54 or 9.49999999999999939e-30 < z

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
    6. Step-by-step derivation
      1. associate-/l*50.0%

        \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
    7. Simplified50.0%

      \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
    8. Step-by-step derivation
      1. unpow269.4%

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{0.0007936500793651}{x} + \frac{y}{x}\right) \]
    9. Applied egg-rr50.0%

      \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]

    if -2.1e-54 < z < 9.49999999999999939e-30

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{x \cdot 12.000000000000048}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{-54} \lor \neg \left(z \leq 9.5 \cdot 10^{-30}\right):\\ \;\;\;\;y \cdot \frac{z \cdot z}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 49.4% accurate, 7.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-54} \lor \neg \left(z \leq 3.7 \cdot 10^{-29}\right):\\
\;\;\;\;y \cdot \left(z \cdot \frac{z}{x}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.00000000000000009e-54 or 3.6999999999999997e-29 < z

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
    6. Step-by-step derivation
      1. associate-/l*50.0%

        \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
    7. Simplified50.0%

      \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
    8. Step-by-step derivation
      1. unpow250.0%

        \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]
      2. associate-/l*49.8%

        \[\leadsto y \cdot \color{blue}{\left(z \cdot \frac{z}{x}\right)} \]
    9. Applied egg-rr49.8%

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

    if -3.00000000000000009e-54 < z < 3.6999999999999997e-29

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{x \cdot 12.000000000000048}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{-54} \lor \neg \left(z \leq 3.7 \cdot 10^{-29}\right):\\ \;\;\;\;y \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 63.7% accurate, 9.5× speedup?

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

\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}
\end{array}
Derivation
  1. Initial program 95.6%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
  6. Final simplification60.4%

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

Alternative 13: 23.9% accurate, 24.6× speedup?

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

\\
\frac{1}{x \cdot 12.000000000000048}
\end{array}
Derivation
  1. Initial program 95.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{1}{x \cdot 12.000000000000048}} \]
  11. Add Preprocessing

Alternative 14: 23.9% accurate, 41.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  :alt
  (! :herbie-platform default (+ (+ (+ (* (- x 1/2) (log x)) (- 91893853320467/100000000000000 x)) (/ 83333333333333/1000000000000000 x)) (* (/ z x) (- (* z (+ y 7936500793651/10000000000000000)) 13888888888889/5000000000000000))))

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