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

Percentage Accurate: 94.3% → 99.5%
Time: 16.8s
Alternatives: 13
Speedup: 1.1×

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 13 alternatives:

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

Initial Program: 94.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

    if 5.30000000000000009e35 < x

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 84.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t_0 \leq 5 \cdot 10^{+88}:\\
\;\;\;\;x \cdot \left(\log x + -1\right) + \frac{0.083333333333333}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < -9.99999999999999981e149

    1. Initial program 85.7%

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

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow285.6%

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

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

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

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

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

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

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

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

        \[\leadsto \left(-x\right) + \color{blue}{\frac{y}{\frac{x}{{z}^{2}}}} \]
      2. unpow285.0%

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

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

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

    if -9.99999999999999981e149 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 4.99999999999999997e88

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999997e88 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z)

    1. Initial program 92.9%

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

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow292.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{\color{blue}{0.0007936500793651}}{x}\right)\right) \]
    12. Simplified82.7%

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

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

Alternative 3: 99.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

    if 1.55e7 < 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. Step-by-step derivation
      1. associate-+l-90.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 98.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow299.7%

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

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

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

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

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

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

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

    if 0.035000000000000003 < x

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 97.5% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

    if 1.00000000000000004e36 < x

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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. *-commutative89.4%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-udef89.4%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-neg89.4%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-eval89.4%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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}} \]
    5. Applied egg-rr89.4%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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}}} \]
    6. Step-by-step derivation
      1. associate-*l/89.4%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-identity89.4%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-def89.4%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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. *-commutative89.4%

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

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

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

      \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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}}} \]
    8. Taylor expanded in z around inf 89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 97.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \left(y + 0.0007936500793651\right) \cdot z\\
\mathbf{if}\;x \leq 0.031:\\
\;\;\;\;\frac{z \cdot \left(t_0 - 0.0027777777777778\right) + 0.083333333333333}{x} - x\\

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


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

    1. Initial program 99.7%

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

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow299.7%

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

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

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

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

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

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

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

    if 0.031 < x

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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. *-commutative90.8%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-udef90.8%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-neg90.8%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-eval90.8%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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}} \]
    5. Applied egg-rr90.8%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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}}} \]
    6. Step-by-step derivation
      1. associate-*l/90.8%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-identity90.8%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-def90.8%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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. *-commutative90.8%

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

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

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

      \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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}}} \]
    8. Taylor expanded in z around inf 90.6%

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

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

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

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

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

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

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

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

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

Alternative 7: 97.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_0 := \left(y + 0.0007936500793651\right) \cdot z\\
\mathbf{if}\;x \leq 1.12:\\
\;\;\;\;\frac{z \cdot \left(t_0 - 0.0027777777777778\right) + 0.083333333333333}{x} - x\\

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


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

    1. Initial program 99.7%

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

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow299.7%

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

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

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

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

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

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

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

    if 1.1200000000000001 < x

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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. *-commutative90.8%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-udef90.8%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-neg90.8%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-eval90.8%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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}} \]
    5. Applied egg-rr90.8%

      \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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}}} \]
    6. Step-by-step derivation
      1. associate-*l/90.8%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-identity90.8%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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-def90.8%

        \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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. *-commutative90.8%

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

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

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

      \[\leadsto \left(\left(x + -0.5\right) \cdot \log x - \left(x + -0.91893853320467\right)\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}}} \]
    8. Taylor expanded in z around inf 90.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 89.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.2 \cdot 10^{+39}:\\
\;\;\;\;x + \frac{\mathsf{fma}\left(z, \left(y + 0.0007936500793651\right) \cdot z, 0.083333333333333\right)}{x}\\

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


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

    1. Initial program 99.7%

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

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow299.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-x\right) + \frac{\left(z \cdot z\right) \cdot \left(y + 0.0007936500793651\right) + 0.083333333333333}{x}\right)\right)} \]
      2. expm1-udef72.9%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(-x\right) + \frac{\left(z \cdot z\right) \cdot \left(y + 0.0007936500793651\right) + 0.083333333333333}{x}\right)} - 1} \]
      3. add-sqr-sqrt0.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{-x} \cdot \sqrt{-x}} + \frac{\left(z \cdot z\right) \cdot \left(y + 0.0007936500793651\right) + 0.083333333333333}{x}\right)} - 1 \]
      4. sqrt-unprod73.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} + \frac{\left(z \cdot z\right) \cdot \left(y + 0.0007936500793651\right) + 0.083333333333333}{x}\right)} - 1 \]
      5. sqr-neg73.6%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{x \cdot x}} + \frac{\left(z \cdot z\right) \cdot \left(y + 0.0007936500793651\right) + 0.083333333333333}{x}\right)} - 1 \]
      6. sqrt-unprod73.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x} \cdot \sqrt{x}} + \frac{\left(z \cdot z\right) \cdot \left(y + 0.0007936500793651\right) + 0.083333333333333}{x}\right)} - 1 \]
      7. add-sqr-sqrt73.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{x} + \frac{\left(z \cdot z\right) \cdot \left(y + 0.0007936500793651\right) + 0.083333333333333}{x}\right)} - 1 \]
      8. associate-*l*73.6%

        \[\leadsto e^{\mathsf{log1p}\left(x + \frac{\color{blue}{z \cdot \left(z \cdot \left(y + 0.0007936500793651\right)\right)} + 0.083333333333333}{x}\right)} - 1 \]
      9. fma-def73.6%

        \[\leadsto e^{\mathsf{log1p}\left(x + \frac{\color{blue}{\mathsf{fma}\left(z, z \cdot \left(y + 0.0007936500793651\right), 0.083333333333333\right)}}{x}\right)} - 1 \]
    11. Applied egg-rr73.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x + \frac{\mathsf{fma}\left(z, z \cdot \left(y + 0.0007936500793651\right), 0.083333333333333\right)}{x}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def73.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x + \frac{\mathsf{fma}\left(z, z \cdot \left(y + 0.0007936500793651\right), 0.083333333333333\right)}{x}\right)\right)} \]
      2. expm1-log1p93.3%

        \[\leadsto \color{blue}{x + \frac{\mathsf{fma}\left(z, z \cdot \left(y + 0.0007936500793651\right), 0.083333333333333\right)}{x}} \]
    13. Simplified93.3%

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

    if 1.2e39 < x

    1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 66.4% accurate, 4.0× speedup?

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

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

