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

Percentage Accurate: 94.1% → 99.6%
Time: 14.7s
Alternatives: 20
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 20 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.1% 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.6% accurate, 0.9× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e16 < x

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 \cdot z}{x}\right)} - 0.0027777777777778 \cdot \frac{1}{x}\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x \]
    7. Step-by-step derivation
      1. associate-*r/95.6%

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

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

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

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

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

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

Alternative 2: 90.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 4.5 \cdot 10^{+243}:\\
\;\;\;\;\left(0.91893853320467 + t\_0\right) + \frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x}\\

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


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

    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. sub-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2700 < x < 4.5e243

    1. Initial program 89.5%

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

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

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

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

        \[\leadsto \left(\left(\color{blue}{\left(\left(x \cdot x - -0.5 \cdot -0.5\right) \cdot \frac{1}{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} \]
      5. fma-neg59.1%

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

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

        \[\leadsto \left(\left(\left(\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \frac{1}{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} \]
    4. Applied egg-rr59.1%

      \[\leadsto \left(\left(\color{blue}{\left(\mathsf{fma}\left(x, x, -0.25\right) \cdot \frac{1}{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} \]
    5. Taylor expanded in x around inf 87.3%

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

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

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

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

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

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

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

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

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

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

    if 4.5e243 < x

    1. Initial program 66.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. sub-neg66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 88.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 5.1 \cdot 10^{+238}:\\
\;\;\;\;\left(0.91893853320467 + t\_0\right) + \frac{0.083333333333333 + z \cdot \left(0.0007936500793651 \cdot z - 0.0027777777777778\right)}{x}\\

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


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

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2999999999999998e35 < x < 5.1000000000000002e238

    1. Initial program 89.7%

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

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

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

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

        \[\leadsto \left(\left(\color{blue}{\left(\left(x \cdot x - -0.5 \cdot -0.5\right) \cdot \frac{1}{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} \]
      5. fma-neg55.0%

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

        \[\leadsto \left(\left(\left(\mathsf{fma}\left(x, x, -\color{blue}{0.25}\right) \cdot \frac{1}{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} \]
      7. metadata-eval55.0%

        \[\leadsto \left(\left(\left(\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \frac{1}{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} \]
    4. Applied egg-rr55.0%

      \[\leadsto \left(\left(\color{blue}{\left(\mathsf{fma}\left(x, x, -0.25\right) \cdot \frac{1}{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} \]
    5. Taylor expanded in x around inf 89.8%

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

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

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

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

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

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

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

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

    if 5.1000000000000002e238 < x

    1. Initial program 66.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. sub-neg66.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 99.6% accurate, 1.0× speedup?

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e15 < x

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(\left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right) \cdot z + \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 5 \cdot 10^{+15}:\\ \;\;\;\;\left(\log x \cdot \left(x + -0.5\right) + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right) + x \cdot \log x\right)\right)\right) - x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 99.6% accurate, 1.0× speedup?

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

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


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

    1. Initial program 99.7%

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

    if 5e15 < x

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(\left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right) \cdot z + \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 5 \cdot 10^{+15}:\\ \;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x} + \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\frac{z}{x} \cdot \left(y + 0.0007936500793651\right)\right) + x \cdot \log x\right)\right)\right) - x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 98.6% accurate, 1.0× speedup?

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

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


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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\color{blue}{\left(\mathsf{fma}\left(x, x, -0.25\right) \cdot \frac{1}{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} \]
    5. Taylor expanded in x around inf 97.2%

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

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

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

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

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

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

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

    if 1e16 < x

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 94.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 98.2%

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

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

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

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

        \[\leadsto \left(\left(\color{blue}{\left(\left(x \cdot x - -0.5 \cdot -0.5\right) \cdot \frac{1}{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} \]
      5. fma-neg94.7%

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

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

        \[\leadsto \left(\left(\left(\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \frac{1}{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} \]
    4. Applied egg-rr94.7%

      \[\leadsto \left(\left(\color{blue}{\left(\mathsf{fma}\left(x, x, -0.25\right) \cdot \frac{1}{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} \]
    5. Taylor expanded in x around inf 96.4%

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

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

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

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

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

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

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

    if 1.04e170 < x

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 93.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 95.5%

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

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

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

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

        \[\leadsto \left(\left(\color{blue}{\left(\left(x \cdot x - -0.5 \cdot -0.5\right) \cdot \frac{1}{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} \]
      5. fma-neg83.0%

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

        \[\leadsto \left(\left(\left(\mathsf{fma}\left(x, x, -\color{blue}{0.25}\right) \cdot \frac{1}{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} \]
      7. metadata-eval83.0%

        \[\leadsto \left(\left(\left(\mathsf{fma}\left(x, x, \color{blue}{-0.25}\right) \cdot \frac{1}{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} \]
    4. Applied egg-rr83.0%

      \[\leadsto \left(\left(\color{blue}{\left(\mathsf{fma}\left(x, x, -0.25\right) \cdot \frac{1}{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} \]
    5. Taylor expanded in x around inf 94.0%

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

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

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

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

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

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

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

    if 4.40000000000000018e243 < x

    1. Initial program 66.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. sub-neg66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 83.4% accurate, 1.0× speedup?

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

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

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


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

    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. sub-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 400 < x

    1. Initial program 83.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. sub-neg83.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 83.7% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.9999999999999993e35 < x

    1. Initial program 82.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. sub-neg82.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 47.9% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{y}{x} \cdot \left(z \cdot z\right)\\
\mathbf{if}\;z \leq -0.00012:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 14500000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{+125}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.20000000000000003e-4 or 1.45e7 < z < 2.89999999999999993e125

    1. Initial program 85.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. sub-neg85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000003e-4 < z < 1.45e7

    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. sub-neg99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.083333333333333 + \color{blue}{-0.0027777777777778 \cdot z}}{x} \]
    7. Step-by-step derivation
      1. *-commutative43.4%

        \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
    8. Simplified43.4%

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

    if 2.89999999999999993e125 < z

    1. Initial program 85.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. sub-neg85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 46.8% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{y}{x} \cdot \left(z \cdot z\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{-93}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 14500000:\\
\;\;\;\;\frac{0.083333333333333}{x}\\

\mathbf{elif}\;z \leq 7 \cdot 10^{+127}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.09999999999999998e-93 or 1.45e7 < z < 6.99999999999999956e127

    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. sub-neg87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) \]
    7. Applied egg-rr66.8%

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

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

    if -1.09999999999999998e-93 < z < 1.45e7

    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. sub-neg99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.083333333333333 + \color{blue}{-0.0027777777777778 \cdot z}}{x} \]
    7. Step-by-step derivation
      1. *-commutative45.4%

        \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
    8. Simplified45.4%

      \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
    9. Taylor expanded in z around 0 45.0%

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

    if 6.99999999999999956e127 < z

    1. Initial program 85.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. sub-neg85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 62.7% accurate, 5.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9e11 or 9.1999999999999995e57 < z

    1. Initial program 84.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. sub-neg84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9e11 < z < 9.1999999999999995e57

    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. sub-neg99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 60.8% accurate, 5.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00014 \lor \neg \left(z \leq 14500000\right):\\
\;\;\;\;\left(z \cdot z\right) \cdot \frac{y + 0.0007936500793651}{x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3999999999999999e-4 or 1.45e7 < z

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) \]
    7. Applied egg-rr75.8%

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

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

    if -1.3999999999999999e-4 < z < 1.45e7

    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. sub-neg99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 62.7% accurate, 5.8× speedup?

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

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

\mathbf{elif}\;z \leq 9.2 \cdot 10^{+57}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(y \cdot z - 0.0027777777777778\right)}{x}\\

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


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

    1. Initial program 85.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. sub-neg85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9e11 < z < 9.1999999999999995e57

    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. sub-neg99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.1999999999999995e57 < z

    1. Initial program 83.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. sub-neg83.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 60.6% accurate, 6.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.7999999999999998e-5 or 1.45e7 < z

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) \]
    7. Applied egg-rr75.8%

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

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

    if -8.7999999999999998e-5 < z < 1.45e7

    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. sub-neg99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.083333333333333 + \color{blue}{-0.0027777777777778 \cdot z}}{x} \]
    7. Step-by-step derivation
      1. *-commutative43.4%

        \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
    8. Simplified43.4%

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

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

Alternative 17: 46.5% accurate, 7.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3600000000 \lor \neg \left(z \leq 10.2\right):\\
\;\;\;\;\frac{0.0007936500793651}{x} \cdot \left(z \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.6e9 or 10.199999999999999 < z

    1. Initial program 85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6e9 < z < 10.199999999999999

    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. sub-neg99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.083333333333333 + \color{blue}{-0.0027777777777778 \cdot z}}{x} \]
    7. Step-by-step derivation
      1. *-commutative42.6%

        \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
    8. Simplified42.6%

      \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
    9. Taylor expanded in z around 0 41.5%

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

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

Alternative 18: 63.9% accurate, 9.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 27.6% accurate, 12.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3600000000:\\
\;\;\;\;\frac{z}{x} \cdot -0.0027777777777778\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.6e9

    1. Initial program 85.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. sub-neg85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.083333333333333 + \color{blue}{-0.0027777777777778 \cdot z}}{x} \]
    7. Step-by-step derivation
      1. *-commutative18.9%

        \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
    8. Simplified18.9%

      \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
    9. Taylor expanded in z around inf 18.9%

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

    if -3.6e9 < z

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{0.083333333333333 + \color{blue}{-0.0027777777777778 \cdot z}}{x} \]
    7. Step-by-step derivation
      1. *-commutative31.0%

        \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
    8. Simplified31.0%

      \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
    9. Taylor expanded in z around 0 28.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3600000000:\\ \;\;\;\;\frac{z}{x} \cdot -0.0027777777777778\\ \mathbf{else}:\\ \;\;\;\;\frac{0.083333333333333}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 23.0% accurate, 41.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}} \]
  6. Taylor expanded in z around 0 27.7%

    \[\leadsto \frac{0.083333333333333 + \color{blue}{-0.0027777777777778 \cdot z}}{x} \]
  7. Step-by-step derivation
    1. *-commutative27.7%

      \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
  8. Simplified27.7%

    \[\leadsto \frac{0.083333333333333 + \color{blue}{z \cdot -0.0027777777777778}}{x} \]
  9. Taylor expanded in z around 0 21.5%

    \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
  10. Add Preprocessing

Developer Target 1: 98.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right) \end{array} \]
(FPCore (x y z)
 :precision binary64
 (+
  (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x))
  (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))))
double code(double x, double y, double z) {
	return ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = ((((x - 0.5d0) * log(x)) + (0.91893853320467d0 - x)) + (0.083333333333333d0 / x)) + ((z / x) * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))
end function
public static double code(double x, double y, double z) {
	return ((((x - 0.5) * Math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
def code(x, y, z):
	return ((((x - 0.5) * math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))
function code(x, y, z)
	return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) + Float64(0.91893853320467 - x)) + Float64(0.083333333333333 / x)) + Float64(Float64(z / x) * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778)))
end
function tmp = code(x, y, z)
	tmp = ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)
\end{array}

Reproduce

?
herbie shell --seed 2024137 
(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)))