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

Percentage Accurate: 93.9% → 99.4%
Time: 20.9s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 93.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.4% accurate, 0.2× speedup?

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

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

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


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

    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. Add Preprocessing
    3. 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. flip3--99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3500000000000001e46 < 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. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.5% accurate, 0.4× speedup?

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

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

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


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

    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. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg99.7%

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

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

        \[\leadsto \left(\left(x - 0.5\right) \cdot \log x + \color{blue}{\left(0.91893853320467 + \left(-x\right)\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(0.91893853320467 - x\right)}\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      5. associate-+r-99.7%

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

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

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

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

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

    if 1e8 < x

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 99.5% accurate, 1.0× speedup?

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

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

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


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

    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. Add Preprocessing

    if 2.50000000000000003e42 < 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. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg89.4%

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

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

        \[\leadsto \left(\left(x - 0.5\right) \cdot \log x + \color{blue}{\left(0.91893853320467 + \left(-x\right)\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(0.91893853320467 - x\right)}\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      5. associate-+r-89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 99.5% accurate, 1.0× speedup?

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

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

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


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

    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. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg99.7%

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

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

        \[\leadsto \left(\left(x - 0.5\right) \cdot \log x + \color{blue}{\left(0.91893853320467 + \left(-x\right)\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(0.91893853320467 - x\right)}\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      5. associate-+r-99.7%

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

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

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

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

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

    if 2.2000000000000001e42 < 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. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg89.4%

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

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

        \[\leadsto \left(\left(x - 0.5\right) \cdot \log x + \color{blue}{\left(0.91893853320467 + \left(-x\right)\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(0.91893853320467 - x\right)}\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      5. associate-+r-89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 98.9% accurate, 1.0× speedup?

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

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

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


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

    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. Add Preprocessing
    3. 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. add-sqr-sqrt99.7%

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}, \sqrt{\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} \]
      5. metadata-eval99.7%

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      8. metadata-eval99.7%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      9. *-commutative99.7%

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
      11. metadata-eval99.7%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
    4. Applied egg-rr99.7%

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    6. Step-by-step derivation
      1. neg-mul-198.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. Simplified98.8%

      \[\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.029999999999999999 < x

    1. Initial program 90.6%

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

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

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

        \[\leadsto \left(\left(x - 0.5\right) \cdot \log x + \color{blue}{\left(0.91893853320467 + \left(-x\right)\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(0.91893853320467 - x\right)}\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
      5. associate-+r-90.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 93.2% accurate, 1.0× speedup?

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

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

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


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

    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. Add Preprocessing
    3. 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. add-sqr-sqrt99.7%

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}, \sqrt{\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} \]
      5. metadata-eval99.7%

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      8. metadata-eval99.7%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      9. *-commutative99.7%

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
      11. metadata-eval99.7%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
    4. Applied egg-rr99.7%

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    6. Step-by-step derivation
      1. neg-mul-198.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. Simplified98.8%

      \[\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.450000000000000011 < x

    1. Initial program 90.6%

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

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

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

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

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

        \[\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)} \]
      3. associate-*r*84.7%

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

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

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

Alternative 7: 92.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

    \[\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} \]
  6. Final simplification94.3%

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

Alternative 8: 83.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-+l-99.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. add-sqr-sqrt99.8%

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}, \sqrt{\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} \]
      5. metadata-eval99.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}, \sqrt{\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} \]
      6. *-commutative99.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\color{blue}{\log x \cdot \left(x + -0.5\right)}}, \sqrt{\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} \]
      7. sub-neg99.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      8. metadata-eval99.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      9. *-commutative99.8%

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
      11. metadata-eval99.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
    4. Applied egg-rr99.8%

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    6. Step-by-step derivation
      1. neg-mul-199.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. Simplified99.8%

      \[\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.94999999999999989e-16 < x

    1. Initial program 90.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. Add Preprocessing
    3. Taylor expanded in z around 0 78.3%

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

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

Alternative 9: 83.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-+l-99.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. add-sqr-sqrt99.8%

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}, \sqrt{\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} \]
      5. metadata-eval99.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}, \sqrt{\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} \]
      6. *-commutative99.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\color{blue}{\log x \cdot \left(x + -0.5\right)}}, \sqrt{\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} \]
      7. sub-neg99.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      8. metadata-eval99.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      9. *-commutative99.8%

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
      11. metadata-eval99.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
    4. Applied egg-rr99.8%

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    6. Step-by-step derivation
      1. neg-mul-199.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. Simplified99.8%

      \[\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.94999999999999989e-16 < x

    1. Initial program 90.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. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg90.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 84.2% accurate, 1.1× speedup?

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

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

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


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

    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. Add Preprocessing
    3. 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. add-sqr-sqrt99.0%

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}, \sqrt{\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} \]
      5. metadata-eval99.0%

        \[\leadsto \mathsf{fma}\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}, \sqrt{\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} \]
      6. *-commutative99.0%

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      8. metadata-eval99.0%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      9. *-commutative99.0%

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
      11. metadata-eval99.0%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
    4. Applied egg-rr99.0%

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    6. Step-by-step derivation
      1. neg-mul-196.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. Simplified96.7%

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

    if 2.8e13 < x

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 60.7% accurate, 5.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+31} \lor \neg \left(y \leq 6.4 \cdot 10^{-35}\right):\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x} - x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.40000000000000008e31 or 6.3999999999999996e-35 < y

    1. Initial program 95.5%

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

        \[\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. add-sqr-sqrt94.4%

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}, \sqrt{\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} \]
      5. metadata-eval94.4%

        \[\leadsto \mathsf{fma}\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}, \sqrt{\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} \]
      6. *-commutative94.4%

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      8. metadata-eval94.4%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      9. *-commutative94.4%

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
      11. metadata-eval94.4%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
    4. Applied egg-rr94.4%

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    6. Step-by-step derivation
      1. neg-mul-161.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. Simplified61.4%

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

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

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

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

    if -1.40000000000000008e31 < y < 6.3999999999999996e-35

    1. Initial program 95.8%

      \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-+l-95.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. add-sqr-sqrt95.6%

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}, \sqrt{\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} \]
      5. metadata-eval95.7%

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      8. metadata-eval95.7%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      9. *-commutative95.7%

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
      11. metadata-eval95.7%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
    4. Applied egg-rr95.7%

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    6. Step-by-step derivation
      1. neg-mul-165.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. Simplified65.0%

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

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

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

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

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

