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

Percentage Accurate: 93.9% → 98.8%
Time: 25.2s
Alternatives: 16
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 16 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.9% 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.8% accurate, 1.0× speedup?

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

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

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


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

    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
    3. Taylor expanded in x around 0 99.6%

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

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

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

    if 1.85e-8 < x

    1. Initial program 90.6%

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

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

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

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

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

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

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

Alternative 2: 83.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{0.0007936500793651 + y}{x}\\ t_1 := t\_0 \cdot {z}^{2}\\ t_2 := \left(0.91893853320467 + \log x \cdot -0.5\right) + z \cdot \left(z \cdot t\_0\right)\\ t_3 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\ \mathbf{if}\;z \leq -1 \cdot 10^{+61}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+17}:\\ \;\;\;\;t\_3 + 0.083333333333333 \cdot \frac{1}{x}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+99}:\\ \;\;\;\;t\_3 + y \cdot \frac{0.083333333333333}{x \cdot y}\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{+115}:\\ \;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+115}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+155}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ (+ 0.0007936500793651 y) x))
        (t_1 (* t_0 (pow z 2.0)))
        (t_2 (+ (+ 0.91893853320467 (* (log x) -0.5)) (* z (* z t_0))))
        (t_3 (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)))
   (if (<= z -1e+61)
     t_2
     (if (<= z 4.6e+17)
       (+ t_3 (* 0.083333333333333 (/ 1.0 x)))
       (if (<= z 5.4e+66)
         t_1
         (if (<= z 4e+99)
           (+ t_3 (* y (/ 0.083333333333333 (* x y))))
           (if (<= z 6.1e+115)
             (/ (* (+ 0.0007936500793651 y) (pow z 2.0)) x)
             (if (<= z 6.2e+115)
               (+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))
               (if (<= z 4.4e+155) t_1 t_2)))))))))