\mathbf{elif}\;t_0 \leq 2 \cdot 10^{+40}:\\
\;\;\;\;x + \frac{0.083333333333333}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < -2e4

    1. Initial program 87.2%

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

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow287.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-x\right) + \frac{y}{\color{blue}{\frac{\frac{x}{z}}{z}}} \]
    9. Simplified82.3%

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

    if -2e4 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z) < 2.00000000000000006e40

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

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow299.1%

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

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

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

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

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

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

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

      \[\leadsto \left(-x\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    8. Step-by-step derivation
      1. expm1-log1p-u38.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-x\right) + \frac{0.083333333333333}{x}\right)\right)} \]
      2. expm1-udef38.5%

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{-x} \cdot \sqrt{-x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      4. sqrt-unprod45.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      5. sqr-neg45.0%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{x \cdot x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      6. sqrt-unprod46.2%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x} \cdot \sqrt{x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      7. add-sqr-sqrt46.2%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{x} + \frac{0.083333333333333}{x}\right)} - 1 \]
    9. Applied egg-rr46.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x + \frac{0.083333333333333}{x}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def46.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x + \frac{0.083333333333333}{x}\right)\right)} \]
      2. expm1-log1p49.6%

        \[\leadsto \color{blue}{x + \frac{0.083333333333333}{x}} \]
    11. Simplified49.6%

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

    if 2.00000000000000006e40 < (*.f64 (-.f64 (*.f64 (+.f64 y 7936500793651/10000000000000000) z) 13888888888889/5000000000000000) z)

    1. Initial program 93.4%

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

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow293.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \left(z \cdot \left(\frac{y}{x} + \frac{\color{blue}{0.0007936500793651}}{x}\right)\right) \]
    12. Simplified79.3%

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

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

