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

Percentage Accurate: 93.7% → 99.6%
Time: 16.6s
Alternatives: 21
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 21 alternatives:

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

Initial Program: 93.7% 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, 1.0× speedup?

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

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

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


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

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

      \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \left(\frac{-1}{2} \cdot \log x + x \cdot \left(\log x - 1\right)\right)\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
    4. Simplified99.7%

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

    if 2.6000000000000001e41 < x

    1. Initial program 84.0%

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

      \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
    4. Simplified99.6%

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

      \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} - x\right) \]
    6. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - x\right) \]
      2. associate-*l*N/A

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} - x\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} - x\right) \]
      4. distribute-rgt-inN/A

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} - x\right) \]
      5. associate-*r/N/A

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}} \cdot z + \frac{y}{x} \cdot z\right) - x\right) \]
      6. metadata-evalN/A

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{\color{blue}{\frac{7936500793651}{10000000000000000}}}{x} \cdot z + \frac{y}{x} \cdot z\right) - x\right) \]
      7. associate-*l/N/A

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x}} + \frac{y}{x} \cdot z\right) - x\right) \]
      8. associate-*r/N/A

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) - x\right) \]
      9. associate-*l/N/A

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) - x\right) \]
      10. associate-/l*N/A

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) - x\right) \]
      11. distribute-rgt-outN/A

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} - x\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} - x\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{z}{x}} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) - x\right) \]
      14. +-lowering-+.f6499.6

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

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

      \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \color{blue}{x}, z \cdot \left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) - x\right) \]
    9. Step-by-step derivation
      1. Simplified99.6%

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

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

    Alternative 2: 88.9% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\ \mathbf{if}\;t\_0 \leq -4 \cdot 10^{+47}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+306}:\\ \;\;\;\;0.91893853320467 + \mathsf{fma}\left(\log x, x + -0.5, \frac{0.083333333333333}{x} - x\right)\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right)\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0
             (+
              (+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
              (/
               (+
                0.083333333333333
                (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
               x))))
       (if (<= t_0 -4e+47)
         (* y (* z (/ z x)))
         (if (<= t_0 2e+306)
           (+
            0.91893853320467
            (fma (log x) (+ x -0.5) (- (/ 0.083333333333333 x) x)))
           (+ 0.91893853320467 (* z (* (/ z x) (+ 0.0007936500793651 y))))))))
    double code(double x, double y, double z) {
    	double t_0 = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
    	double tmp;
    	if (t_0 <= -4e+47) {
    		tmp = y * (z * (z / x));
    	} else if (t_0 <= 2e+306) {
    		tmp = 0.91893853320467 + fma(log(x), (x + -0.5), ((0.083333333333333 / x) - x));
    	} else {
    		tmp = 0.91893853320467 + (z * ((z / x) * (0.0007936500793651 + y)));
    	}
    	return tmp;
    }
    
    function code(x, y, z)
    	t_0 = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x))
    	tmp = 0.0
    	if (t_0 <= -4e+47)
    		tmp = Float64(y * Float64(z * Float64(z / x)));
    	elseif (t_0 <= 2e+306)
    		tmp = Float64(0.91893853320467 + fma(log(x), Float64(x + -0.5), Float64(Float64(0.083333333333333 / x) - x)));
    	else
    		tmp = Float64(0.91893853320467 + Float64(z * Float64(Float64(z / x) * Float64(0.0007936500793651 + y))));
    	end
    	return tmp
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -4e+47], N[(y * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+306], N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision] + N[(N[(0.083333333333333 / x), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.91893853320467 + N[(z * N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
    \mathbf{if}\;t\_0 \leq -4 \cdot 10^{+47}:\\
    \;\;\;\;y \cdot \left(z \cdot \frac{z}{x}\right)\\
    
    \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+306}:\\
    \;\;\;\;0.91893853320467 + \mathsf{fma}\left(\log x, x + -0.5, \frac{0.083333333333333}{x} - x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.91893853320467 + z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x)) < -4.0000000000000002e47

      1. Initial program 79.3%

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

        \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
      4. Step-by-step derivation
        1. associate-/l*N/A

          \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto y \cdot \color{blue}{\frac{{z}^{2}}{x}} \]
        4. unpow2N/A

          \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]
        5. *-lowering-*.f6489.5

          \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]
      5. Simplified89.5%

        \[\leadsto \color{blue}{y \cdot \frac{z \cdot z}{x}} \]
      6. Step-by-step derivation
        1. associate-*l/N/A

          \[\leadsto y \cdot \color{blue}{\left(\frac{z}{x} \cdot z\right)} \]
        2. *-lowering-*.f64N/A

          \[\leadsto y \cdot \color{blue}{\left(\frac{z}{x} \cdot z\right)} \]
        3. /-lowering-/.f6492.6

          \[\leadsto y \cdot \left(\color{blue}{\frac{z}{x}} \cdot z\right) \]
      7. Applied egg-rr92.6%

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

      if -4.0000000000000002e47 < (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x)) < 2.00000000000000003e306

      1. Initial program 99.4%

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

        \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
      4. Simplified94.1%

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

        \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\left(\left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \log x \cdot \left(x - \frac{1}{2}\right)\right) - x\right)} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \left(\color{blue}{\left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}\right)} - x\right) \]
        2. associate--l+N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x\right)\right)} \]
        3. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\mathsf{fma}\left(\log x, x - \frac{1}{2}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x\right)} \]
        4. log-lowering-log.f64N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\color{blue}{\log x}, x - \frac{1}{2}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x\right) \]
        5. sub-negN/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \color{blue}{x + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x\right) \]
        6. metadata-evalN/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, x + \color{blue}{\frac{-1}{2}}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x\right) \]
        7. +-lowering-+.f64N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \color{blue}{x + \frac{-1}{2}}, \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x\right) \]
        8. --lowering--.f64N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, x + \frac{-1}{2}, \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} - x}\right) \]
        9. associate-*r/N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, x + \frac{-1}{2}, \color{blue}{\frac{\frac{83333333333333}{1000000000000000} \cdot 1}{x}} - x\right) \]
        10. metadata-evalN/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, x + \frac{-1}{2}, \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} - x\right) \]
        11. /-lowering-/.f6488.1

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

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

      if 2.00000000000000003e306 < (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x))

      1. Initial program 82.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. Taylor expanded in y around 0

        \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
      4. Simplified99.9%

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

        \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
      6. Step-by-step derivation
        1. unpow2N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \]
        2. associate-*l*N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} \]
        4. distribute-rgt-inN/A

          \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \color{blue}{\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} \]
        5. associate-*r/N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}} \cdot z + \frac{y}{x} \cdot z\right) \]
        6. metadata-evalN/A

          \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\frac{\color{blue}{\frac{7936500793651}{10000000000000000}}}{x} \cdot z + \frac{y}{x} \cdot z\right) \]
        7. associate-*l/N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x}} + \frac{y}{x} \cdot z\right) \]
        8. associate-*r/N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) \]
        9. associate-*l/N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) \]
        10. associate-/l*N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) \]
        11. distribute-rgt-outN/A

          \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} \]
        12. *-lowering-*.f64N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} \]
        13. /-lowering-/.f64N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\color{blue}{\frac{z}{x}} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \]
        14. +-lowering-+.f6487.2

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

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

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

    Alternative 3: 98.6% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \mathsf{fma}\left(z, \mathsf{fma}\left(\frac{z}{x}, 0.0007936500793651 + y, \frac{-0.0027777777777778}{x}\right), \mathsf{fma}\left(\log x, x + -0.5, \frac{0.083333333333333}{x}\right)\right) + \left(0.91893853320467 - x\right) \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (+
      (fma
       z
       (fma (/ z x) (+ 0.0007936500793651 y) (/ -0.0027777777777778 x))
       (fma (log x) (+ x -0.5) (/ 0.083333333333333 x)))
      (- 0.91893853320467 x)))
    double code(double x, double y, double z) {
    	return fma(z, fma((z / x), (0.0007936500793651 + y), (-0.0027777777777778 / x)), fma(log(x), (x + -0.5), (0.083333333333333 / x))) + (0.91893853320467 - x);
    }
    
    function code(x, y, z)
    	return Float64(fma(z, fma(Float64(z / x), Float64(0.0007936500793651 + y), Float64(-0.0027777777777778 / x)), fma(log(x), Float64(x + -0.5), Float64(0.083333333333333 / x))) + Float64(0.91893853320467 - x))
    end
    
    code[x_, y_, z_] := N[(N[(z * N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 + y), $MachinePrecision] + N[(-0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision] + N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \mathsf{fma}\left(z, \mathsf{fma}\left(\frac{z}{x}, 0.0007936500793651 + y, \frac{-0.0027777777777778}{x}\right), \mathsf{fma}\left(\log x, x + -0.5, \frac{0.083333333333333}{x}\right)\right) + \left(0.91893853320467 - x\right)
    \end{array}
    
    Derivation
    1. Initial program 92.8%

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

      \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
    4. Simplified93.5%

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

      \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{13888888888889}{5000000000000000} \cdot \frac{1}{x}\right) + \log x \cdot \left(x - \frac{1}{2}\right)\right)\right)\right) - x} \]
    6. Simplified99.2%

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

    Alternative 4: 99.1% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.21:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), \mathsf{fma}\left(x, \mathsf{fma}\left(-0.5, \log x, 0.91893853320467\right), 0.083333333333333\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \mathsf{fma}\left(\log x, x + -0.5, z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right) - x\right)\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (<= x 0.21)
       (/
        (fma
         z
         (fma z (+ 0.0007936500793651 y) -0.0027777777777778)
         (fma x (fma -0.5 (log x) 0.91893853320467) 0.083333333333333))
        x)
       (+
        0.91893853320467
        (fma
         (log x)
         (+ x -0.5)
         (- (* z (* (/ z x) (+ 0.0007936500793651 y))) x)))))
    double code(double x, double y, double z) {
    	double tmp;
    	if (x <= 0.21) {
    		tmp = fma(z, fma(z, (0.0007936500793651 + y), -0.0027777777777778), fma(x, fma(-0.5, log(x), 0.91893853320467), 0.083333333333333)) / x;
    	} else {
    		tmp = 0.91893853320467 + fma(log(x), (x + -0.5), ((z * ((z / x) * (0.0007936500793651 + y))) - x));
    	}
    	return tmp;
    }
    
    function code(x, y, z)
    	tmp = 0.0
    	if (x <= 0.21)
    		tmp = Float64(fma(z, fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778), fma(x, fma(-0.5, log(x), 0.91893853320467), 0.083333333333333)) / x);
    	else
    		tmp = Float64(0.91893853320467 + fma(log(x), Float64(x + -0.5), Float64(Float64(z * Float64(Float64(z / x) * Float64(0.0007936500793651 + y))) - x)));
    	end
    	return tmp
    end
    
    code[x_, y_, z_] := If[LessEqual[x, 0.21], N[(N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] + N[(x * N[(-0.5 * N[Log[x], $MachinePrecision] + 0.91893853320467), $MachinePrecision] + 0.083333333333333), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision] + N[(N[(z * N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;x \leq 0.21:\\
    \;\;\;\;\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), \mathsf{fma}\left(x, \mathsf{fma}\left(-0.5, \log x, 0.91893853320467\right), 0.083333333333333\right)\right)}{x}\\
    
    \mathbf{else}:\\
    \;\;\;\;0.91893853320467 + \mathsf{fma}\left(\log x, x + -0.5, z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right) - x\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < 0.209999999999999992

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

        \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
        2. associate-+r+N/A

          \[\leadsto \frac{\color{blue}{\left(\frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}}{x} \]
        3. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \left(\frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}}{x} \]
        4. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}}{x} \]
        5. sub-negN/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
        6. metadata-evalN/A

          \[\leadsto \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
        7. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
        8. +-lowering-+.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{7936500793651}{10000000000000000} + y}, \frac{-13888888888889}{5000000000000000}\right), \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + \frac{83333333333333}{1000000000000000}}\right)}{x} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{\mathsf{fma}\left(x, \frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x, \frac{83333333333333}{1000000000000000}\right)}\right)}{x} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \mathsf{fma}\left(x, \color{blue}{\frac{-1}{2} \cdot \log x + \frac{91893853320467}{100000000000000}}, \frac{83333333333333}{1000000000000000}\right)\right)}{x} \]
        12. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \log x, \frac{91893853320467}{100000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)\right)}{x} \]
        13. log-lowering-log.f6498.6

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

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

      if 0.209999999999999992 < x

      1. Initial program 86.1%

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

        \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
      4. Simplified99.6%

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

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} - x\right) \]
      6. Step-by-step derivation
        1. unpow2N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - x\right) \]
        2. associate-*l*N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} - x\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} - x\right) \]
        4. distribute-rgt-inN/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} - x\right) \]
        5. associate-*r/N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}} \cdot z + \frac{y}{x} \cdot z\right) - x\right) \]
        6. metadata-evalN/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{\color{blue}{\frac{7936500793651}{10000000000000000}}}{x} \cdot z + \frac{y}{x} \cdot z\right) - x\right) \]
        7. associate-*l/N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x}} + \frac{y}{x} \cdot z\right) - x\right) \]
        8. associate-*r/N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) - x\right) \]
        9. associate-*l/N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) - x\right) \]
        10. associate-/l*N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) - x\right) \]
        11. distribute-rgt-outN/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} - x\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} - x\right) \]
        13. /-lowering-/.f64N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{z}{x}} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) - x\right) \]
        14. +-lowering-+.f6499.5

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

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

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

    Alternative 5: 98.9% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 3:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), \mathsf{fma}\left(x, \mathsf{fma}\left(-0.5, \log x, 0.91893853320467\right), 0.083333333333333\right)\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + \mathsf{fma}\left(\log x, x, z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right) - x\right)\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (<= x 3.0)
       (/
        (fma
         z
         (fma z (+ 0.0007936500793651 y) -0.0027777777777778)
         (fma x (fma -0.5 (log x) 0.91893853320467) 0.083333333333333))
        x)
       (+
        0.91893853320467
        (fma (log x) x (- (* z (* (/ z x) (+ 0.0007936500793651 y))) x)))))
    double code(double x, double y, double z) {
    	double tmp;
    	if (x <= 3.0) {
    		tmp = fma(z, fma(z, (0.0007936500793651 + y), -0.0027777777777778), fma(x, fma(-0.5, log(x), 0.91893853320467), 0.083333333333333)) / x;
    	} else {
    		tmp = 0.91893853320467 + fma(log(x), x, ((z * ((z / x) * (0.0007936500793651 + y))) - x));
    	}
    	return tmp;
    }
    
    function code(x, y, z)
    	tmp = 0.0
    	if (x <= 3.0)
    		tmp = Float64(fma(z, fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778), fma(x, fma(-0.5, log(x), 0.91893853320467), 0.083333333333333)) / x);
    	else
    		tmp = Float64(0.91893853320467 + fma(log(x), x, Float64(Float64(z * Float64(Float64(z / x) * Float64(0.0007936500793651 + y))) - x)));
    	end
    	return tmp
    end
    
    code[x_, y_, z_] := If[LessEqual[x, 3.0], N[(N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] + N[(x * N[(-0.5 * N[Log[x], $MachinePrecision] + 0.91893853320467), $MachinePrecision] + 0.083333333333333), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(0.91893853320467 + N[(N[Log[x], $MachinePrecision] * x + N[(N[(z * N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;x \leq 3:\\
    \;\;\;\;\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), \mathsf{fma}\left(x, \mathsf{fma}\left(-0.5, \log x, 0.91893853320467\right), 0.083333333333333\right)\right)}{x}\\
    
    \mathbf{else}:\\
    \;\;\;\;0.91893853320467 + \mathsf{fma}\left(\log x, x, z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right) - x\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < 3

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

        \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
      4. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
        2. associate-+r+N/A

          \[\leadsto \frac{\color{blue}{\left(\frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}}{x} \]
        3. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \left(\frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}}{x} \]
        4. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}}{x} \]
        5. sub-negN/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
        6. metadata-evalN/A

          \[\leadsto \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
        7. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
        8. +-lowering-+.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{7936500793651}{10000000000000000} + y}, \frac{-13888888888889}{5000000000000000}\right), \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + \frac{83333333333333}{1000000000000000}}\right)}{x} \]
        10. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{\mathsf{fma}\left(x, \frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x, \frac{83333333333333}{1000000000000000}\right)}\right)}{x} \]
        11. +-commutativeN/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \mathsf{fma}\left(x, \color{blue}{\frac{-1}{2} \cdot \log x + \frac{91893853320467}{100000000000000}}, \frac{83333333333333}{1000000000000000}\right)\right)}{x} \]
        12. accelerator-lowering-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \log x, \frac{91893853320467}{100000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)\right)}{x} \]
        13. log-lowering-log.f6498.6

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

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

      if 3 < x

      1. Initial program 86.1%

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

        \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
      4. Simplified99.6%

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

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} - x\right) \]
      6. Step-by-step derivation
        1. unpow2N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - x\right) \]
        2. associate-*l*N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} - x\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} - x\right) \]
        4. distribute-rgt-inN/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} - x\right) \]
        5. associate-*r/N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}} \cdot z + \frac{y}{x} \cdot z\right) - x\right) \]
        6. metadata-evalN/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{\color{blue}{\frac{7936500793651}{10000000000000000}}}{x} \cdot z + \frac{y}{x} \cdot z\right) - x\right) \]
        7. associate-*l/N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x}} + \frac{y}{x} \cdot z\right) - x\right) \]
        8. associate-*r/N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) - x\right) \]
        9. associate-*l/N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) - x\right) \]
        10. associate-/l*N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) - x\right) \]
        11. distribute-rgt-outN/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} - x\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} - x\right) \]
        13. /-lowering-/.f64N/A

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{z}{x}} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) - x\right) \]
        14. +-lowering-+.f6499.5

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

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

        \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \color{blue}{x}, z \cdot \left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) - x\right) \]
      9. Step-by-step derivation
        1. Simplified98.7%

          \[\leadsto 0.91893853320467 + \mathsf{fma}\left(\log x, \color{blue}{x}, z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right) - x\right) \]
      10. Recombined 2 regimes into one program.
      11. Add Preprocessing

      Alternative 6: 98.5% accurate, 1.0× speedup?

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

        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. Taylor expanded in y around 0

          \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
        4. Simplified87.2%

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

          \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
        6. Step-by-step derivation
          1. distribute-rgt-inN/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(\color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)} - \frac{13888888888889}{5000000000000000}\right)}{x} \]
          2. /-lowering-/.f64N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          3. +-commutativeN/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
          4. distribute-rgt-inN/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \frac{z \cdot \left(\color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right)} - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}{x} \]
          5. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\color{blue}{\mathsf{fma}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000}\right)}}{x} \]
          6. sub-negN/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
          7. distribute-rgt-inN/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)} + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right), \frac{83333333333333}{1000000000000000}\right)}{x} \]
          8. metadata-evalN/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
          9. accelerator-lowering-fma.f64N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
          10. +-lowering-+.f6497.6

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

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

        if 1 < x

        1. Initial program 86.1%

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

          \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
        4. Simplified99.6%

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

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} - x\right) \]
        6. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - x\right) \]
          2. associate-*l*N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} - x\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} - x\right) \]
          4. distribute-rgt-inN/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} - x\right) \]
          5. associate-*r/N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}} \cdot z + \frac{y}{x} \cdot z\right) - x\right) \]
          6. metadata-evalN/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{\color{blue}{\frac{7936500793651}{10000000000000000}}}{x} \cdot z + \frac{y}{x} \cdot z\right) - x\right) \]
          7. associate-*l/N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x}} + \frac{y}{x} \cdot z\right) - x\right) \]
          8. associate-*r/N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) - x\right) \]
          9. associate-*l/N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) - x\right) \]
          10. associate-/l*N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) - x\right) \]
          11. distribute-rgt-outN/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} - x\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} - x\right) \]
          13. /-lowering-/.f64N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{z}{x}} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) - x\right) \]
          14. +-lowering-+.f6499.5

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

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

          \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \color{blue}{x}, z \cdot \left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) - x\right) \]
        9. Step-by-step derivation
          1. Simplified98.7%

            \[\leadsto 0.91893853320467 + \mathsf{fma}\left(\log x, \color{blue}{x}, z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right) - x\right) \]
        10. Recombined 2 regimes into one program.
        11. Add Preprocessing

        Alternative 7: 90.8% accurate, 1.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 650:\\ \;\;\;\;0.91893853320467 + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z, z \cdot \frac{0.0007936500793651}{x}, \mathsf{fma}\left(\log x, x + -0.5, 0.91893853320467\right)\right) - x\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= x 650.0)
           (+
            0.91893853320467
            (/
             (fma
              z
              (fma z (+ 0.0007936500793651 y) -0.0027777777777778)
              0.083333333333333)
             x))
           (-
            (fma
             z
             (* z (/ 0.0007936500793651 x))
             (fma (log x) (+ x -0.5) 0.91893853320467))
            x)))
        double code(double x, double y, double z) {
        	double tmp;
        	if (x <= 650.0) {
        		tmp = 0.91893853320467 + (fma(z, fma(z, (0.0007936500793651 + y), -0.0027777777777778), 0.083333333333333) / x);
        	} else {
        		tmp = fma(z, (z * (0.0007936500793651 / x)), fma(log(x), (x + -0.5), 0.91893853320467)) - x;
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (x <= 650.0)
        		tmp = Float64(0.91893853320467 + Float64(fma(z, fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778), 0.083333333333333) / x));
        	else
        		tmp = Float64(fma(z, Float64(z * Float64(0.0007936500793651 / x)), fma(log(x), Float64(x + -0.5), 0.91893853320467)) - x);
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[x, 650.0], N[(0.91893853320467 + N[(N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(z * N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision] + N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision] + 0.91893853320467), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq 650:\\
        \;\;\;\;0.91893853320467 + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(z, z \cdot \frac{0.0007936500793651}{x}, \mathsf{fma}\left(\log x, x + -0.5, 0.91893853320467\right)\right) - x\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 650

          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. Taylor expanded in y around 0

            \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
          4. Simplified87.2%

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

            \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          6. Step-by-step derivation
            1. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(\color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)} - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
            3. +-commutativeN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
            4. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{z \cdot \left(\color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right)} - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}{x} \]
            5. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\color{blue}{\mathsf{fma}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000}\right)}}{x} \]
            6. sub-negN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            7. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)} + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right), \frac{83333333333333}{1000000000000000}\right)}{x} \]
            8. metadata-evalN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            9. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            10. +-lowering-+.f6497.6

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

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

          if 650 < x

          1. Initial program 86.1%

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

            \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
          4. Simplified99.6%

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

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} - x\right) \]
          6. Step-by-step derivation
            1. unpow2N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - x\right) \]
            2. associate-*l*N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} - x\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} - x\right) \]
            4. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} - x\right) \]
            5. associate-*r/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}} \cdot z + \frac{y}{x} \cdot z\right) - x\right) \]
            6. metadata-evalN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{\color{blue}{\frac{7936500793651}{10000000000000000}}}{x} \cdot z + \frac{y}{x} \cdot z\right) - x\right) \]
            7. associate-*l/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x}} + \frac{y}{x} \cdot z\right) - x\right) \]
            8. associate-*r/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) - x\right) \]
            9. associate-*l/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) - x\right) \]
            10. associate-/l*N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) - x\right) \]
            11. distribute-rgt-outN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} - x\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} - x\right) \]
            13. /-lowering-/.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{z}{x}} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) - x\right) \]
            14. +-lowering-+.f6499.5

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

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

            \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{7936500793651}{10000000000000000} \cdot \frac{{z}^{2}}{x} + \log x \cdot \left(x - \frac{1}{2}\right)\right)\right) - x} \]
          9. Step-by-step derivation
            1. --lowering--.f64N/A

              \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{7936500793651}{10000000000000000} \cdot \frac{{z}^{2}}{x} + \log x \cdot \left(x - \frac{1}{2}\right)\right)\right) - x} \]
          10. Simplified86.0%

            \[\leadsto \color{blue}{\mathsf{fma}\left(z, z \cdot \frac{0.0007936500793651}{x}, \mathsf{fma}\left(\log x, x + -0.5, 0.91893853320467\right)\right) - x} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 8: 84.2% accurate, 1.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 550000:\\ \;\;\;\;0.91893853320467 + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\log x, x + -0.5, 0.91893853320467\right) - x\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= x 550000.0)
           (+
            0.91893853320467
            (/
             (fma
              z
              (fma z (+ 0.0007936500793651 y) -0.0027777777777778)
              0.083333333333333)
             x))
           (- (fma (log x) (+ x -0.5) 0.91893853320467) x)))
        double code(double x, double y, double z) {
        	double tmp;
        	if (x <= 550000.0) {
        		tmp = 0.91893853320467 + (fma(z, fma(z, (0.0007936500793651 + y), -0.0027777777777778), 0.083333333333333) / x);
        	} else {
        		tmp = fma(log(x), (x + -0.5), 0.91893853320467) - x;
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (x <= 550000.0)
        		tmp = Float64(0.91893853320467 + Float64(fma(z, fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778), 0.083333333333333) / x));
        	else
        		tmp = Float64(fma(log(x), Float64(x + -0.5), 0.91893853320467) - x);
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[x, 550000.0], N[(0.91893853320467 + N[(N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[x], $MachinePrecision] * N[(x + -0.5), $MachinePrecision] + 0.91893853320467), $MachinePrecision] - x), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq 550000:\\
        \;\;\;\;0.91893853320467 + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(\log x, x + -0.5, 0.91893853320467\right) - x\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 5.5e5

          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. Taylor expanded in y around 0

            \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
          4. Simplified87.2%

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

            \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          6. Step-by-step derivation
            1. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(\color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)} - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
            3. +-commutativeN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
            4. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{z \cdot \left(\color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right)} - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}{x} \]
            5. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\color{blue}{\mathsf{fma}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000}\right)}}{x} \]
            6. sub-negN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            7. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)} + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right), \frac{83333333333333}{1000000000000000}\right)}{x} \]
            8. metadata-evalN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            9. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            10. +-lowering-+.f6497.6

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

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

          if 5.5e5 < x

          1. Initial program 86.1%

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

            \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
          4. Simplified99.6%

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

            \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} - x\right) \]
          6. Step-by-step derivation
            1. unpow2N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) - x\right) \]
            2. associate-*l*N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} - x\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} - x\right) \]
            4. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} - x\right) \]
            5. associate-*r/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}} \cdot z + \frac{y}{x} \cdot z\right) - x\right) \]
            6. metadata-evalN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{\color{blue}{\frac{7936500793651}{10000000000000000}}}{x} \cdot z + \frac{y}{x} \cdot z\right) - x\right) \]
            7. associate-*l/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x}} + \frac{y}{x} \cdot z\right) - x\right) \]
            8. associate-*r/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) - x\right) \]
            9. associate-*l/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) - x\right) \]
            10. associate-/l*N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) - x\right) \]
            11. distribute-rgt-outN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} - x\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} - x\right) \]
            13. /-lowering-/.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \mathsf{fma}\left(\log x, \frac{-1}{2} + x, z \cdot \left(\color{blue}{\frac{z}{x}} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) - x\right) \]
            14. +-lowering-+.f6499.5

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

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

            \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \log x \cdot \left(x - \frac{1}{2}\right)\right) - x} \]
          9. Step-by-step derivation
            1. --lowering--.f64N/A

              \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \log x \cdot \left(x - \frac{1}{2}\right)\right) - x} \]
            2. +-commutativeN/A

              \[\leadsto \color{blue}{\left(\log x \cdot \left(x - \frac{1}{2}\right) + \frac{91893853320467}{100000000000000}\right)} - x \]
            3. remove-double-negN/A

              \[\leadsto \left(\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log x\right)\right)\right)\right)} \cdot \left(x - \frac{1}{2}\right) + \frac{91893853320467}{100000000000000}\right) - x \]
            4. log-recN/A

              \[\leadsto \left(\left(\mathsf{neg}\left(\color{blue}{\log \left(\frac{1}{x}\right)}\right)\right) \cdot \left(x - \frac{1}{2}\right) + \frac{91893853320467}{100000000000000}\right) - x \]
            5. mul-1-negN/A

              \[\leadsto \left(\color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right)\right)} \cdot \left(x - \frac{1}{2}\right) + \frac{91893853320467}{100000000000000}\right) - x \]
            6. accelerator-lowering-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \log \left(\frac{1}{x}\right), x - \frac{1}{2}, \frac{91893853320467}{100000000000000}\right)} - x \]
            7. mul-1-negN/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)}, x - \frac{1}{2}, \frac{91893853320467}{100000000000000}\right) - x \]
            8. log-recN/A

              \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log x\right)\right)}\right), x - \frac{1}{2}, \frac{91893853320467}{100000000000000}\right) - x \]
            9. remove-double-negN/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{\log x}, x - \frac{1}{2}, \frac{91893853320467}{100000000000000}\right) - x \]
            10. log-lowering-log.f64N/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{\log x}, x - \frac{1}{2}, \frac{91893853320467}{100000000000000}\right) - x \]
            11. sub-negN/A

              \[\leadsto \mathsf{fma}\left(\log x, \color{blue}{x + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, \frac{91893853320467}{100000000000000}\right) - x \]
            12. metadata-evalN/A

              \[\leadsto \mathsf{fma}\left(\log x, x + \color{blue}{\frac{-1}{2}}, \frac{91893853320467}{100000000000000}\right) - x \]
            13. +-lowering-+.f6474.0

              \[\leadsto \mathsf{fma}\left(\log x, \color{blue}{x + -0.5}, 0.91893853320467\right) - x \]
          10. Simplified74.0%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\log x, x + -0.5, 0.91893853320467\right) - x} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 9: 84.5% accurate, 1.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 6.6 \cdot 10^{+21}:\\ \;\;\;\;0.91893853320467 + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \log x, -x\right)\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= x 6.6e+21)
           (+
            0.91893853320467
            (/
             (fma
              z
              (fma z (+ 0.0007936500793651 y) -0.0027777777777778)
              0.083333333333333)
             x))
           (fma x (log x) (- x))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (x <= 6.6e+21) {
        		tmp = 0.91893853320467 + (fma(z, fma(z, (0.0007936500793651 + y), -0.0027777777777778), 0.083333333333333) / x);
        	} else {
        		tmp = fma(x, log(x), -x);
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (x <= 6.6e+21)
        		tmp = Float64(0.91893853320467 + Float64(fma(z, fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778), 0.083333333333333) / x));
        	else
        		tmp = fma(x, log(x), Float64(-x));
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[x, 6.6e+21], N[(0.91893853320467 + N[(N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x * N[Log[x], $MachinePrecision] + (-x)), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq 6.6 \cdot 10^{+21}:\\
        \;\;\;\;0.91893853320467 + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(x, \log x, -x\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 6.6e21

          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. Taylor expanded in y around 0

            \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
          4. Simplified87.8%

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

            \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          6. Step-by-step derivation
            1. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(\color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)} - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
            3. +-commutativeN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
            4. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{z \cdot \left(\color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right)} - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}{x} \]
            5. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\color{blue}{\mathsf{fma}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000}\right)}}{x} \]
            6. sub-negN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            7. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)} + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right), \frac{83333333333333}{1000000000000000}\right)}{x} \]
            8. metadata-evalN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            9. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            10. +-lowering-+.f6495.0

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

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

          if 6.6e21 < x

          1. Initial program 85.4%

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

            \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} \]
          4. Step-by-step derivation
            1. sub-negN/A

              \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)} \]
            2. mul-1-negN/A

              \[\leadsto x \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right)} + \left(\mathsf{neg}\left(1\right)\right)\right) \]
            3. log-recN/A

              \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log x\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)\right) \]
            4. remove-double-negN/A

              \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(\mathsf{neg}\left(1\right)\right)\right) \]
            5. metadata-evalN/A

              \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) \]
            6. distribute-rgt-inN/A

              \[\leadsto \color{blue}{\log x \cdot x + -1 \cdot x} \]
            7. neg-mul-1N/A

              \[\leadsto \log x \cdot x + \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
            8. *-commutativeN/A

              \[\leadsto \color{blue}{x \cdot \log x} + \left(\mathsf{neg}\left(x\right)\right) \]
            9. accelerator-lowering-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(x, \log x, \mathsf{neg}\left(x\right)\right)} \]
            10. log-lowering-log.f64N/A

              \[\leadsto \mathsf{fma}\left(x, \color{blue}{\log x}, \mathsf{neg}\left(x\right)\right) \]
            11. neg-lowering-neg.f6475.1

              \[\leadsto \mathsf{fma}\left(x, \log x, \color{blue}{-x}\right) \]
          5. Simplified75.1%

            \[\leadsto \color{blue}{\mathsf{fma}\left(x, \log x, -x\right)} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 10: 84.5% accurate, 1.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 6.8 \cdot 10^{+21}:\\ \;\;\;\;0.91893853320467 + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log x - x\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= x 6.8e+21)
           (+
            0.91893853320467
            (/
             (fma
              z
              (fma z (+ 0.0007936500793651 y) -0.0027777777777778)
              0.083333333333333)
             x))
           (- (* x (log x)) x)))
        double code(double x, double y, double z) {
        	double tmp;
        	if (x <= 6.8e+21) {
        		tmp = 0.91893853320467 + (fma(z, fma(z, (0.0007936500793651 + y), -0.0027777777777778), 0.083333333333333) / x);
        	} else {
        		tmp = (x * log(x)) - x;
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (x <= 6.8e+21)
        		tmp = Float64(0.91893853320467 + Float64(fma(z, fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778), 0.083333333333333) / x));
        	else
        		tmp = Float64(Float64(x * log(x)) - x);
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[x, 6.8e+21], N[(0.91893853320467 + N[(N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq 6.8 \cdot 10^{+21}:\\
        \;\;\;\;0.91893853320467 + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\
        
        \mathbf{else}:\\
        \;\;\;\;x \cdot \log x - x\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 6.8e21

          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. Taylor expanded in y around 0

            \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
          4. Simplified87.8%

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

            \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          6. Step-by-step derivation
            1. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(\color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)} - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
            3. +-commutativeN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
            4. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{z \cdot \left(\color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right)} - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}{x} \]
            5. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\color{blue}{\mathsf{fma}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000}\right)}}{x} \]
            6. sub-negN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            7. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)} + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right), \frac{83333333333333}{1000000000000000}\right)}{x} \]
            8. metadata-evalN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            9. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            10. +-lowering-+.f6495.0

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

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

          if 6.8e21 < x

          1. Initial program 85.4%

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

            \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \log \left(\frac{1}{x}\right) - 1\right)} \]
          4. Step-by-step derivation
            1. sub-negN/A

              \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \log \left(\frac{1}{x}\right) + \left(\mathsf{neg}\left(1\right)\right)\right)} \]
            2. mul-1-negN/A

              \[\leadsto x \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\log \left(\frac{1}{x}\right)\right)\right)} + \left(\mathsf{neg}\left(1\right)\right)\right) \]
            3. log-recN/A

              \[\leadsto x \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log x\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)\right) \]
            4. remove-double-negN/A

              \[\leadsto x \cdot \left(\color{blue}{\log x} + \left(\mathsf{neg}\left(1\right)\right)\right) \]
            5. metadata-evalN/A

              \[\leadsto x \cdot \left(\log x + \color{blue}{-1}\right) \]
            6. distribute-rgt-inN/A

              \[\leadsto \color{blue}{\log x \cdot x + -1 \cdot x} \]
            7. neg-mul-1N/A

              \[\leadsto \log x \cdot x + \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
            8. *-commutativeN/A

              \[\leadsto \color{blue}{x \cdot \log x} + \left(\mathsf{neg}\left(x\right)\right) \]
            9. accelerator-lowering-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(x, \log x, \mathsf{neg}\left(x\right)\right)} \]
            10. log-lowering-log.f64N/A

              \[\leadsto \mathsf{fma}\left(x, \color{blue}{\log x}, \mathsf{neg}\left(x\right)\right) \]
            11. neg-lowering-neg.f6475.1

              \[\leadsto \mathsf{fma}\left(x, \log x, \color{blue}{-x}\right) \]
          5. Simplified75.1%

            \[\leadsto \color{blue}{\mathsf{fma}\left(x, \log x, -x\right)} \]
          6. Step-by-step derivation
            1. unsub-negN/A

              \[\leadsto \color{blue}{x \cdot \log x - x} \]
            2. --lowering--.f64N/A

              \[\leadsto \color{blue}{x \cdot \log x - x} \]
            3. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{x \cdot \log x} - x \]
            4. log-lowering-log.f6474.9

              \[\leadsto x \cdot \color{blue}{\log x} - x \]
          7. Applied egg-rr74.9%

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

        Alternative 11: 64.4% accurate, 2.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+17}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;t\_0 \leq 10^{-9}:\\ \;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right)\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (let* ((t_0 (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))))
           (if (<= t_0 -1e+17)
             (* y (* z (/ z x)))
             (if (<= t_0 1e-9)
               (/ 1.0 (* x 12.000000000000048))
               (* z (* (/ z x) (+ 0.0007936500793651 y)))))))
        double code(double x, double y, double z) {
        	double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
        	double tmp;
        	if (t_0 <= -1e+17) {
        		tmp = y * (z * (z / x));
        	} else if (t_0 <= 1e-9) {
        		tmp = 1.0 / (x * 12.000000000000048);
        	} else {
        		tmp = z * ((z / x) * (0.0007936500793651 + y));
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: t_0
            real(8) :: tmp
            t_0 = z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)
            if (t_0 <= (-1d+17)) then
                tmp = y * (z * (z / x))
            else if (t_0 <= 1d-9) then
                tmp = 1.0d0 / (x * 12.000000000000048d0)
            else
                tmp = z * ((z / x) * (0.0007936500793651d0 + y))
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
        	double tmp;
        	if (t_0 <= -1e+17) {
        		tmp = y * (z * (z / x));
        	} else if (t_0 <= 1e-9) {
        		tmp = 1.0 / (x * 12.000000000000048);
        	} else {
        		tmp = z * ((z / x) * (0.0007936500793651 + y));
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)
        	tmp = 0
        	if t_0 <= -1e+17:
        		tmp = y * (z * (z / x))
        	elif t_0 <= 1e-9:
        		tmp = 1.0 / (x * 12.000000000000048)
        	else:
        		tmp = z * ((z / x) * (0.0007936500793651 + y))
        	return tmp
        
        function code(x, y, z)
        	t_0 = Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))
        	tmp = 0.0
        	if (t_0 <= -1e+17)
        		tmp = Float64(y * Float64(z * Float64(z / x)));
        	elseif (t_0 <= 1e-9)
        		tmp = Float64(1.0 / Float64(x * 12.000000000000048));
        	else
        		tmp = Float64(z * Float64(Float64(z / x) * Float64(0.0007936500793651 + y)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
        	tmp = 0.0;
        	if (t_0 <= -1e+17)
        		tmp = y * (z * (z / x));
        	elseif (t_0 <= 1e-9)
        		tmp = 1.0 / (x * 12.000000000000048);
        	else
        		tmp = z * ((z / x) * (0.0007936500793651 + y));
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+17], N[(y * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e-9], N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\
        \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+17}:\\
        \;\;\;\;y \cdot \left(z \cdot \frac{z}{x}\right)\\
        
        \mathbf{elif}\;t\_0 \leq 10^{-9}:\\
        \;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\
        
        \mathbf{else}:\\
        \;\;\;\;z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -1e17

          1. Initial program 80.7%

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

            \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
          4. Step-by-step derivation
            1. associate-/l*N/A

              \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
            3. /-lowering-/.f64N/A

              \[\leadsto y \cdot \color{blue}{\frac{{z}^{2}}{x}} \]
            4. unpow2N/A

              \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]
            5. *-lowering-*.f6483.6

              \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]
          5. Simplified83.6%

            \[\leadsto \color{blue}{y \cdot \frac{z \cdot z}{x}} \]
          6. Step-by-step derivation
            1. associate-*l/N/A

              \[\leadsto y \cdot \color{blue}{\left(\frac{z}{x} \cdot z\right)} \]
            2. *-lowering-*.f64N/A

              \[\leadsto y \cdot \color{blue}{\left(\frac{z}{x} \cdot z\right)} \]
            3. /-lowering-/.f6486.5

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

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

          if -1e17 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1.00000000000000006e-9

          1. Initial program 99.4%

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

            \[\leadsto \color{blue}{y \cdot \left(\left(\frac{\frac{83333333333333}{1000000000000000}}{x \cdot y} + \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \left(\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
          4. Simplified77.2%

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

            \[\leadsto \color{blue}{y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) + \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}} \]
          6. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)} \]
            2. +-lowering-+.f64N/A

              \[\leadsto \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)} \]
            3. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} \cdot 1}{x}} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            4. metadata-evalN/A

              \[\leadsto \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            6. associate--l+N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + y \cdot \color{blue}{\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            7. distribute-lft-inN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(y \cdot \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y}\right) + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(y \cdot \color{blue}{\left(\frac{1}{y} \cdot \frac{91893853320467}{100000000000000}\right)} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            9. associate-*r*N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\left(y \cdot \frac{1}{y}\right) \cdot \frac{91893853320467}{100000000000000}} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            10. rgt-mult-inverseN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{1} \cdot \frac{91893853320467}{100000000000000} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            11. metadata-evalN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\frac{91893853320467}{100000000000000}} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            12. +-lowering-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(\frac{91893853320467}{100000000000000} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            13. *-lowering-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\frac{91893853320467}{100000000000000} + \color{blue}{y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)}\right) \]
            14. --lowering--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\frac{91893853320467}{100000000000000} + y \cdot \color{blue}{\left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)}\right) \]
          7. Simplified79.8%

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

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
          9. Step-by-step derivation
            1. /-lowering-/.f6445.0

              \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
          10. Simplified45.0%

            \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
          11. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
            3. div-invN/A

              \[\leadsto \frac{1}{\color{blue}{x \cdot \frac{1}{\frac{83333333333333}{1000000000000000}}}} \]
            4. *-lowering-*.f64N/A

              \[\leadsto \frac{1}{\color{blue}{x \cdot \frac{1}{\frac{83333333333333}{1000000000000000}}}} \]
            5. metadata-eval45.1

              \[\leadsto \frac{1}{x \cdot \color{blue}{12.000000000000048}} \]
          12. Applied egg-rr45.1%

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

          if 1.00000000000000006e-9 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z)

          1. Initial program 88.6%

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

            \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
          4. Simplified98.0%

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

            \[\leadsto \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
          6. Step-by-step derivation
            1. unpow2N/A

              \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \]
            2. associate-*l*N/A

              \[\leadsto \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} \]
            3. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} \]
            4. distribute-rgt-inN/A

              \[\leadsto z \cdot \color{blue}{\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} \]
            5. associate-*r/N/A

              \[\leadsto z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}} \cdot z + \frac{y}{x} \cdot z\right) \]
            6. metadata-evalN/A

              \[\leadsto z \cdot \left(\frac{\color{blue}{\frac{7936500793651}{10000000000000000}}}{x} \cdot z + \frac{y}{x} \cdot z\right) \]
            7. associate-*l/N/A

              \[\leadsto z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x}} + \frac{y}{x} \cdot z\right) \]
            8. associate-*r/N/A

              \[\leadsto z \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) \]
            9. associate-*l/N/A

              \[\leadsto z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) \]
            10. associate-/l*N/A

              \[\leadsto z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) \]
            11. distribute-rgt-outN/A

              \[\leadsto z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} \]
            12. *-lowering-*.f64N/A

              \[\leadsto z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} \]
            13. /-lowering-/.f64N/A

              \[\leadsto z \cdot \left(\color{blue}{\frac{z}{x}} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \]
            14. +-lowering-+.f6474.3

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

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

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

        Alternative 12: 64.1% accurate, 2.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+17}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;t\_0 \leq 10^{-9}:\\ \;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (let* ((t_0 (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))))
           (if (<= t_0 -1e+17)
             (* y (* z (/ z x)))
             (if (<= t_0 1e-9)
               (/ 1.0 (* x 12.000000000000048))
               (* z (* z (/ (+ 0.0007936500793651 y) x)))))))
        double code(double x, double y, double z) {
        	double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
        	double tmp;
        	if (t_0 <= -1e+17) {
        		tmp = y * (z * (z / x));
        	} else if (t_0 <= 1e-9) {
        		tmp = 1.0 / (x * 12.000000000000048);
        	} else {
        		tmp = z * (z * ((0.0007936500793651 + y) / x));
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: t_0
            real(8) :: tmp
            t_0 = z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)
            if (t_0 <= (-1d+17)) then
                tmp = y * (z * (z / x))
            else if (t_0 <= 1d-9) then
                tmp = 1.0d0 / (x * 12.000000000000048d0)
            else
                tmp = z * (z * ((0.0007936500793651d0 + y) / x))
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
        	double tmp;
        	if (t_0 <= -1e+17) {
        		tmp = y * (z * (z / x));
        	} else if (t_0 <= 1e-9) {
        		tmp = 1.0 / (x * 12.000000000000048);
        	} else {
        		tmp = z * (z * ((0.0007936500793651 + y) / x));
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)
        	tmp = 0
        	if t_0 <= -1e+17:
        		tmp = y * (z * (z / x))
        	elif t_0 <= 1e-9:
        		tmp = 1.0 / (x * 12.000000000000048)
        	else:
        		tmp = z * (z * ((0.0007936500793651 + y) / x))
        	return tmp
        
        function code(x, y, z)
        	t_0 = Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))
        	tmp = 0.0
        	if (t_0 <= -1e+17)
        		tmp = Float64(y * Float64(z * Float64(z / x)));
        	elseif (t_0 <= 1e-9)
        		tmp = Float64(1.0 / Float64(x * 12.000000000000048));
        	else
        		tmp = Float64(z * Float64(z * Float64(Float64(0.0007936500793651 + y) / x)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
        	tmp = 0.0;
        	if (t_0 <= -1e+17)
        		tmp = y * (z * (z / x));
        	elseif (t_0 <= 1e-9)
        		tmp = 1.0 / (x * 12.000000000000048);
        	else
        		tmp = z * (z * ((0.0007936500793651 + y) / x));
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+17], N[(y * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e-9], N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision], N[(z * N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\
        \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+17}:\\
        \;\;\;\;y \cdot \left(z \cdot \frac{z}{x}\right)\\
        
        \mathbf{elif}\;t\_0 \leq 10^{-9}:\\
        \;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\
        
        \mathbf{else}:\\
        \;\;\;\;z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -1e17

          1. Initial program 80.7%

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

            \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
          4. Step-by-step derivation
            1. associate-/l*N/A

              \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
            3. /-lowering-/.f64N/A

              \[\leadsto y \cdot \color{blue}{\frac{{z}^{2}}{x}} \]
            4. unpow2N/A

              \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]
            5. *-lowering-*.f6483.6

              \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]
          5. Simplified83.6%

            \[\leadsto \color{blue}{y \cdot \frac{z \cdot z}{x}} \]
          6. Step-by-step derivation
            1. associate-*l/N/A

              \[\leadsto y \cdot \color{blue}{\left(\frac{z}{x} \cdot z\right)} \]
            2. *-lowering-*.f64N/A

              \[\leadsto y \cdot \color{blue}{\left(\frac{z}{x} \cdot z\right)} \]
            3. /-lowering-/.f6486.5

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

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

          if -1e17 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 1.00000000000000006e-9

          1. Initial program 99.4%

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

            \[\leadsto \color{blue}{y \cdot \left(\left(\frac{\frac{83333333333333}{1000000000000000}}{x \cdot y} + \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \left(\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
          4. Simplified77.2%

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

            \[\leadsto \color{blue}{y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) + \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}} \]
          6. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)} \]
            2. +-lowering-+.f64N/A

              \[\leadsto \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)} \]
            3. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} \cdot 1}{x}} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            4. metadata-evalN/A

              \[\leadsto \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            6. associate--l+N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + y \cdot \color{blue}{\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            7. distribute-lft-inN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(y \cdot \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y}\right) + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(y \cdot \color{blue}{\left(\frac{1}{y} \cdot \frac{91893853320467}{100000000000000}\right)} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            9. associate-*r*N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\left(y \cdot \frac{1}{y}\right) \cdot \frac{91893853320467}{100000000000000}} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            10. rgt-mult-inverseN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{1} \cdot \frac{91893853320467}{100000000000000} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            11. metadata-evalN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\frac{91893853320467}{100000000000000}} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            12. +-lowering-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(\frac{91893853320467}{100000000000000} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            13. *-lowering-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\frac{91893853320467}{100000000000000} + \color{blue}{y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)}\right) \]
            14. --lowering--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\frac{91893853320467}{100000000000000} + y \cdot \color{blue}{\left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)}\right) \]
          7. Simplified79.8%

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

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
          9. Step-by-step derivation
            1. /-lowering-/.f6445.0

              \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
          10. Simplified45.0%

            \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
          11. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
            3. div-invN/A

              \[\leadsto \frac{1}{\color{blue}{x \cdot \frac{1}{\frac{83333333333333}{1000000000000000}}}} \]
            4. *-lowering-*.f64N/A

              \[\leadsto \frac{1}{\color{blue}{x \cdot \frac{1}{\frac{83333333333333}{1000000000000000}}}} \]
            5. metadata-eval45.1

              \[\leadsto \frac{1}{x \cdot \color{blue}{12.000000000000048}} \]
          12. Applied egg-rr45.1%

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

          if 1.00000000000000006e-9 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z)

          1. Initial program 88.6%

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

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
          4. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
            2. associate-+r+N/A

              \[\leadsto \frac{\color{blue}{\left(\frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}}{x} \]
            3. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \left(\frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}}{x} \]
            4. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}}{x} \]
            5. sub-negN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            6. metadata-evalN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            7. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            8. +-lowering-+.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{7936500793651}{10000000000000000} + y}, \frac{-13888888888889}{5000000000000000}\right), \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + \frac{83333333333333}{1000000000000000}}\right)}{x} \]
            10. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{\mathsf{fma}\left(x, \frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x, \frac{83333333333333}{1000000000000000}\right)}\right)}{x} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \mathsf{fma}\left(x, \color{blue}{\frac{-1}{2} \cdot \log x + \frac{91893853320467}{100000000000000}}, \frac{83333333333333}{1000000000000000}\right)\right)}{x} \]
            12. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \log x, \frac{91893853320467}{100000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)\right)}{x} \]
            13. log-lowering-log.f6469.2

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

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

            \[\leadsto \color{blue}{\frac{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}} \]
          7. Step-by-step derivation
            1. associate-/l*N/A

              \[\leadsto \color{blue}{{z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}} \]
            2. unpow2N/A

              \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x} \]
            3. associate-*l*N/A

              \[\leadsto \color{blue}{z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right)} \]
            4. associate-/l*N/A

              \[\leadsto z \cdot \color{blue}{\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}} \]
            5. distribute-rgt-inN/A

              \[\leadsto z \cdot \frac{\color{blue}{\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z}}{x} \]
            6. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{z \cdot \frac{\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z}{x}} \]
            7. distribute-rgt-inN/A

              \[\leadsto z \cdot \frac{\color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}}{x} \]
            8. associate-/l*N/A

              \[\leadsto z \cdot \color{blue}{\left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right)} \]
            9. *-lowering-*.f64N/A

              \[\leadsto z \cdot \color{blue}{\left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right)} \]
            10. /-lowering-/.f64N/A

              \[\leadsto z \cdot \left(z \cdot \color{blue}{\frac{\frac{7936500793651}{10000000000000000} + y}{x}}\right) \]
            11. +-lowering-+.f6472.5

              \[\leadsto z \cdot \left(z \cdot \frac{\color{blue}{0.0007936500793651 + y}}{x}\right) \]
          8. Simplified72.5%

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

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

        Alternative 13: 58.5% accurate, 2.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+17}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+18}:\\ \;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(z \cdot \frac{0.0007936500793651}{x}\right)\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (let* ((t_0 (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))))
           (if (<= t_0 -1e+17)
             (* y (* z (/ z x)))
             (if (<= t_0 4e+18)
               (/ 1.0 (* x 12.000000000000048))
               (* z (* z (/ 0.0007936500793651 x)))))))
        double code(double x, double y, double z) {
        	double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
        	double tmp;
        	if (t_0 <= -1e+17) {
        		tmp = y * (z * (z / x));
        	} else if (t_0 <= 4e+18) {
        		tmp = 1.0 / (x * 12.000000000000048);
        	} else {
        		tmp = z * (z * (0.0007936500793651 / x));
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: t_0
            real(8) :: tmp
            t_0 = z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)
            if (t_0 <= (-1d+17)) then
                tmp = y * (z * (z / x))
            else if (t_0 <= 4d+18) then
                tmp = 1.0d0 / (x * 12.000000000000048d0)
            else
                tmp = z * (z * (0.0007936500793651d0 / x))
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
        	double tmp;
        	if (t_0 <= -1e+17) {
        		tmp = y * (z * (z / x));
        	} else if (t_0 <= 4e+18) {
        		tmp = 1.0 / (x * 12.000000000000048);
        	} else {
        		tmp = z * (z * (0.0007936500793651 / x));
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)
        	tmp = 0
        	if t_0 <= -1e+17:
        		tmp = y * (z * (z / x))
        	elif t_0 <= 4e+18:
        		tmp = 1.0 / (x * 12.000000000000048)
        	else:
        		tmp = z * (z * (0.0007936500793651 / x))
        	return tmp
        
        function code(x, y, z)
        	t_0 = Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))
        	tmp = 0.0
        	if (t_0 <= -1e+17)
        		tmp = Float64(y * Float64(z * Float64(z / x)));
        	elseif (t_0 <= 4e+18)
        		tmp = Float64(1.0 / Float64(x * 12.000000000000048));
        	else
        		tmp = Float64(z * Float64(z * Float64(0.0007936500793651 / x)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
        	tmp = 0.0;
        	if (t_0 <= -1e+17)
        		tmp = y * (z * (z / x));
        	elseif (t_0 <= 4e+18)
        		tmp = 1.0 / (x * 12.000000000000048);
        	else
        		tmp = z * (z * (0.0007936500793651 / x));
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+17], N[(y * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+18], N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision], N[(z * N[(z * N[(0.0007936500793651 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\
        \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+17}:\\
        \;\;\;\;y \cdot \left(z \cdot \frac{z}{x}\right)\\
        
        \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+18}:\\
        \;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\
        
        \mathbf{else}:\\
        \;\;\;\;z \cdot \left(z \cdot \frac{0.0007936500793651}{x}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -1e17

          1. Initial program 80.7%

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

            \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
          4. Step-by-step derivation
            1. associate-/l*N/A

              \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
            3. /-lowering-/.f64N/A

              \[\leadsto y \cdot \color{blue}{\frac{{z}^{2}}{x}} \]
            4. unpow2N/A

              \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]
            5. *-lowering-*.f6483.6

              \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]
          5. Simplified83.6%

            \[\leadsto \color{blue}{y \cdot \frac{z \cdot z}{x}} \]
          6. Step-by-step derivation
            1. associate-*l/N/A

              \[\leadsto y \cdot \color{blue}{\left(\frac{z}{x} \cdot z\right)} \]
            2. *-lowering-*.f64N/A

              \[\leadsto y \cdot \color{blue}{\left(\frac{z}{x} \cdot z\right)} \]
            3. /-lowering-/.f6486.5

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

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

          if -1e17 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 4e18

          1. Initial program 99.4%

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

            \[\leadsto \color{blue}{y \cdot \left(\left(\frac{\frac{83333333333333}{1000000000000000}}{x \cdot y} + \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \left(\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
          4. Simplified77.1%

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

            \[\leadsto \color{blue}{y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) + \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}} \]
          6. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)} \]
            2. +-lowering-+.f64N/A

              \[\leadsto \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)} \]
            3. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} \cdot 1}{x}} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            4. metadata-evalN/A

              \[\leadsto \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            6. associate--l+N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + y \cdot \color{blue}{\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            7. distribute-lft-inN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(y \cdot \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y}\right) + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(y \cdot \color{blue}{\left(\frac{1}{y} \cdot \frac{91893853320467}{100000000000000}\right)} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            9. associate-*r*N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\left(y \cdot \frac{1}{y}\right) \cdot \frac{91893853320467}{100000000000000}} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            10. rgt-mult-inverseN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{1} \cdot \frac{91893853320467}{100000000000000} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            11. metadata-evalN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\frac{91893853320467}{100000000000000}} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            12. +-lowering-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(\frac{91893853320467}{100000000000000} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            13. *-lowering-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\frac{91893853320467}{100000000000000} + \color{blue}{y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)}\right) \]
            14. --lowering--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\frac{91893853320467}{100000000000000} + y \cdot \color{blue}{\left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)}\right) \]
          7. Simplified78.2%

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

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
          9. Step-by-step derivation
            1. /-lowering-/.f6443.8

              \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
          10. Simplified43.8%

            \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
          11. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
            3. div-invN/A

              \[\leadsto \frac{1}{\color{blue}{x \cdot \frac{1}{\frac{83333333333333}{1000000000000000}}}} \]
            4. *-lowering-*.f64N/A

              \[\leadsto \frac{1}{\color{blue}{x \cdot \frac{1}{\frac{83333333333333}{1000000000000000}}}} \]
            5. metadata-eval43.8

              \[\leadsto \frac{1}{x \cdot \color{blue}{12.000000000000048}} \]
          12. Applied egg-rr43.8%

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

          if 4e18 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z)

          1. Initial program 88.2%

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

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
          4. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
            2. associate-+r+N/A

              \[\leadsto \frac{\color{blue}{\left(\frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}}{x} \]
            3. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \left(\frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}}{x} \]
            4. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}}{x} \]
            5. sub-negN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            6. metadata-evalN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            7. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            8. +-lowering-+.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{7936500793651}{10000000000000000} + y}, \frac{-13888888888889}{5000000000000000}\right), \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + \frac{83333333333333}{1000000000000000}}\right)}{x} \]
            10. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{\mathsf{fma}\left(x, \frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x, \frac{83333333333333}{1000000000000000}\right)}\right)}{x} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \mathsf{fma}\left(x, \color{blue}{\frac{-1}{2} \cdot \log x + \frac{91893853320467}{100000000000000}}, \frac{83333333333333}{1000000000000000}\right)\right)}{x} \]
            12. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \log x, \frac{91893853320467}{100000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)\right)}{x} \]
            13. log-lowering-log.f6470.0

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

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

            \[\leadsto \frac{\color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}}{x} \]
          7. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \frac{\color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}}{x} \]
            2. unpow2N/A

              \[\leadsto \frac{\color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} \]
            3. *-lowering-*.f64N/A

              \[\leadsto \frac{\color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} \]
            4. +-lowering-+.f6471.2

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

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

            \[\leadsto \color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{{z}^{2}}{x}} \]
          10. Step-by-step derivation
            1. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot {z}^{2}}{x}} \]
            2. *-commutativeN/A

              \[\leadsto \frac{\color{blue}{{z}^{2} \cdot \frac{7936500793651}{10000000000000000}}}{x} \]
            3. associate-*r/N/A

              \[\leadsto \color{blue}{{z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000}}{x}} \]
            4. metadata-evalN/A

              \[\leadsto {z}^{2} \cdot \frac{\color{blue}{\frac{7936500793651}{10000000000000000} \cdot 1}}{x} \]
            5. associate-*r/N/A

              \[\leadsto {z}^{2} \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)} \]
            6. unpow2N/A

              \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \]
            7. associate-*l*N/A

              \[\leadsto \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)\right)} \]
            8. associate-*r/N/A

              \[\leadsto z \cdot \left(z \cdot \color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}}\right) \]
            9. metadata-evalN/A

              \[\leadsto z \cdot \left(z \cdot \frac{\color{blue}{\frac{7936500793651}{10000000000000000}}}{x}\right) \]
            10. associate-*r/N/A

              \[\leadsto z \cdot \color{blue}{\frac{z \cdot \frac{7936500793651}{10000000000000000}}{x}} \]
            11. associate-*l/N/A

              \[\leadsto z \cdot \color{blue}{\left(\frac{z}{x} \cdot \frac{7936500793651}{10000000000000000}\right)} \]
            12. *-commutativeN/A

              \[\leadsto z \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x}\right)} \]
            13. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x}\right)} \]
            14. *-commutativeN/A

              \[\leadsto z \cdot \color{blue}{\left(\frac{z}{x} \cdot \frac{7936500793651}{10000000000000000}\right)} \]
            15. associate-*l/N/A

              \[\leadsto z \cdot \color{blue}{\frac{z \cdot \frac{7936500793651}{10000000000000000}}{x}} \]
            16. associate-*r/N/A

              \[\leadsto z \cdot \color{blue}{\left(z \cdot \frac{\frac{7936500793651}{10000000000000000}}{x}\right)} \]
            17. metadata-evalN/A

              \[\leadsto z \cdot \left(z \cdot \frac{\color{blue}{\frac{7936500793651}{10000000000000000} \cdot 1}}{x}\right) \]
            18. associate-*r/N/A

              \[\leadsto z \cdot \left(z \cdot \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)}\right) \]
            19. *-lowering-*.f64N/A

              \[\leadsto z \cdot \color{blue}{\left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right)\right)} \]
            20. associate-*r/N/A

              \[\leadsto z \cdot \left(z \cdot \color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}}\right) \]
            21. metadata-evalN/A

              \[\leadsto z \cdot \left(z \cdot \frac{\color{blue}{\frac{7936500793651}{10000000000000000}}}{x}\right) \]
            22. /-lowering-/.f6460.2

              \[\leadsto z \cdot \left(z \cdot \color{blue}{\frac{0.0007936500793651}{x}}\right) \]
          11. Simplified60.2%

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

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

        Alternative 14: 58.3% accurate, 2.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+17}:\\ \;\;\;\;y \cdot \left(z \cdot \frac{z}{x}\right)\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+18}:\\ \;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\ \mathbf{else}:\\ \;\;\;\;0.0007936500793651 \cdot \frac{z \cdot z}{x}\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (let* ((t_0 (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))))
           (if (<= t_0 -1e+17)
             (* y (* z (/ z x)))
             (if (<= t_0 4e+18)
               (/ 1.0 (* x 12.000000000000048))
               (* 0.0007936500793651 (/ (* z z) x))))))
        double code(double x, double y, double z) {
        	double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
        	double tmp;
        	if (t_0 <= -1e+17) {
        		tmp = y * (z * (z / x));
        	} else if (t_0 <= 4e+18) {
        		tmp = 1.0 / (x * 12.000000000000048);
        	} else {
        		tmp = 0.0007936500793651 * ((z * z) / x);
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: t_0
            real(8) :: tmp
            t_0 = z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0)
            if (t_0 <= (-1d+17)) then
                tmp = y * (z * (z / x))
            else if (t_0 <= 4d+18) then
                tmp = 1.0d0 / (x * 12.000000000000048d0)
            else
                tmp = 0.0007936500793651d0 * ((z * z) / x)
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
        	double tmp;
        	if (t_0 <= -1e+17) {
        		tmp = y * (z * (z / x));
        	} else if (t_0 <= 4e+18) {
        		tmp = 1.0 / (x * 12.000000000000048);
        	} else {
        		tmp = 0.0007936500793651 * ((z * z) / x);
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778)
        	tmp = 0
        	if t_0 <= -1e+17:
        		tmp = y * (z * (z / x))
        	elif t_0 <= 4e+18:
        		tmp = 1.0 / (x * 12.000000000000048)
        	else:
        		tmp = 0.0007936500793651 * ((z * z) / x)
        	return tmp
        
        function code(x, y, z)
        	t_0 = Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))
        	tmp = 0.0
        	if (t_0 <= -1e+17)
        		tmp = Float64(y * Float64(z * Float64(z / x)));
        	elseif (t_0 <= 4e+18)
        		tmp = Float64(1.0 / Float64(x * 12.000000000000048));
        	else
        		tmp = Float64(0.0007936500793651 * Float64(Float64(z * z) / x));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	t_0 = z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778);
        	tmp = 0.0;
        	if (t_0 <= -1e+17)
        		tmp = y * (z * (z / x));
        	elseif (t_0 <= 4e+18)
        		tmp = 1.0 / (x * 12.000000000000048);
        	else
        		tmp = 0.0007936500793651 * ((z * z) / x);
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+17], N[(y * N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+18], N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision], N[(0.0007936500793651 * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)\\
        \mathbf{if}\;t\_0 \leq -1 \cdot 10^{+17}:\\
        \;\;\;\;y \cdot \left(z \cdot \frac{z}{x}\right)\\
        
        \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+18}:\\
        \;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\
        
        \mathbf{else}:\\
        \;\;\;\;0.0007936500793651 \cdot \frac{z \cdot z}{x}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -1e17

          1. Initial program 80.7%

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

            \[\leadsto \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
          4. Step-by-step derivation
            1. associate-/l*N/A

              \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{y \cdot \frac{{z}^{2}}{x}} \]
            3. /-lowering-/.f64N/A

              \[\leadsto y \cdot \color{blue}{\frac{{z}^{2}}{x}} \]
            4. unpow2N/A

              \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]
            5. *-lowering-*.f6483.6

              \[\leadsto y \cdot \frac{\color{blue}{z \cdot z}}{x} \]
          5. Simplified83.6%

            \[\leadsto \color{blue}{y \cdot \frac{z \cdot z}{x}} \]
          6. Step-by-step derivation
            1. associate-*l/N/A

              \[\leadsto y \cdot \color{blue}{\left(\frac{z}{x} \cdot z\right)} \]
            2. *-lowering-*.f64N/A

              \[\leadsto y \cdot \color{blue}{\left(\frac{z}{x} \cdot z\right)} \]
            3. /-lowering-/.f6486.5

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

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

          if -1e17 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 4e18

          1. Initial program 99.4%

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

            \[\leadsto \color{blue}{y \cdot \left(\left(\frac{\frac{83333333333333}{1000000000000000}}{x \cdot y} + \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \left(\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
          4. Simplified77.1%

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

            \[\leadsto \color{blue}{y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) + \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}} \]
          6. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)} \]
            2. +-lowering-+.f64N/A

              \[\leadsto \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)} \]
            3. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} \cdot 1}{x}} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            4. metadata-evalN/A

              \[\leadsto \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            6. associate--l+N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + y \cdot \color{blue}{\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            7. distribute-lft-inN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(y \cdot \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y}\right) + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(y \cdot \color{blue}{\left(\frac{1}{y} \cdot \frac{91893853320467}{100000000000000}\right)} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            9. associate-*r*N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\left(y \cdot \frac{1}{y}\right) \cdot \frac{91893853320467}{100000000000000}} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            10. rgt-mult-inverseN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{1} \cdot \frac{91893853320467}{100000000000000} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            11. metadata-evalN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\frac{91893853320467}{100000000000000}} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            12. +-lowering-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(\frac{91893853320467}{100000000000000} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            13. *-lowering-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\frac{91893853320467}{100000000000000} + \color{blue}{y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)}\right) \]
            14. --lowering--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\frac{91893853320467}{100000000000000} + y \cdot \color{blue}{\left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)}\right) \]
          7. Simplified78.2%

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

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
          9. Step-by-step derivation
            1. /-lowering-/.f6443.8

              \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
          10. Simplified43.8%

            \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
          11. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
            3. div-invN/A

              \[\leadsto \frac{1}{\color{blue}{x \cdot \frac{1}{\frac{83333333333333}{1000000000000000}}}} \]
            4. *-lowering-*.f64N/A

              \[\leadsto \frac{1}{\color{blue}{x \cdot \frac{1}{\frac{83333333333333}{1000000000000000}}}} \]
            5. metadata-eval43.8

              \[\leadsto \frac{1}{x \cdot \color{blue}{12.000000000000048}} \]
          12. Applied egg-rr43.8%

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

          if 4e18 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z)

          1. Initial program 88.2%

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

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
          4. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
            2. associate-+r+N/A

              \[\leadsto \frac{\color{blue}{\left(\frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}}{x} \]
            3. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \left(\frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}}{x} \]
            4. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}}{x} \]
            5. sub-negN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            6. metadata-evalN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            7. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            8. +-lowering-+.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{7936500793651}{10000000000000000} + y}, \frac{-13888888888889}{5000000000000000}\right), \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + \frac{83333333333333}{1000000000000000}}\right)}{x} \]
            10. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{\mathsf{fma}\left(x, \frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x, \frac{83333333333333}{1000000000000000}\right)}\right)}{x} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \mathsf{fma}\left(x, \color{blue}{\frac{-1}{2} \cdot \log x + \frac{91893853320467}{100000000000000}}, \frac{83333333333333}{1000000000000000}\right)\right)}{x} \]
            12. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \log x, \frac{91893853320467}{100000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)\right)}{x} \]
            13. log-lowering-log.f6470.0

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

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

            \[\leadsto \frac{\color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}}{x} \]
          7. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \frac{\color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}}{x} \]
            2. unpow2N/A

              \[\leadsto \frac{\color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} \]
            3. *-lowering-*.f64N/A

              \[\leadsto \frac{\color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} \]
            4. +-lowering-+.f6471.2

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

            \[\leadsto \frac{\color{blue}{\left(z \cdot z\right) \cdot \left(0.0007936500793651 + y\right)}}{x} \]
          9. Step-by-step derivation
            1. distribute-rgt-inN/A

              \[\leadsto \frac{\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \left(z \cdot z\right) + y \cdot \left(z \cdot z\right)}}{x} \]
            2. flip-+N/A

              \[\leadsto \frac{\color{blue}{\frac{\left(\frac{7936500793651}{10000000000000000} \cdot \left(z \cdot z\right)\right) \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \left(z \cdot z\right)\right) - \left(y \cdot \left(z \cdot z\right)\right) \cdot \left(y \cdot \left(z \cdot z\right)\right)}{\frac{7936500793651}{10000000000000000} \cdot \left(z \cdot z\right) - y \cdot \left(z \cdot z\right)}}}{x} \]
            3. /-lowering-/.f64N/A

              \[\leadsto \frac{\color{blue}{\frac{\left(\frac{7936500793651}{10000000000000000} \cdot \left(z \cdot z\right)\right) \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \left(z \cdot z\right)\right) - \left(y \cdot \left(z \cdot z\right)\right) \cdot \left(y \cdot \left(z \cdot z\right)\right)}{\frac{7936500793651}{10000000000000000} \cdot \left(z \cdot z\right) - y \cdot \left(z \cdot z\right)}}}{x} \]
          10. Applied egg-rr22.3%

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

            \[\leadsto \color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{{z}^{2}}{x}} \]
          12. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{{z}^{2}}{x}} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \frac{7936500793651}{10000000000000000} \cdot \color{blue}{\frac{{z}^{2}}{x}} \]
            3. unpow2N/A

              \[\leadsto \frac{7936500793651}{10000000000000000} \cdot \frac{\color{blue}{z \cdot z}}{x} \]
            4. *-lowering-*.f6459.6

              \[\leadsto 0.0007936500793651 \cdot \frac{\color{blue}{z \cdot z}}{x} \]
          13. Simplified59.6%

            \[\leadsto \color{blue}{0.0007936500793651 \cdot \frac{z \cdot z}{x}} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification55.1%

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

        Alternative 15: 46.5% accurate, 3.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right) \leq 4 \cdot 10^{+18}:\\ \;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\ \mathbf{else}:\\ \;\;\;\;0.0007936500793651 \cdot \frac{z \cdot z}{x}\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<=
              (+
               0.083333333333333
               (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
              4e+18)
           (/ 1.0 (* x 12.000000000000048))
           (* 0.0007936500793651 (/ (* z z) x))))
        double code(double x, double y, double z) {
        	double tmp;
        	if ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) <= 4e+18) {
        		tmp = 1.0 / (x * 12.000000000000048);
        	} else {
        		tmp = 0.0007936500793651 * ((z * z) / x);
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: tmp
            if ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) <= 4d+18) then
                tmp = 1.0d0 / (x * 12.000000000000048d0)
            else
                tmp = 0.0007936500793651d0 * ((z * z) / x)
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) <= 4e+18) {
        		tmp = 1.0 / (x * 12.000000000000048);
        	} else {
        		tmp = 0.0007936500793651 * ((z * z) / x);
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) <= 4e+18:
        		tmp = 1.0 / (x * 12.000000000000048)
        	else:
        		tmp = 0.0007936500793651 * ((z * z) / x)
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) <= 4e+18)
        		tmp = Float64(1.0 / Float64(x * 12.000000000000048));
        	else
        		tmp = Float64(0.0007936500793651 * Float64(Float64(z * z) / x));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) <= 4e+18)
        		tmp = 1.0 / (x * 12.000000000000048);
        	else
        		tmp = 0.0007936500793651 * ((z * z) / x);
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[LessEqual[N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 4e+18], N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision], N[(0.0007936500793651 * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right) \leq 4 \cdot 10^{+18}:\\
        \;\;\;\;\frac{1}{x \cdot 12.000000000000048}\\
        
        \mathbf{else}:\\
        \;\;\;\;0.0007936500793651 \cdot \frac{z \cdot z}{x}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < 4e18

          1. Initial program 95.8%

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

            \[\leadsto \color{blue}{y \cdot \left(\left(\frac{\frac{83333333333333}{1000000000000000}}{x \cdot y} + \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \left(\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
          4. Simplified81.5%

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

            \[\leadsto \color{blue}{y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) + \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}} \]
          6. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)} \]
            2. +-lowering-+.f64N/A

              \[\leadsto \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)} \]
            3. associate-*r/N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} \cdot 1}{x}} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            4. metadata-evalN/A

              \[\leadsto \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
            6. associate--l+N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + y \cdot \color{blue}{\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            7. distribute-lft-inN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(y \cdot \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y}\right) + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            8. *-commutativeN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(y \cdot \color{blue}{\left(\frac{1}{y} \cdot \frac{91893853320467}{100000000000000}\right)} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            9. associate-*r*N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\left(y \cdot \frac{1}{y}\right) \cdot \frac{91893853320467}{100000000000000}} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            10. rgt-mult-inverseN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{1} \cdot \frac{91893853320467}{100000000000000} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            11. metadata-evalN/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\frac{91893853320467}{100000000000000}} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
            12. +-lowering-+.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(\frac{91893853320467}{100000000000000} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
            13. *-lowering-*.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\frac{91893853320467}{100000000000000} + \color{blue}{y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)}\right) \]
            14. --lowering--.f64N/A

              \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\frac{91893853320467}{100000000000000} + y \cdot \color{blue}{\left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)}\right) \]
          7. Simplified65.6%

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

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
          9. Step-by-step derivation
            1. /-lowering-/.f6435.5

              \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
          10. Simplified35.5%

            \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
          11. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
            3. div-invN/A

              \[\leadsto \frac{1}{\color{blue}{x \cdot \frac{1}{\frac{83333333333333}{1000000000000000}}}} \]
            4. *-lowering-*.f64N/A

              \[\leadsto \frac{1}{\color{blue}{x \cdot \frac{1}{\frac{83333333333333}{1000000000000000}}}} \]
            5. metadata-eval35.5

              \[\leadsto \frac{1}{x \cdot \color{blue}{12.000000000000048}} \]
          12. Applied egg-rr35.5%

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

          if 4e18 < (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64))

          1. Initial program 88.2%

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

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
          4. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
            2. associate-+r+N/A

              \[\leadsto \frac{\color{blue}{\left(\frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}}{x} \]
            3. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \left(\frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}}{x} \]
            4. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}}{x} \]
            5. sub-negN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            6. metadata-evalN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            7. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            8. +-lowering-+.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{7936500793651}{10000000000000000} + y}, \frac{-13888888888889}{5000000000000000}\right), \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + \frac{83333333333333}{1000000000000000}}\right)}{x} \]
            10. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{\mathsf{fma}\left(x, \frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x, \frac{83333333333333}{1000000000000000}\right)}\right)}{x} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \mathsf{fma}\left(x, \color{blue}{\frac{-1}{2} \cdot \log x + \frac{91893853320467}{100000000000000}}, \frac{83333333333333}{1000000000000000}\right)\right)}{x} \]
            12. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \log x, \frac{91893853320467}{100000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)\right)}{x} \]
            13. log-lowering-log.f6470.0

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

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

            \[\leadsto \frac{\color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}}{x} \]
          7. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \frac{\color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}}{x} \]
            2. unpow2N/A

              \[\leadsto \frac{\color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} \]
            3. *-lowering-*.f64N/A

              \[\leadsto \frac{\color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x} \]
            4. +-lowering-+.f6471.2

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

            \[\leadsto \frac{\color{blue}{\left(z \cdot z\right) \cdot \left(0.0007936500793651 + y\right)}}{x} \]
          9. Step-by-step derivation
            1. distribute-rgt-inN/A

              \[\leadsto \frac{\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \left(z \cdot z\right) + y \cdot \left(z \cdot z\right)}}{x} \]
            2. flip-+N/A

              \[\leadsto \frac{\color{blue}{\frac{\left(\frac{7936500793651}{10000000000000000} \cdot \left(z \cdot z\right)\right) \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \left(z \cdot z\right)\right) - \left(y \cdot \left(z \cdot z\right)\right) \cdot \left(y \cdot \left(z \cdot z\right)\right)}{\frac{7936500793651}{10000000000000000} \cdot \left(z \cdot z\right) - y \cdot \left(z \cdot z\right)}}}{x} \]
            3. /-lowering-/.f64N/A

              \[\leadsto \frac{\color{blue}{\frac{\left(\frac{7936500793651}{10000000000000000} \cdot \left(z \cdot z\right)\right) \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \left(z \cdot z\right)\right) - \left(y \cdot \left(z \cdot z\right)\right) \cdot \left(y \cdot \left(z \cdot z\right)\right)}{\frac{7936500793651}{10000000000000000} \cdot \left(z \cdot z\right) - y \cdot \left(z \cdot z\right)}}}{x} \]
          10. Applied egg-rr22.3%

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

            \[\leadsto \color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{{z}^{2}}{x}} \]
          12. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{{z}^{2}}{x}} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \frac{7936500793651}{10000000000000000} \cdot \color{blue}{\frac{{z}^{2}}{x}} \]
            3. unpow2N/A

              \[\leadsto \frac{7936500793651}{10000000000000000} \cdot \frac{\color{blue}{z \cdot z}}{x} \]
            4. *-lowering-*.f6459.6

              \[\leadsto 0.0007936500793651 \cdot \frac{\color{blue}{z \cdot z}}{x} \]
          13. Simplified59.6%

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

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

        Alternative 16: 66.0% accurate, 4.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.55 \cdot 10^{+41}:\\ \;\;\;\;0.91893853320467 + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right)\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= x 2.55e+41)
           (+
            0.91893853320467
            (/
             (fma
              z
              (fma z (+ 0.0007936500793651 y) -0.0027777777777778)
              0.083333333333333)
             x))
           (+ 0.91893853320467 (* z (* (/ z x) (+ 0.0007936500793651 y))))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (x <= 2.55e+41) {
        		tmp = 0.91893853320467 + (fma(z, fma(z, (0.0007936500793651 + y), -0.0027777777777778), 0.083333333333333) / x);
        	} else {
        		tmp = 0.91893853320467 + (z * ((z / x) * (0.0007936500793651 + y)));
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (x <= 2.55e+41)
        		tmp = Float64(0.91893853320467 + Float64(fma(z, fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778), 0.083333333333333) / x));
        	else
        		tmp = Float64(0.91893853320467 + Float64(z * Float64(Float64(z / x) * Float64(0.0007936500793651 + y))));
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[x, 2.55e+41], N[(0.91893853320467 + N[(N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(0.91893853320467 + N[(z * N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq 2.55 \cdot 10^{+41}:\\
        \;\;\;\;0.91893853320467 + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\
        
        \mathbf{else}:\\
        \;\;\;\;0.91893853320467 + z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 2.54999999999999989e41

          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. Taylor expanded in y around 0

            \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
          4. Simplified88.7%

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

            \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          6. Step-by-step derivation
            1. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(\color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)} - \frac{13888888888889}{5000000000000000}\right)}{x} \]
            2. /-lowering-/.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
            3. +-commutativeN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
            4. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{z \cdot \left(\color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right)} - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}{x} \]
            5. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\color{blue}{\mathsf{fma}\left(z, \left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000}\right)}}{x} \]
            6. sub-negN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{\left(\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            7. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)} + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right), \frac{83333333333333}{1000000000000000}\right)}{x} \]
            8. metadata-evalN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            9. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            10. +-lowering-+.f6490.8

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

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

          if 2.54999999999999989e41 < x

          1. Initial program 84.0%

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

            \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
          4. Simplified99.6%

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

            \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
          6. Step-by-step derivation
            1. unpow2N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \]
            2. associate-*l*N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} \]
            3. *-lowering-*.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} \]
            4. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \color{blue}{\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} \]
            5. associate-*r/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}} \cdot z + \frac{y}{x} \cdot z\right) \]
            6. metadata-evalN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\frac{\color{blue}{\frac{7936500793651}{10000000000000000}}}{x} \cdot z + \frac{y}{x} \cdot z\right) \]
            7. associate-*l/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x}} + \frac{y}{x} \cdot z\right) \]
            8. associate-*r/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) \]
            9. associate-*l/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) \]
            10. associate-/l*N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) \]
            11. distribute-rgt-outN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} \]
            12. *-lowering-*.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} \]
            13. /-lowering-/.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\color{blue}{\frac{z}{x}} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \]
            14. +-lowering-+.f6427.3

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

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

        Alternative 17: 66.0% accurate, 4.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.5:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;0.91893853320467 + z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right)\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= x 2.5)
           (/
            (fma
             z
             (fma z (+ 0.0007936500793651 y) -0.0027777777777778)
             0.083333333333333)
            x)
           (+ 0.91893853320467 (* z (* (/ z x) (+ 0.0007936500793651 y))))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (x <= 2.5) {
        		tmp = fma(z, fma(z, (0.0007936500793651 + y), -0.0027777777777778), 0.083333333333333) / x;
        	} else {
        		tmp = 0.91893853320467 + (z * ((z / x) * (0.0007936500793651 + y)));
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (x <= 2.5)
        		tmp = Float64(fma(z, fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778), 0.083333333333333) / x);
        	else
        		tmp = Float64(0.91893853320467 + Float64(z * Float64(Float64(z / x) * Float64(0.0007936500793651 + y))));
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[x, 2.5], N[(N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(0.91893853320467 + N[(z * N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq 2.5:\\
        \;\;\;\;\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\
        
        \mathbf{else}:\\
        \;\;\;\;0.91893853320467 + z \cdot \left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 2.5

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

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          4. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
            2. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
            3. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000}\right)}}{x} \]
            4. sub-negN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            5. metadata-evalN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            6. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            7. +-lowering-+.f6497.6

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

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

          if 2.5 < x

          1. Initial program 86.1%

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

            \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
          4. Simplified99.6%

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

            \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)} \]
          6. Step-by-step derivation
            1. unpow2N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\left(z \cdot z\right)} \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right) \]
            2. associate-*l*N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} \]
            3. *-lowering-*.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x} + \frac{y}{x}\right)\right)} \]
            4. distribute-rgt-inN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \color{blue}{\left(\left(\frac{7936500793651}{10000000000000000} \cdot \frac{1}{x}\right) \cdot z + \frac{y}{x} \cdot z\right)} \]
            5. associate-*r/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot 1}{x}} \cdot z + \frac{y}{x} \cdot z\right) \]
            6. metadata-evalN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\frac{\color{blue}{\frac{7936500793651}{10000000000000000}}}{x} \cdot z + \frac{y}{x} \cdot z\right) \]
            7. associate-*l/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\color{blue}{\frac{\frac{7936500793651}{10000000000000000} \cdot z}{x}} + \frac{y}{x} \cdot z\right) \]
            8. associate-*r/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\color{blue}{\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x}} + \frac{y}{x} \cdot z\right) \]
            9. associate-*l/N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{\frac{y \cdot z}{x}}\right) \]
            10. associate-/l*N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot \frac{z}{x} + \color{blue}{y \cdot \frac{z}{x}}\right) \]
            11. distribute-rgt-outN/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} \]
            12. *-lowering-*.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \color{blue}{\left(\frac{z}{x} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right)} \]
            13. /-lowering-/.f64N/A

              \[\leadsto \frac{91893853320467}{100000000000000} + z \cdot \left(\color{blue}{\frac{z}{x}} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)\right) \]
            14. +-lowering-+.f6429.5

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

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

        Alternative 18: 64.8% accurate, 4.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 5.8 \cdot 10^{+108}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= x 5.8e+108)
           (/
            (fma
             z
             (fma z (+ 0.0007936500793651 y) -0.0027777777777778)
             0.083333333333333)
            x)
           (* z (* z (/ (+ 0.0007936500793651 y) x)))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (x <= 5.8e+108) {
        		tmp = fma(z, fma(z, (0.0007936500793651 + y), -0.0027777777777778), 0.083333333333333) / x;
        	} else {
        		tmp = z * (z * ((0.0007936500793651 + y) / x));
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (x <= 5.8e+108)
        		tmp = Float64(fma(z, fma(z, Float64(0.0007936500793651 + y), -0.0027777777777778), 0.083333333333333) / x);
        	else
        		tmp = Float64(z * Float64(z * Float64(Float64(0.0007936500793651 + y) / x)));
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[x, 5.8e+108], N[(N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision] + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(z * N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq 5.8 \cdot 10^{+108}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0007936500793651 + y, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\
        
        \mathbf{else}:\\
        \;\;\;\;z \cdot \left(z \cdot \frac{0.0007936500793651 + y}{x}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 5.80000000000000015e108

          1. Initial program 99.6%

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

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
          4. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}{x}} \]
            2. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \frac{83333333333333}{1000000000000000}}}{x} \]
            3. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000}\right)}}{x} \]
            4. sub-negN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            5. metadata-evalN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            6. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)}{x} \]
            7. +-lowering-+.f6480.0

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

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

          if 5.80000000000000015e108 < x

          1. Initial program 77.6%

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

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
          4. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} + \left(x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)\right)}{x}} \]
            2. associate-+r+N/A

              \[\leadsto \frac{\color{blue}{\left(\frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right) + z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right)}}{x} \]
            3. +-commutativeN/A

              \[\leadsto \frac{\color{blue}{z \cdot \left(z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}\right) + \left(\frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}}{x} \]
            4. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) - \frac{13888888888889}{5000000000000000}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}}{x} \]
            5. sub-negN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \left(\mathsf{neg}\left(\frac{13888888888889}{5000000000000000}\right)\right)}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            6. metadata-evalN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right) + \color{blue}{\frac{-13888888888889}{5000000000000000}}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            7. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right)}, \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            8. +-lowering-+.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \color{blue}{\frac{7936500793651}{10000000000000000} + y}, \frac{-13888888888889}{5000000000000000}\right), \frac{83333333333333}{1000000000000000} + x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right)\right)}{x} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{x \cdot \left(\frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x\right) + \frac{83333333333333}{1000000000000000}}\right)}{x} \]
            10. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \color{blue}{\mathsf{fma}\left(x, \frac{91893853320467}{100000000000000} + \frac{-1}{2} \cdot \log x, \frac{83333333333333}{1000000000000000}\right)}\right)}{x} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \mathsf{fma}\left(x, \color{blue}{\frac{-1}{2} \cdot \log x + \frac{91893853320467}{100000000000000}}, \frac{83333333333333}{1000000000000000}\right)\right)}{x} \]
            12. accelerator-lowering-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \frac{7936500793651}{10000000000000000} + y, \frac{-13888888888889}{5000000000000000}\right), \mathsf{fma}\left(x, \color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \log x, \frac{91893853320467}{100000000000000}\right)}, \frac{83333333333333}{1000000000000000}\right)\right)}{x} \]
            13. log-lowering-log.f6411.5

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

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

            \[\leadsto \color{blue}{\frac{{z}^{2} \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}} \]
          7. Step-by-step derivation
            1. associate-/l*N/A

              \[\leadsto \color{blue}{{z}^{2} \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}} \]
            2. unpow2N/A

              \[\leadsto \color{blue}{\left(z \cdot z\right)} \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x} \]
            3. associate-*l*N/A

              \[\leadsto \color{blue}{z \cdot \left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right)} \]
            4. associate-/l*N/A

              \[\leadsto z \cdot \color{blue}{\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}{x}} \]
            5. distribute-rgt-inN/A

              \[\leadsto z \cdot \frac{\color{blue}{\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z}}{x} \]
            6. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{z \cdot \frac{\frac{7936500793651}{10000000000000000} \cdot z + y \cdot z}{x}} \]
            7. distribute-rgt-inN/A

              \[\leadsto z \cdot \frac{\color{blue}{z \cdot \left(\frac{7936500793651}{10000000000000000} + y\right)}}{x} \]
            8. associate-/l*N/A

              \[\leadsto z \cdot \color{blue}{\left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right)} \]
            9. *-lowering-*.f64N/A

              \[\leadsto z \cdot \color{blue}{\left(z \cdot \frac{\frac{7936500793651}{10000000000000000} + y}{x}\right)} \]
            10. /-lowering-/.f64N/A

              \[\leadsto z \cdot \left(z \cdot \color{blue}{\frac{\frac{7936500793651}{10000000000000000} + y}{x}}\right) \]
            11. +-lowering-+.f6423.3

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

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

        Alternative 19: 23.7% accurate, 8.7× speedup?

        \[\begin{array}{l} \\ \frac{1}{x \cdot 12.000000000000048} \end{array} \]
        (FPCore (x y z) :precision binary64 (/ 1.0 (* x 12.000000000000048)))
        double code(double x, double y, double z) {
        	return 1.0 / (x * 12.000000000000048);
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            code = 1.0d0 / (x * 12.000000000000048d0)
        end function
        
        public static double code(double x, double y, double z) {
        	return 1.0 / (x * 12.000000000000048);
        }
        
        def code(x, y, z):
        	return 1.0 / (x * 12.000000000000048)
        
        function code(x, y, z)
        	return Float64(1.0 / Float64(x * 12.000000000000048))
        end
        
        function tmp = code(x, y, z)
        	tmp = 1.0 / (x * 12.000000000000048);
        end
        
        code[x_, y_, z_] := N[(1.0 / N[(x * 12.000000000000048), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \frac{1}{x \cdot 12.000000000000048}
        \end{array}
        
        Derivation
        1. Initial program 92.8%

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

          \[\leadsto \color{blue}{y \cdot \left(\left(\frac{\frac{83333333333333}{1000000000000000}}{x \cdot y} + \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \left(\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
        4. Simplified81.1%

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

          \[\leadsto \color{blue}{y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) + \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}} \]
        6. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)} \]
          2. +-lowering-+.f64N/A

            \[\leadsto \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)} \]
          3. associate-*r/N/A

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} \cdot 1}{x}} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
          4. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
          6. associate--l+N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + y \cdot \color{blue}{\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
          7. distribute-lft-inN/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(y \cdot \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y}\right) + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(y \cdot \color{blue}{\left(\frac{1}{y} \cdot \frac{91893853320467}{100000000000000}\right)} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
          9. associate-*r*N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\left(y \cdot \frac{1}{y}\right) \cdot \frac{91893853320467}{100000000000000}} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
          10. rgt-mult-inverseN/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{1} \cdot \frac{91893853320467}{100000000000000} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
          11. metadata-evalN/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\frac{91893853320467}{100000000000000}} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
          12. +-lowering-+.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(\frac{91893853320467}{100000000000000} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
          13. *-lowering-*.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\frac{91893853320467}{100000000000000} + \color{blue}{y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)}\right) \]
          14. --lowering--.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\frac{91893853320467}{100000000000000} + y \cdot \color{blue}{\left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)}\right) \]
        7. Simplified47.6%

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

          \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
        9. Step-by-step derivation
          1. /-lowering-/.f6423.0

            \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
        10. Simplified23.0%

          \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
        11. Step-by-step derivation
          1. clear-numN/A

            \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
          2. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{1}{\frac{x}{\frac{83333333333333}{1000000000000000}}}} \]
          3. div-invN/A

            \[\leadsto \frac{1}{\color{blue}{x \cdot \frac{1}{\frac{83333333333333}{1000000000000000}}}} \]
          4. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{\color{blue}{x \cdot \frac{1}{\frac{83333333333333}{1000000000000000}}}} \]
          5. metadata-eval23.0

            \[\leadsto \frac{1}{x \cdot \color{blue}{12.000000000000048}} \]
        12. Applied egg-rr23.0%

          \[\leadsto \color{blue}{\frac{1}{x \cdot 12.000000000000048}} \]
        13. Add Preprocessing

        Alternative 20: 23.7% accurate, 12.3× 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.8%

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

          \[\leadsto \color{blue}{y \cdot \left(\left(\frac{\frac{83333333333333}{1000000000000000}}{x \cdot y} + \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \left(\frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x \cdot y} + \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} + \frac{{z}^{2}}{x}\right)\right)\right)\right) - \frac{x}{y}\right)} \]
        4. Simplified81.1%

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

          \[\leadsto \color{blue}{y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) + \frac{83333333333333}{1000000000000000} \cdot \frac{1}{x}} \]
        6. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)} \]
          2. +-lowering-+.f64N/A

            \[\leadsto \color{blue}{\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right)} \]
          3. associate-*r/N/A

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000} \cdot 1}{x}} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
          4. metadata-evalN/A

            \[\leadsto \frac{\color{blue}{\frac{83333333333333}{1000000000000000}}}{x} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} + y \cdot \left(\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y}\right) - \frac{x}{y}\right) \]
          6. associate--l+N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + y \cdot \color{blue}{\left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y} + \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
          7. distribute-lft-inN/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(y \cdot \left(\frac{91893853320467}{100000000000000} \cdot \frac{1}{y}\right) + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(y \cdot \color{blue}{\left(\frac{1}{y} \cdot \frac{91893853320467}{100000000000000}\right)} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
          9. associate-*r*N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\left(y \cdot \frac{1}{y}\right) \cdot \frac{91893853320467}{100000000000000}} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
          10. rgt-mult-inverseN/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{1} \cdot \frac{91893853320467}{100000000000000} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
          11. metadata-evalN/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\color{blue}{\frac{91893853320467}{100000000000000}} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right) \]
          12. +-lowering-+.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \color{blue}{\left(\frac{91893853320467}{100000000000000} + y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)\right)} \]
          13. *-lowering-*.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\frac{91893853320467}{100000000000000} + \color{blue}{y \cdot \left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)}\right) \]
          14. --lowering--.f64N/A

            \[\leadsto \frac{\frac{83333333333333}{1000000000000000}}{x} + \left(\frac{91893853320467}{100000000000000} + y \cdot \color{blue}{\left(\frac{\log x \cdot \left(x - \frac{1}{2}\right)}{y} - \frac{x}{y}\right)}\right) \]
        7. Simplified47.6%

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

          \[\leadsto \color{blue}{\frac{\frac{83333333333333}{1000000000000000}}{x}} \]
        9. Step-by-step derivation
          1. /-lowering-/.f6423.0

            \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
        10. Simplified23.0%

          \[\leadsto \color{blue}{\frac{0.083333333333333}{x}} \]
        11. Add Preprocessing

        Alternative 21: 4.1% accurate, 148.0× speedup?

        \[\begin{array}{l} \\ 0.91893853320467 \end{array} \]
        (FPCore (x y z) :precision binary64 0.91893853320467)
        double code(double x, double y, double z) {
        	return 0.91893853320467;
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            code = 0.91893853320467d0
        end function
        
        public static double code(double x, double y, double z) {
        	return 0.91893853320467;
        }
        
        def code(x, y, z):
        	return 0.91893853320467
        
        function code(x, y, z)
        	return 0.91893853320467
        end
        
        function tmp = code(x, y, z)
        	tmp = 0.91893853320467;
        end
        
        code[x_, y_, z_] := 0.91893853320467
        
        \begin{array}{l}
        
        \\
        0.91893853320467
        \end{array}
        
        Derivation
        1. Initial program 92.8%

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

          \[\leadsto \color{blue}{\left(\frac{91893853320467}{100000000000000} + \left(\frac{83333333333333}{1000000000000000} \cdot \frac{1}{x} + \left(\log x \cdot \left(x - \frac{1}{2}\right) + \left(\frac{y \cdot {z}^{2}}{x} + \frac{z \cdot \left(\frac{7936500793651}{10000000000000000} \cdot z - \frac{13888888888889}{5000000000000000}\right)}{x}\right)\right)\right)\right) - x} \]
        4. Simplified93.5%

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

          \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
        6. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \color{blue}{\frac{y \cdot {z}^{2}}{x}} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \frac{\color{blue}{y \cdot {z}^{2}}}{x} \]
          3. unpow2N/A

            \[\leadsto \frac{91893853320467}{100000000000000} + \frac{y \cdot \color{blue}{\left(z \cdot z\right)}}{x} \]
          4. *-lowering-*.f6429.5

            \[\leadsto 0.91893853320467 + \frac{y \cdot \color{blue}{\left(z \cdot z\right)}}{x} \]
        7. Simplified29.5%

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

          \[\leadsto \color{blue}{\frac{91893853320467}{100000000000000}} \]
        9. Step-by-step derivation
          1. Simplified4.3%

            \[\leadsto \color{blue}{0.91893853320467} \]
          2. Add Preprocessing

          Developer Target 1: 98.6% accurate, 0.9× 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 2024204 
          (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)))