double code(double x, double y, double z) {
	double t_0 = (0.0007936500793651 + y) / x;
	double t_1 = t_0 * pow(z, 2.0);
	double t_2 = (0.91893853320467 + (log(x) * -0.5)) + (z * (z * t_0));
	double t_3 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
	double tmp;
	if (z <= -1e+61) {
		tmp = t_2;
	} else if (z <= 4.6e+17) {
		tmp = t_3 + (0.083333333333333 * (1.0 / x));
	} else if (z <= 5.4e+66) {
		tmp = t_1;
	} else if (z <= 4e+99) {
		tmp = t_3 + (y * (0.083333333333333 / (x * y)));
	} else if (z <= 6.1e+115) {
		tmp = ((0.0007936500793651 + y) * pow(z, 2.0)) / x;
	} else if (z <= 6.2e+115) {
		tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
	} else if (z <= 4.4e+155) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_0 = (0.0007936500793651d0 + y) / x
    t_1 = t_0 * (z ** 2.0d0)
    t_2 = (0.91893853320467d0 + (log(x) * (-0.5d0))) + (z * (z * t_0))
    t_3 = (((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0
    if (z <= (-1d+61)) then
        tmp = t_2
    else if (z <= 4.6d+17) then
        tmp = t_3 + (0.083333333333333d0 * (1.0d0 / x))
    else if (z <= 5.4d+66) then
        tmp = t_1
    else if (z <= 4d+99) then
        tmp = t_3 + (y * (0.083333333333333d0 / (x * y)))
    else if (z <= 6.1d+115) then
        tmp = ((0.0007936500793651d0 + y) * (z ** 2.0d0)) / x
    else if (z <= 6.2d+115) then
        tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
    else if (z <= 4.4d+155) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (0.0007936500793651 + y) / x;
	double t_1 = t_0 * Math.pow(z, 2.0);
	double t_2 = (0.91893853320467 + (Math.log(x) * -0.5)) + (z * (z * t_0));
	double t_3 = (((x - 0.5) * Math.log(x)) - x) + 0.91893853320467;
	double tmp;
	if (z <= -1e+61) {
		tmp = t_2;
	} else if (z <= 4.6e+17) {
		tmp = t_3 + (0.083333333333333 * (1.0 / x));
	} else if (z <= 5.4e+66) {
		tmp = t_1;
	} else if (z <= 4e+99) {
		tmp = t_3 + (y * (0.083333333333333 / (x * y)));
	} else if (z <= 6.1e+115) {
		tmp = ((0.0007936500793651 + y) * Math.pow(z, 2.0)) / x;
	} else if (z <= 6.2e+115) {
		tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
	} else if (z <= 4.4e+155) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (0.0007936500793651 + y) / x
	t_1 = t_0 * math.pow(z, 2.0)
	t_2 = (0.91893853320467 + (math.log(x) * -0.5)) + (z * (z * t_0))
	t_3 = (((x - 0.5) * math.log(x)) - x) + 0.91893853320467
	tmp = 0
	if z <= -1e+61:
		tmp = t_2
	elif z <= 4.6e+17:
		tmp = t_3 + (0.083333333333333 * (1.0 / x))
	elif z <= 5.4e+66:
		tmp = t_1
	elif z <= 4e+99:
		tmp = t_3 + (y * (0.083333333333333 / (x * y)))
	elif z <= 6.1e+115:
		tmp = ((0.0007936500793651 + y) * math.pow(z, 2.0)) / x
	elif z <= 6.2e+115:
		tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x)
	elif z <= 4.4e+155:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(0.0007936500793651 + y) / x)
	t_1 = Float64(t_0 * (z ^ 2.0))
	t_2 = Float64(Float64(0.91893853320467 + Float64(log(x) * -0.5)) + Float64(z * Float64(z * t_0)))
	t_3 = Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467)
	tmp = 0.0
	if (z <= -1e+61)
		tmp = t_2;
	elseif (z <= 4.6e+17)
		tmp = Float64(t_3 + Float64(0.083333333333333 * Float64(1.0 / x)));
	elseif (z <= 5.4e+66)
		tmp = t_1;
	elseif (z <= 4e+99)
		tmp = Float64(t_3 + Float64(y * Float64(0.083333333333333 / Float64(x * y))));
	elseif (z <= 6.1e+115)
		tmp = Float64(Float64(Float64(0.0007936500793651 + y) * (z ^ 2.0)) / x);
	elseif (z <= 6.2e+115)
		tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x));
	elseif (z <= 4.4e+155)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (0.0007936500793651 + y) / x;
	t_1 = t_0 * (z ^ 2.0);
	t_2 = (0.91893853320467 + (log(x) * -0.5)) + (z * (z * t_0));
	t_3 = (((x - 0.5) * log(x)) - x) + 0.91893853320467;
	tmp = 0.0;
	if (z <= -1e+61)
		tmp = t_2;
	elseif (z <= 4.6e+17)
		tmp = t_3 + (0.083333333333333 * (1.0 / x));
	elseif (z <= 5.4e+66)
		tmp = t_1;
	elseif (z <= 4e+99)
		tmp = t_3 + (y * (0.083333333333333 / (x * y)));
	elseif (z <= 6.1e+115)
		tmp = ((0.0007936500793651 + y) * (z ^ 2.0)) / x;
	elseif (z <= 6.2e+115)
		tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
	elseif (z <= 4.4e+155)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(z * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision]}, If[LessEqual[z, -1e+61], t$95$2, If[LessEqual[z, 4.6e+17], N[(t$95$3 + N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+66], t$95$1, If[LessEqual[z, 4e+99], N[(t$95$3 + N[(y * N[(0.083333333333333 / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.1e+115], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[z, 6.2e+115], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+155], t$95$1, t$95$2]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{0.0007936500793651 + y}{x}\\
t_1 := t\_0 \cdot {z}^{2}\\
t_2 := \left(0.91893853320467 + \log x \cdot -0.5\right) + z \cdot \left(z \cdot t\_0\right)\\
t_3 := \left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\\
\mathbf{if}\;z \leq -1 \cdot 10^{+61}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 4.6 \cdot 10^{+17}:\\
\;\;\;\;t\_3 + 0.083333333333333 \cdot \frac{1}{x}\\

\mathbf{elif}\;z \leq 5.4 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4 \cdot 10^{+99}:\\
\;\;\;\;t\_3 + y \cdot \frac{0.083333333333333}{x \cdot y}\\

\mathbf{elif}\;z \leq 6.1 \cdot 10^{+115}:\\
\;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+115}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -9.99999999999999949e60 or 4.4000000000000005e155 < z

    1. Initial program 90.6%

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

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval83.4%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval83.4%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/83.4%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr83.4%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 85.9%

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

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

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

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

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

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

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

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

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

    if -9.99999999999999949e60 < z < 4.6e17

    1. Initial program 98.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. Taylor expanded in z around 0 85.0%

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

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

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

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

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

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

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

    if 4.6e17 < z < 5.4e66 or 6.2000000000000001e115 < z < 4.4000000000000005e155

    1. Initial program 95.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. Add Preprocessing
    3. Step-by-step derivation
      1. flip--81.9%

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval81.9%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval81.9%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/81.9%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr81.9%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 80.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
    11. Simplified85.3%

      \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]

    if 5.4e66 < z < 3.9999999999999999e99

    1. Initial program 60.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-sqr-sqrt60.1%

        \[\leadsto \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}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}} \]
      2. *-un-lft-identity60.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.9999999999999999e99 < z < 6.09999999999999966e115

    1. Initial program 100.0%

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

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval100.0%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval100.0%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/100.0%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr100.0%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 100.0%

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

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

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

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

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

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

    if 6.09999999999999966e115 < z < 6.2000000000000001e115

    1. Initial program 100.0%

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

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

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

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

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

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

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

        \[\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} \]
      6. +-commutative100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+61}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+17}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + 0.083333333333333 \cdot \frac{1}{x}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+66}:\\ \;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+99}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + y \cdot \frac{0.083333333333333}{x \cdot y}\\ \mathbf{elif}\;z \leq 6.1 \cdot 10^{+115}:\\ \;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+115}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+155}:\\ \;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 98.7% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.5999999999999998e-100

    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
    3. Step-by-step derivation
      1. add-sqr-sqrt99.5%

        \[\leadsto \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}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}} \]
      2. *-un-lft-identity99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5999999999999998e-100 < x

    1. Initial program 92.7%

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

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

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