Alternative 10: 51.3% accurate, 9.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.2000000000000002e-46 or 2.2e-54 < z

    1. Initial program 92.3%

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

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow292.2%

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

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

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

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

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

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

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

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

        \[\leadsto \left(-x\right) + \color{blue}{\frac{y}{\frac{x}{{z}^{2}}}} \]
      2. unpow248.7%

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

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

    if -6.2000000000000002e-46 < z < 2.2e-54

    1. Initial program 99.4%

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

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow299.1%

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

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

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

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

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

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

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

      \[\leadsto \left(-x\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    8. Step-by-step derivation
      1. expm1-log1p-u38.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-x\right) + \frac{0.083333333333333}{x}\right)\right)} \]
      2. expm1-udef38.2%

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{-x} \cdot \sqrt{-x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      4. sqrt-unprod44.1%

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x} \cdot \sqrt{x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      7. add-sqr-sqrt45.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{x} + \frac{0.083333333333333}{x}\right)} - 1 \]
    9. Applied egg-rr45.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x + \frac{0.083333333333333}{x}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def45.9%

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

        \[\leadsto \color{blue}{x + \frac{0.083333333333333}{x}} \]
    11. Simplified49.4%

      \[\leadsto \color{blue}{x + \frac{0.083333333333333}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification49.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{-46} \lor \neg \left(z \leq 2.2 \cdot 10^{-54}\right):\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{0.083333333333333}{x}\\ \end{array} \]

Alternative 11: 51.3% accurate, 9.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{-42}:\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-55}:\\ \;\;\;\;x + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{\frac{x}{z}}{z}} - x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -2e-42)
   (- (/ y (/ x (* z z))) x)
   (if (<= z 5e-55) (+ x (/ 0.083333333333333 x)) (- (/ y (/ (/ x z) z)) x))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -2e-42) {
		tmp = (y / (x / (z * z))) - x;
	} else if (z <= 5e-55) {
		tmp = x + (0.083333333333333 / x);
	} else {
		tmp = (y / ((x / z) / z)) - x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (z <= (-2d-42)) then
        tmp = (y / (x / (z * z))) - x
    else if (z <= 5d-55) then
        tmp = x + (0.083333333333333d0 / x)
    else
        tmp = (y / ((x / z) / z)) - x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -2e-42) {
		tmp = (y / (x / (z * z))) - x;
	} else if (z <= 5e-55) {
		tmp = x + (0.083333333333333 / x);
	} else {
		tmp = (y / ((x / z) / z)) - x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -2e-42:
		tmp = (y / (x / (z * z))) - x
	elif z <= 5e-55:
		tmp = x + (0.083333333333333 / x)
	else:
		tmp = (y / ((x / z) / z)) - x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -2e-42)
		tmp = Float64(Float64(y / Float64(x / Float64(z * z))) - x);
	elseif (z <= 5e-55)
		tmp = Float64(x + Float64(0.083333333333333 / x));
	else
		tmp = Float64(Float64(y / Float64(Float64(x / z) / z)) - x);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -2e-42)
		tmp = (y / (x / (z * z))) - x;
	elseif (z <= 5e-55)
		tmp = x + (0.083333333333333 / x);
	else
		tmp = (y / ((x / z) / z)) - x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -2e-42], N[(N[(y / N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[z, 5e-55], N[(x + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 5 \cdot 10^{-55}:\\
\;\;\;\;x + \frac{0.083333333333333}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{\frac{x}{z}}{z}} - x\\


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

    1. Initial program 93.1%

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

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow293.0%

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

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

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

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

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

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

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

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

        \[\leadsto \left(-x\right) + \color{blue}{\frac{y}{\frac{x}{{z}^{2}}}} \]
      2. unpow250.8%

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

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

    if -2.00000000000000008e-42 < z < 5.0000000000000002e-55

    1. Initial program 99.4%

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

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow299.1%

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

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

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

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

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

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

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

      \[\leadsto \left(-x\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
    8. Step-by-step derivation
      1. expm1-log1p-u38.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-x\right) + \frac{0.083333333333333}{x}\right)\right)} \]
      2. expm1-udef38.2%

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{-x} \cdot \sqrt{-x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      4. sqrt-unprod44.1%

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x} \cdot \sqrt{x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
      7. add-sqr-sqrt45.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{x} + \frac{0.083333333333333}{x}\right)} - 1 \]
    9. Applied egg-rr45.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x + \frac{0.083333333333333}{x}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def45.9%

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

        \[\leadsto \color{blue}{x + \frac{0.083333333333333}{x}} \]
    11. Simplified49.4%

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

    if 5.0000000000000002e-55 < z

    1. Initial program 91.5%

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

        \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow291.4%

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

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

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

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

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

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

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

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

        \[\leadsto \left(-x\right) + \color{blue}{\frac{y}{\frac{x}{{z}^{2}}}} \]
      2. unpow246.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{-42}:\\ \;\;\;\;\frac{y}{\frac{x}{z \cdot z}} - x\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-55}:\\ \;\;\;\;x + \frac{0.083333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{\frac{x}{z}}{z}} - x\\ \end{array} \]

Alternative 12: 28.2% accurate, 24.6× speedup?

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

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

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

      \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow294.8%

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

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

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

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

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

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

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

    \[\leadsto \left(-x\right) + \color{blue}{\frac{0.083333333333333}{x}} \]
  8. Step-by-step derivation
    1. expm1-log1p-u16.9%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-x\right) + \frac{0.083333333333333}{x}\right)\right)} \]
    2. expm1-udef16.9%

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

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{-x} \cdot \sqrt{-x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
    4. sqrt-unprod23.0%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} + \frac{0.083333333333333}{x}\right)} - 1 \]
    5. sqr-neg23.0%

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

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x} \cdot \sqrt{x}} + \frac{0.083333333333333}{x}\right)} - 1 \]
    7. add-sqr-sqrt22.5%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{x} + \frac{0.083333333333333}{x}\right)} - 1 \]
  9. Applied egg-rr22.5%

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x + \frac{0.083333333333333}{x}\right)} - 1} \]
  10. Step-by-step derivation
    1. expm1-def22.5%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x + \frac{0.083333333333333}{x}\right)\right)} \]
    2. expm1-log1p23.9%

      \[\leadsto \color{blue}{x + \frac{0.083333333333333}{x}} \]
  11. Simplified23.9%

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

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

Alternative 13: 1.3% accurate, 61.5× speedup?

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

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

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

      \[\leadsto \left(\left(\color{blue}{\sqrt{\left(x - 0.5\right) \cdot \log x} \cdot \sqrt{\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. pow294.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto -x \]

Developer target: 98.7% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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