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

Percentage Accurate: 94.0% → 99.4%
Time: 15.6s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 94.0% 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.9× speedup?

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

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

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


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

    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. flip--99.6%

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

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

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

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

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

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

        \[\leadsto \left(\left(\frac{1}{\frac{x + 0.5}{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\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} \]
    4. Applied egg-rr99.6%

      \[\leadsto \left(\left(\color{blue}{\frac{1}{\frac{x + 0.5}{\mathsf{fma}\left(x, x, -0.25\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} \]
    5. Step-by-step derivation
      1. associate-*l/99.6%

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000002e54 < x

    1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 96.8% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 98.7%

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

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

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

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

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

        \[\leadsto \left(\left(\frac{1}{\frac{x + 0.5}{\color{blue}{\mathsf{fma}\left(x, x, --0.5 \cdot -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} \]
      6. metadata-eval96.2%

        \[\leadsto \left(\left(\frac{1}{\frac{x + 0.5}{\mathsf{fma}\left(x, x, -\color{blue}{0.25}\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} \]
      7. metadata-eval96.2%

        \[\leadsto \left(\left(\frac{1}{\frac{x + 0.5}{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\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} \]
    4. Applied egg-rr96.2%

      \[\leadsto \left(\left(\color{blue}{\frac{1}{\frac{x + 0.5}{\mathsf{fma}\left(x, x, -0.25\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} \]
    5. Step-by-step derivation
      1. associate-*l/96.2%

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

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

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

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

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

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

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

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

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

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

    if 2.5500000000000001e163 < x

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 98.5% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 92.4% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3200 or 1.0600000000000001e35 < y

    1. Initial program 95.4%

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

      \[\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-neg94.6%

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

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

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

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

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

      \[\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. Taylor expanded in y around inf 94.6%

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

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

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

    if -3200 < y < 1.0600000000000001e35

    1. Initial program 93.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 x around inf 92.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \left(\log x + -1\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 simplification93.1%

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

Alternative 5: 98.5% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 83.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -18000000000000 \lor \neg \left(z \leq 8.2 \cdot 10^{+39}\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.8e13 or 8.20000000000000008e39 < z

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8e13 < z < 8.20000000000000008e39

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 93.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\frac{1}{\frac{x + 0.5}{\color{blue}{\mathsf{fma}\left(x, x, --0.5 \cdot -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} \]
    6. metadata-eval74.2%

      \[\leadsto \left(\left(\frac{1}{\frac{x + 0.5}{\mathsf{fma}\left(x, x, -\color{blue}{0.25}\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} \]
    7. metadata-eval74.2%

      \[\leadsto \left(\left(\frac{1}{\frac{x + 0.5}{\mathsf{fma}\left(x, x, \color{blue}{-0.25}\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} \]
  4. Applied egg-rr74.2%

    \[\leadsto \left(\left(\color{blue}{\frac{1}{\frac{x + 0.5}{\mathsf{fma}\left(x, x, -0.25\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} \]
  5. Step-by-step derivation
    1. associate-*l/74.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 83.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+14} \lor \neg \left(z \leq 4.8 \cdot 10^{+39}\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e14 or 4.8000000000000002e39 < z

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4e14 < z < 4.8000000000000002e39

    1. Initial program 99.4%

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

      \[\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 simplification85.6%

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

Alternative 9: 82.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7500000000000 \lor \neg \left(z \leq 4.8 \cdot 10^{+39}\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.5e12 or 4.8000000000000002e39 < z

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.5e12 < z < 4.8000000000000002e39

    1. Initial program 99.4%

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

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

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

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

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

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

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

      \[\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. Taylor expanded in z around 0 89.2%

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

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

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

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

Alternative 10: 94.0% accurate, 1.0× speedup?

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

\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)
\end{array}
Derivation
  1. Initial program 94.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. Final simplification94.6%

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

Alternative 11: 82.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+17} \lor \neg \left(z \leq 2.2 \cdot 10^{+40}\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4e17 or 2.1999999999999999e40 < z

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4e17 < z < 2.1999999999999999e40

    1. Initial program 99.4%

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

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

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

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

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

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

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

      \[\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. Taylor expanded in z around 0 89.0%

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

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

Alternative 12: 93.0% accurate, 1.0× speedup?

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

\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x} + x \cdot \left(\log x + -1\right)
\end{array}
Derivation
  1. Initial program 94.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 93.4%

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

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

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

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

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

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

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

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

Alternative 13: 72.8% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 4.00000000000000015e-25

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000015e-25 < x < 2.05e79

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.05e79 < x

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 60.6% accurate, 5.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-5} \lor \neg \left(z \leq 5.3 \cdot 10^{-46}\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{0.0007936500793651 + y}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3499999999999999e-5 or 5.30000000000000018e-46 < z

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3499999999999999e-5 < z < 5.30000000000000018e-46

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 41.8% accurate, 13.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 29.3% accurate, 17.6× speedup?

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

\\
\frac{y}{x} \cdot \left(z \cdot z\right)
\end{array}
Derivation
  1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(z \cdot z\right) \cdot \color{blue}{\frac{y}{x}} \]
  11. Final simplification32.3%

    \[\leadsto \frac{y}{x} \cdot \left(z \cdot z\right) \]
  12. Add Preprocessing

Developer Target 1: 98.5% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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