Alternative 4: 84.5% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+67}:\\
\;\;\;\;t\_0 \cdot {z}^{2}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.0599999999999999e61 or 1.05e68 < z

    1. Initial program 89.7%

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

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval81.1%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval81.1%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/81.1%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr81.1%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 83.0%

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

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

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

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

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

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

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

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

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

    if -1.0599999999999999e61 < z < 4.1e16

    1. Initial program 98.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. Taylor expanded in z around 0 85.0%

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

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

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

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

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

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

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

    if 4.1e16 < z < 7.5000000000000005e67

    1. Initial program 99.5%

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

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval79.2%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval79.2%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/79.2%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr79.2%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 76.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
    11. Simplified76.6%

      \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]

    if 7.5000000000000005e67 < z < 1.05e68

    1. Initial program 100.0%

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

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

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

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

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

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

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

        \[\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} \]
      6. +-commutative100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.06 \cdot 10^{+61}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+16}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + 0.083333333333333 \cdot \frac{1}{x}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+67}:\\ \;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+68}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 84.1% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;z \leq 5.4 \cdot 10^{+66}:\\
\;\;\;\;t\_0 \cdot {z}^{2}\\

\mathbf{elif}\;z \leq 7.3 \cdot 10^{+81}:\\
\;\;\;\;\left(x \cdot \log x - x\right) + \frac{0.083333333333333}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.5e61 or 7.2999999999999997e81 < z

    1. Initial program 89.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
    3. Step-by-step derivation
      1. flip--81.9%

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval81.9%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval81.9%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/81.9%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr81.9%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 83.8%

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

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

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

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

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

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

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

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

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

    if -4.5e61 < z < 5e16

    1. Initial program 98.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. Taylor expanded in z around 0 85.0%

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

    if 5e16 < z < 5.4e66

    1. Initial program 99.5%

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

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval79.2%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval79.2%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/79.2%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr79.2%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 76.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
    11. Simplified76.6%

      \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]

    if 5.4e66 < z < 7.2999999999999997e81

    1. Initial program 100.0%

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

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

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

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

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

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

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

        \[\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} \]
      6. +-commutative99.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+61}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+16}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+66}:\\ \;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\ \mathbf{elif}\;z \leq 7.3 \cdot 10^{+81}:\\ \;\;\;\;\left(x \cdot \log x - x\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \log x \cdot -0.5\right) + z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 81.8% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+67} \lor \neg \left(z \leq 1.7 \cdot 10^{+92}\right):\\