Alternative 12: 47.3% accurate, 6.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+31}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x} - x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.40000000000000008e31

    1. Initial program 92.0%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}, \sqrt{\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} \]
      5. metadata-eval91.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}, \sqrt{\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} \]
      6. *-commutative91.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\color{blue}{\log x \cdot \left(x + -0.5\right)}}, \sqrt{\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} \]
      7. sub-neg91.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      8. metadata-eval91.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      9. *-commutative91.8%

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
      11. metadata-eval91.8%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
    4. Applied egg-rr91.8%

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

      \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
    6. Step-by-step derivation
      1. neg-mul-157.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. Simplified57.3%

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

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

    if -1.40000000000000008e31 < y

    1. Initial program 96.5%

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

        \[\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. add-sqr-sqrt95.9%

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}, \sqrt{\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} \]
      5. metadata-eval96.0%

        \[\leadsto \mathsf{fma}\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}, \sqrt{\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} \]
      6. *-commutative96.0%

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      8. metadata-eval96.0%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
      9. *-commutative96.0%

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

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
      11. metadata-eval96.0%

        \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
    4. Applied egg-rr96.0%

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

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

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

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

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

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

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

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

Alternative 13: 61.9% accurate, 8.2× speedup?

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

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

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-+l-95.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. add-sqr-sqrt95.1%

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

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

      \[\leadsto \mathsf{fma}\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}, \sqrt{\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} \]
    5. metadata-eval95.1%

      \[\leadsto \mathsf{fma}\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}, \sqrt{\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} \]
    6. *-commutative95.1%

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

      \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
    8. metadata-eval95.1%

      \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
    9. *-commutative95.1%

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

      \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
    11. metadata-eval95.1%

      \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
  4. Applied egg-rr95.1%

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

    \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  6. Step-by-step derivation
    1. neg-mul-163.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. Simplified63.4%

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

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

Alternative 14: 28.3% accurate, 13.7× speedup?

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

\\
\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x} - x
\end{array}
Derivation
  1. Initial program 95.6%

    \[\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-+l-95.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. add-sqr-sqrt95.1%

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

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

      \[\leadsto \mathsf{fma}\left(\sqrt{\color{blue}{\left(x + \left(-0.5\right)\right)} \cdot \log x}, \sqrt{\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} \]
    5. metadata-eval95.1%

      \[\leadsto \mathsf{fma}\left(\sqrt{\left(x + \color{blue}{-0.5}\right) \cdot \log x}, \sqrt{\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} \]
    6. *-commutative95.1%

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

      \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
    8. metadata-eval95.1%

      \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\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} \]
    9. *-commutative95.1%

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

      \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
    11. metadata-eval95.1%

      \[\leadsto \mathsf{fma}\left(\sqrt{\log x \cdot \left(x + -0.5\right)}, \sqrt{\log x \cdot \left(x + -0.5\right)}, -\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} \]
  4. Applied egg-rr95.1%

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

    \[\leadsto \color{blue}{-1 \cdot x} + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \]
  6. Step-by-step derivation
    1. neg-mul-163.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. Simplified63.4%

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

    \[\leadsto \left(-x\right) + \frac{\color{blue}{-0.0027777777777778 \cdot z} + 0.083333333333333}{x} \]
  9. Final simplification31.5%

    \[\leadsto \frac{0.083333333333333 + z \cdot -0.0027777777777778}{x} - x \]
  10. Add Preprocessing

Alternative 15: 23.6% accurate, 41.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
  6. Final simplification26.6%

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

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 2024019 
(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)))