\;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.3500000000000001e61

    1. Initial program 91.0%

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

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval82.1%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval82.1%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/82.1%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr82.1%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 83.9%

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

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

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

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

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

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

    if -1.3500000000000001e61 < z < 6e17

    1. Initial program 98.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. Taylor expanded in z around 0 85.0%

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

    if 6e17 < z < 7.5000000000000005e67 or 1.6999999999999999e92 < z

    1. Initial program 91.4%

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

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval82.7%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval82.7%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/82.7%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr82.7%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 83.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
    11. Simplified85.7%

      \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]

    if 7.5000000000000005e67 < z < 1.6999999999999999e92

    1. Initial program 66.7%

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

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

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

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

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

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

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

        \[\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} \]
      6. +-commutative66.2%

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

      \[\leadsto \color{blue}{x \cdot \left(-1 + \log x\right)} + \frac{0.083333333333333}{x} \]
    7. Step-by-step derivation
      1. +-commutative99.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+61}:\\ \;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+17}:\\ \;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{0.083333333333333}{x}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+67} \lor \neg \left(z \leq 1.7 \cdot 10^{+92}\right):\\ \;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \log x - x\right) + \frac{0.083333333333333}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 81.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+61}:\\ \;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+16} \lor \neg \left(z \leq 7.5 \cdot 10^{+67}\right) \land z \leq 3.45 \cdot 10^{+71}:\\ \;\;\;\;\left(x \cdot \log x - x\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -1e+61)
   (/ (* (+ 0.0007936500793651 y) (pow z 2.0)) x)
   (if (or (<= z 6.8e+16) (and (not (<= z 7.5e+67)) (<= z 3.45e+71)))
     (+ (- (* x (log x)) x) (/ 0.083333333333333 x))
     (* (/ (+ 0.0007936500793651 y) x) (pow z 2.0)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -1e+61) {
		tmp = ((0.0007936500793651 + y) * pow(z, 2.0)) / x;
	} else if ((z <= 6.8e+16) || (!(z <= 7.5e+67) && (z <= 3.45e+71))) {
		tmp = ((x * log(x)) - x) + (0.083333333333333 / x);
	} else {
		tmp = ((0.0007936500793651 + y) / x) * pow(z, 2.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 (z <= (-1d+61)) then
        tmp = ((0.0007936500793651d0 + y) * (z ** 2.0d0)) / x
    else if ((z <= 6.8d+16) .or. (.not. (z <= 7.5d+67)) .and. (z <= 3.45d+71)) then
        tmp = ((x * log(x)) - x) + (0.083333333333333d0 / x)
    else
        tmp = ((0.0007936500793651d0 + y) / x) * (z ** 2.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -1e+61) {
		tmp = ((0.0007936500793651 + y) * Math.pow(z, 2.0)) / x;
	} else if ((z <= 6.8e+16) || (!(z <= 7.5e+67) && (z <= 3.45e+71))) {
		tmp = ((x * Math.log(x)) - x) + (0.083333333333333 / x);
	} else {
		tmp = ((0.0007936500793651 + y) / x) * Math.pow(z, 2.0);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -1e+61:
		tmp = ((0.0007936500793651 + y) * math.pow(z, 2.0)) / x
	elif (z <= 6.8e+16) or (not (z <= 7.5e+67) and (z <= 3.45e+71)):
		tmp = ((x * math.log(x)) - x) + (0.083333333333333 / x)
	else:
		tmp = ((0.0007936500793651 + y) / x) * math.pow(z, 2.0)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -1e+61)
		tmp = Float64(Float64(Float64(0.0007936500793651 + y) * (z ^ 2.0)) / x);
	elseif ((z <= 6.8e+16) || (!(z <= 7.5e+67) && (z <= 3.45e+71)))
		tmp = Float64(Float64(Float64(x * log(x)) - x) + Float64(0.083333333333333 / x));
	else
		tmp = Float64(Float64(Float64(0.0007936500793651 + y) / x) * (z ^ 2.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -1e+61)
		tmp = ((0.0007936500793651 + y) * (z ^ 2.0)) / x;
	elseif ((z <= 6.8e+16) || (~((z <= 7.5e+67)) && (z <= 3.45e+71)))
		tmp = ((x * log(x)) - x) + (0.083333333333333 / x);
	else
		tmp = ((0.0007936500793651 + y) / x) * (z ^ 2.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -1e+61], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[Or[LessEqual[z, 6.8e+16], And[N[Not[LessEqual[z, 7.5e+67]], $MachinePrecision], LessEqual[z, 3.45e+71]]], N[(N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 6.8 \cdot 10^{+16} \lor \neg \left(z \leq 7.5 \cdot 10^{+67}\right) \land z \leq 3.45 \cdot 10^{+71}:\\
\;\;\;\;\left(x \cdot \log x - x\right) + \frac{0.083333333333333}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.99999999999999949e60

    1. Initial program 91.0%

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

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval82.1%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval82.1%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/82.1%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr82.1%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 83.9%

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

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

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

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

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

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

    if -9.99999999999999949e60 < z < 6.8e16 or 7.5000000000000005e67 < z < 3.44999999999999987e71

    1. Initial program 98.2%

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

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

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

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

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

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

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

        \[\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} \]
      6. +-commutative95.5%

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

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

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

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

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

        \[\leadsto \left(x \cdot \log x + \color{blue}{\left(-x\right)}\right) + \frac{0.083333333333333}{x} \]
    8. Applied egg-rr82.8%

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

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

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

    if 6.8e16 < z < 7.5000000000000005e67 or 3.44999999999999987e71 < z

    1. Initial program 89.8%

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

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval81.3%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval81.3%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/81.3%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr81.3%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 82.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
    11. Simplified84.2%

      \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification83.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+61}:\\ \;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+16} \lor \neg \left(z \leq 7.5 \cdot 10^{+67}\right) \land z \leq 3.45 \cdot 10^{+71}:\\ \;\;\;\;\left(x \cdot \log x - x\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 81.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+61}:\\ \;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+16} \lor \neg \left(z \leq 7.5 \cdot 10^{+67}\right) \land z \leq 3.45 \cdot 10^{+71}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -1e+61)
   (/ (* (+ 0.0007936500793651 y) (pow z 2.0)) x)
   (if (or (<= z 4.5e+16) (and (not (<= z 7.5e+67)) (<= z 3.45e+71)))
     (+ (* x (+ (log x) -1.0)) (/ 0.083333333333333 x))
     (* (/ (+ 0.0007936500793651 y) x) (pow z 2.0)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -1e+61) {
		tmp = ((0.0007936500793651 + y) * pow(z, 2.0)) / x;
	} else if ((z <= 4.5e+16) || (!(z <= 7.5e+67) && (z <= 3.45e+71))) {
		tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
	} else {
		tmp = ((0.0007936500793651 + y) / x) * pow(z, 2.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 (z <= (-1d+61)) then
        tmp = ((0.0007936500793651d0 + y) * (z ** 2.0d0)) / x
    else if ((z <= 4.5d+16) .or. (.not. (z <= 7.5d+67)) .and. (z <= 3.45d+71)) then
        tmp = (x * (log(x) + (-1.0d0))) + (0.083333333333333d0 / x)
    else
        tmp = ((0.0007936500793651d0 + y) / x) * (z ** 2.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -1e+61) {
		tmp = ((0.0007936500793651 + y) * Math.pow(z, 2.0)) / x;
	} else if ((z <= 4.5e+16) || (!(z <= 7.5e+67) && (z <= 3.45e+71))) {
		tmp = (x * (Math.log(x) + -1.0)) + (0.083333333333333 / x);
	} else {
		tmp = ((0.0007936500793651 + y) / x) * Math.pow(z, 2.0);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -1e+61:
		tmp = ((0.0007936500793651 + y) * math.pow(z, 2.0)) / x
	elif (z <= 4.5e+16) or (not (z <= 7.5e+67) and (z <= 3.45e+71)):
		tmp = (x * (math.log(x) + -1.0)) + (0.083333333333333 / x)
	else:
		tmp = ((0.0007936500793651 + y) / x) * math.pow(z, 2.0)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -1e+61)
		tmp = Float64(Float64(Float64(0.0007936500793651 + y) * (z ^ 2.0)) / x);
	elseif ((z <= 4.5e+16) || (!(z <= 7.5e+67) && (z <= 3.45e+71)))
		tmp = Float64(Float64(x * Float64(log(x) + -1.0)) + Float64(0.083333333333333 / x));
	else
		tmp = Float64(Float64(Float64(0.0007936500793651 + y) / x) * (z ^ 2.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -1e+61)
		tmp = ((0.0007936500793651 + y) * (z ^ 2.0)) / x;
	elseif ((z <= 4.5e+16) || (~((z <= 7.5e+67)) && (z <= 3.45e+71)))
		tmp = (x * (log(x) + -1.0)) + (0.083333333333333 / x);
	else
		tmp = ((0.0007936500793651 + y) / x) * (z ^ 2.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -1e+61], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[Or[LessEqual[z, 4.5e+16], And[N[Not[LessEqual[z, 7.5e+67]], $MachinePrecision], LessEqual[z, 3.45e+71]]], N[(N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision] * N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{+16} \lor \neg \left(z \leq 7.5 \cdot 10^{+67}\right) \land z \leq 3.45 \cdot 10^{+71}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.99999999999999949e60

    1. Initial program 91.0%

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

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval82.1%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval82.1%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/82.1%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr82.1%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 83.9%

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

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

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

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

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

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

    if -9.99999999999999949e60 < z < 4.5e16 or 7.5000000000000005e67 < z < 3.44999999999999987e71

    1. Initial program 98.2%

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

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

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

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

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

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

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

        \[\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} \]
      6. +-commutative95.5%

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

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

    if 4.5e16 < z < 7.5000000000000005e67 or 3.44999999999999987e71 < z

    1. Initial program 89.8%

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

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval81.3%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval81.3%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/81.3%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr81.3%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 82.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
    11. Simplified84.2%

      \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification83.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+61}:\\ \;\;\;\;\frac{\left(0.0007936500793651 + y\right) \cdot {z}^{2}}{x}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+16} \lor \neg \left(z \leq 7.5 \cdot 10^{+67}\right) \land z \leq 3.45 \cdot 10^{+71}:\\ \;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 98.6% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 5.9e-12

    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
    3. Step-by-step derivation
      1. flip--99.6%

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval99.6%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval99.6%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/99.6%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr99.6%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 99.6%

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

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

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

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

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

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

    if 5.9e-12 < x

    1. Initial program 90.7%

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

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

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

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

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

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

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

Alternative 10: 93.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 98.3%

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

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

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

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

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

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

        \[\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} \]
      6. +-commutative96.5%

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

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

    if 5.99999999999999971e209 < x

    1. Initial program 79.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
    3. Taylor expanded in z around 0 89.4%

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

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} + \frac{0.083333333333333}{x} \]
    5. Step-by-step derivation
      1. sub-neg79.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-neg79.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-rec79.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-neg79.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-eval79.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} \]
      6. +-commutative79.4%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 57.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1800000 \lor \neg \left(z \leq 5.2 \cdot 10^{-137}\right):\\
\;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.8e6 or 5.1999999999999999e-137 < z

    1. Initial program 91.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
    3. Step-by-step derivation
      1. flip--79.6%

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval79.6%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval79.6%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/79.6%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr79.6%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 71.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
    11. Simplified68.6%

      \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]

    if -1.8e6 < z < 5.1999999999999999e-137

    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. Add Preprocessing
    3. Taylor expanded in z around 0 92.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
    12. Step-by-step derivation
      1. clear-num92.4%

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
    13. Applied egg-rr46.2%

      \[\leadsto \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
    14. Step-by-step derivation
      1. unpow-192.4%

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

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

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

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

Alternative 12: 58.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{-13}:\\
\;\;\;\;\frac{0.0007936500793651 + y}{x} \cdot {z}^{2}\\

\mathbf{elif}\;z \leq 5.2 \cdot 10^{-137}:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\

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


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

    1. Initial program 90.7%

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

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval76.7%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval76.7%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/76.7%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr76.7%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 72.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]
    11. Simplified71.3%

      \[\leadsto \color{blue}{{z}^{2} \cdot \frac{0.0007936500793651 + y}{x}} \]

    if -4.59999999999999958e-13 < z < 5.1999999999999999e-137

    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. Add Preprocessing
    3. Taylor expanded in z around 0 93.7%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
    5. Applied egg-rr93.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
    14. Step-by-step derivation
      1. unpow-193.6%

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

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

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

    if 5.1999999999999999e-137 < z

    1. Initial program 93.0%

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

        \[\leadsto \left(\left(\color{blue}{\frac{x \cdot x - 0.5 \cdot 0.5}{x + 0.5}} \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. metadata-eval79.5%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{0.25}}{x + 0.5} \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} \]
      3. metadata-eval79.5%

        \[\leadsto \left(\left(\frac{x \cdot x - \color{blue}{-0.5 \cdot -0.5}}{x + 0.5} \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} \]
      4. associate-*l/79.4%

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

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

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

        \[\leadsto \left(\left(\frac{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \log x}{x + 0.5} - 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-rr79.4%

      \[\leadsto \left(\left(\color{blue}{\frac{\mathsf{fma}\left(x, x, -0.25\right) \cdot \log x}{x + 0.5}} - 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 0 67.1%

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

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

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

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

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

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

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

Alternative 13: 35.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0055:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\

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


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

    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
    3. Taylor expanded in z around 0 44.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
    12. Step-by-step derivation
      1. clear-num44.4%

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

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

      \[\leadsto \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
    14. Step-by-step derivation
      1. unpow-144.4%

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

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

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

    if 0.0054999999999999997 < x

    1. Initial program 90.4%

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

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

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

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

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

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

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

        \[\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} \]
      6. +-commutative89.0%

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

      \[\leadsto \color{blue}{x \cdot \left(-1 + \log x\right)} + \frac{0.083333333333333}{x} \]
    7. Step-by-step derivation
      1. *-un-lft-identity67.0%

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

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

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

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

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

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

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\sqrt{\left(-\log x\right) \cdot \color{blue}{\left(-\log x\right)}}}\right) \]
      8. sqr-neg25.7%

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\sqrt{\color{blue}{\log x \cdot \log x}}}\right) \]
      9. sqrt-unprod25.7%

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\color{blue}{\sqrt{\log x} \cdot \sqrt{\log x}}}\right) \]
      10. add-sqr-sqrt25.7%

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\color{blue}{\log x}}\right) \]
      11. add-exp-log25.7%

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot \color{blue}{x}\right) \]
    8. Applied egg-rr25.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.0055:\\ \;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\log x - 0.916666666666667\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 26.5% accurate, 12.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.85 \cdot 10^{-8}:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\

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


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

    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
    3. Taylor expanded in z around 0 43.5%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
    5. Applied egg-rr43.5%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
    14. Step-by-step derivation
      1. unpow-143.5%

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

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

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

    if 1.85e-8 < x

    1. Initial program 90.6%

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
    5. Applied egg-rr68.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
    12. Step-by-step derivation
      1. *-un-lft-identity66.7%

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

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

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

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

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

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\sqrt{\color{blue}{\left(-\log x\right)} \cdot \log \left(\frac{1}{x}\right)}}\right) \]
      7. log-rec25.9%

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\sqrt{\left(-\log x\right) \cdot \color{blue}{\left(-\log x\right)}}}\right) \]
      8. sqr-neg25.9%

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\sqrt{\color{blue}{\log x \cdot \log x}}}\right) \]
      9. sqrt-unprod25.3%

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\color{blue}{\sqrt{\log x} \cdot \sqrt{\log x}}}\right) \]
      10. add-sqr-sqrt25.3%

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\color{blue}{\log x}}\right) \]
      11. add-exp-log25.3%

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot \color{blue}{x}\right) \]
    13. Applied egg-rr10.0%

      \[\leadsto \color{blue}{1 \cdot \left(0.083333333333333 \cdot x\right)} \]
    14. Step-by-step derivation
      1. *-lft-identity25.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.85 \cdot 10^{-8}:\\ \;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot 0.083333333333333\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 26.5% accurate, 15.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.85 \cdot 10^{-8}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\

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


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

    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
    3. Taylor expanded in z around 0 43.5%

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
    5. Applied egg-rr43.5%

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

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

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

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

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

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

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

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

    if 1.85e-8 < x

    1. Initial program 90.6%

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

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

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

        \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
    5. Applied egg-rr68.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
    12. Step-by-step derivation
      1. *-un-lft-identity66.7%

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

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

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

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

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

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\sqrt{\color{blue}{\left(-\log x\right)} \cdot \log \left(\frac{1}{x}\right)}}\right) \]
      7. log-rec25.9%

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\sqrt{\left(-\log x\right) \cdot \color{blue}{\left(-\log x\right)}}}\right) \]
      8. sqr-neg25.9%

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\sqrt{\color{blue}{\log x \cdot \log x}}}\right) \]
      9. sqrt-unprod25.3%

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\color{blue}{\sqrt{\log x} \cdot \sqrt{\log x}}}\right) \]
      10. add-sqr-sqrt25.3%

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\color{blue}{\log x}}\right) \]
      11. add-exp-log25.3%

        \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot \color{blue}{x}\right) \]
    13. Applied egg-rr10.0%

      \[\leadsto \color{blue}{1 \cdot \left(0.083333333333333 \cdot x\right)} \]
    14. Step-by-step derivation
      1. *-lft-identity25.3%

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

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

      \[\leadsto \color{blue}{x \cdot 0.083333333333333} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 16: 6.6% accurate, 41.0× speedup?

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

\\
x \cdot 0.083333333333333
\end{array}
Derivation
  1. Initial program 94.8%

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

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

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

      \[\leadsto \left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \color{blue}{{\left(\frac{x}{0.083333333333333}\right)}^{-1}} \]
  5. Applied egg-rr56.9%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
  12. Step-by-step derivation
    1. *-un-lft-identity55.5%

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

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

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

      \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\color{blue}{\sqrt{\log \left(\frac{1}{x}\right)} \cdot \sqrt{\log \left(\frac{1}{x}\right)}}}\right) \]
    5. sqrt-unprod32.5%

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

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

      \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\sqrt{\left(-\log x\right) \cdot \color{blue}{\left(-\log x\right)}}}\right) \]
    8. sqr-neg32.5%

      \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\sqrt{\color{blue}{\log x \cdot \log x}}}\right) \]
    9. sqrt-unprod13.3%

      \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\color{blue}{\sqrt{\log x} \cdot \sqrt{\log x}}}\right) \]
    10. add-sqr-sqrt14.1%

      \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot e^{\color{blue}{\log x}}\right) \]
    11. add-exp-log14.1%

      \[\leadsto x \cdot \left(-1 + \log x\right) + 1 \cdot \left(0.083333333333333 \cdot \color{blue}{x}\right) \]
  13. Applied egg-rr6.6%

    \[\leadsto \color{blue}{1 \cdot \left(0.083333333333333 \cdot x\right)} \]
  14. Step-by-step derivation
    1. *-lft-identity14.1%

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

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

    \[\leadsto \color{blue}{x \cdot 0.083333333333333} \]
  16. Add Preprocessing

Developer target: 98.6% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024107 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
  :precision binary64

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

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