Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2

Percentage Accurate: 99.8% → 99.9%
Time: 7.6s
Alternatives: 12
Speedup: 1.0×

Specification

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

\\
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\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 12 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: 99.8% accurate, 1.0× speedup?

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

\\
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\end{array}

Alternative 1: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x + \mathsf{fma}\left(\log y, -0.5 - y, y\right)\right) - z \end{array} \]
(FPCore (x y z) :precision binary64 (- (+ x (fma (log y) (- -0.5 y) y)) z))
double code(double x, double y, double z) {
	return (x + fma(log(y), (-0.5 - y), y)) - z;
}
function code(x, y, z)
	return Float64(Float64(x + fma(log(y), Float64(-0.5 - y), y)) - z)
end
code[x_, y_, z_] := N[(N[(x + N[(N[Log[y], $MachinePrecision] * N[(-0.5 - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]
\begin{array}{l}

\\
\left(x + \mathsf{fma}\left(\log y, -0.5 - y, y\right)\right) - z
\end{array}
Derivation
  1. Initial program 99.8%

    \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-+.f64N/A

      \[\leadsto \color{blue}{\left(\left(x - \left(y + \frac{1}{2}\right) \cdot \log y\right) + y\right)} - z \]
    2. lift--.f64N/A

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

      \[\leadsto \left(\left(x - \color{blue}{\left(y + \frac{1}{2}\right) \cdot \log y}\right) + y\right) - z \]
    4. fp-cancel-sub-sign-invN/A

      \[\leadsto \left(\color{blue}{\left(x + \left(\mathsf{neg}\left(\left(y + \frac{1}{2}\right)\right)\right) \cdot \log y\right)} + y\right) - z \]
    5. associate-+l+N/A

      \[\leadsto \color{blue}{\left(x + \left(\left(\mathsf{neg}\left(\left(y + \frac{1}{2}\right)\right)\right) \cdot \log y + y\right)\right)} - z \]
    6. lower-+.f64N/A

      \[\leadsto \color{blue}{\left(x + \left(\left(\mathsf{neg}\left(\left(y + \frac{1}{2}\right)\right)\right) \cdot \log y + y\right)\right)} - z \]
    7. distribute-lft-neg-outN/A

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

      \[\leadsto \left(x + \left(\left(\mathsf{neg}\left(\color{blue}{\log y \cdot \left(y + \frac{1}{2}\right)}\right)\right) + y\right)\right) - z \]
    9. distribute-lft-neg-inN/A

      \[\leadsto \left(x + \left(\color{blue}{\left(\mathsf{neg}\left(\log y\right)\right) \cdot \left(y + \frac{1}{2}\right)} + y\right)\right) - z \]
    10. lower-fma.f64N/A

      \[\leadsto \left(x + \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\log y\right), y + \frac{1}{2}, y\right)}\right) - z \]
    11. lower-neg.f6499.9

      \[\leadsto \left(x + \mathsf{fma}\left(\color{blue}{-\log y}, y + 0.5, y\right)\right) - z \]
    12. lift-+.f64N/A

      \[\leadsto \left(x + \mathsf{fma}\left(-\log y, \color{blue}{y + \frac{1}{2}}, y\right)\right) - z \]
    13. +-commutativeN/A

      \[\leadsto \left(x + \mathsf{fma}\left(-\log y, \color{blue}{\frac{1}{2} + y}, y\right)\right) - z \]
    14. lower-+.f6499.9

      \[\leadsto \left(x + \mathsf{fma}\left(-\log y, \color{blue}{0.5 + y}, y\right)\right) - z \]
  4. Applied rewrites99.9%

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

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

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

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

      \[\leadsto \left(x + \left(\frac{-1}{2} \cdot \log y + \left(y \cdot 1 + y \cdot \color{blue}{\log \left(\frac{1}{y}\right)}\right)\right)\right) - z \]
    4. *-rgt-identityN/A

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

      \[\leadsto \left(x + \left(\frac{-1}{2} \cdot \log y + \color{blue}{\left(y \cdot \log \left(\frac{1}{y}\right) + y\right)}\right)\right) - z \]
    6. associate-+r+N/A

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

      \[\leadsto \left(x + \left(\left(\frac{-1}{2} \cdot \log y + \color{blue}{\log \left(\frac{1}{y}\right) \cdot y}\right) + y\right)\right) - z \]
    8. log-recN/A

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

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

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

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

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

      \[\leadsto \left(x + \left(\left(\color{blue}{-1 \cdot \left(\frac{1}{2} \cdot \log y\right)} + -1 \cdot \left(y \cdot \log y\right)\right) + y\right)\right) - z \]
    14. distribute-lft-inN/A

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

      \[\leadsto \left(x + \left(-1 \cdot \color{blue}{\left(\log y \cdot \left(\frac{1}{2} + y\right)\right)} + y\right)\right) - z \]
  7. Applied rewrites99.9%

    \[\leadsto \left(x + \color{blue}{\mathsf{fma}\left(\log y, -0.5 - y, y\right)}\right) - z \]
  8. Add Preprocessing

Alternative 2: 68.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x - \left(y + 0.5\right) \cdot \log y\right) + y\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{+37}:\\ \;\;\;\;\left(1 - \log y\right) \cdot y\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+91}:\\ \;\;\;\;y - \mathsf{fma}\left(0.5, \log y, z\right)\\ \mathbf{else}:\\ \;\;\;\;y - \left(-x\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ (- x (* (+ y 0.5) (log y))) y)))
   (if (<= t_0 -5e+37)
     (* (- 1.0 (log y)) y)
     (if (<= t_0 2e+91) (- y (fma 0.5 (log y) z)) (- y (- x))))))
double code(double x, double y, double z) {
	double t_0 = (x - ((y + 0.5) * log(y))) + y;
	double tmp;
	if (t_0 <= -5e+37) {
		tmp = (1.0 - log(y)) * y;
	} else if (t_0 <= 2e+91) {
		tmp = y - fma(0.5, log(y), z);
	} else {
		tmp = y - -x;
	}
	return tmp;
}
function code(x, y, z)
	t_0 = Float64(Float64(x - Float64(Float64(y + 0.5) * log(y))) + y)
	tmp = 0.0
	if (t_0 <= -5e+37)
		tmp = Float64(Float64(1.0 - log(y)) * y);
	elseif (t_0 <= 2e+91)
		tmp = Float64(y - fma(0.5, log(y), z));
	else
		tmp = Float64(y - Float64(-x));
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x - N[(N[(y + 0.5), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t$95$0, -5e+37], N[(N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$0, 2e+91], N[(y - N[(0.5 * N[Log[y], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], N[(y - (-x)), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x - \left(y + 0.5\right) \cdot \log y\right) + y\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{+37}:\\
\;\;\;\;\left(1 - \log y\right) \cdot y\\

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+91}:\\
\;\;\;\;y - \mathsf{fma}\left(0.5, \log y, z\right)\\

\mathbf{else}:\\
\;\;\;\;y - \left(-x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 (-.f64 x (*.f64 (+.f64 y #s(literal 1/2 binary64)) (log.f64 y))) y) < -4.99999999999999989e37

    1. Initial program 99.6%

      \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

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

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

        \[\leadsto \left(1 - \color{blue}{\log y}\right) \cdot y \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(1 - \log y\right) \cdot y} \]
      6. lower--.f64N/A

        \[\leadsto \color{blue}{\left(1 - \log y\right)} \cdot y \]
      7. lower-log.f6455.4

        \[\leadsto \left(1 - \color{blue}{\log y}\right) \cdot y \]
    5. Applied rewrites55.4%

      \[\leadsto \color{blue}{\left(1 - \log y\right) \cdot y} \]

    if -4.99999999999999989e37 < (+.f64 (-.f64 x (*.f64 (+.f64 y #s(literal 1/2 binary64)) (log.f64 y))) y) < 2.00000000000000016e91

    1. Initial program 99.9%

      \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{y - \left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right)} \]
    4. Step-by-step derivation
      1. lower--.f64N/A

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

        \[\leadsto y - \color{blue}{\left(\log y \cdot \left(\frac{1}{2} + y\right) + z\right)} \]
      3. *-lft-identityN/A

        \[\leadsto y - \left(\color{blue}{1 \cdot \left(\log y \cdot \left(\frac{1}{2} + y\right)\right)} + z\right) \]
      4. *-lft-identityN/A

        \[\leadsto y - \left(\color{blue}{\log y \cdot \left(\frac{1}{2} + y\right)} + z\right) \]
      5. *-commutativeN/A

        \[\leadsto y - \left(\color{blue}{\left(\frac{1}{2} + y\right) \cdot \log y} + z\right) \]
      6. lower-fma.f64N/A

        \[\leadsto y - \color{blue}{\mathsf{fma}\left(\frac{1}{2} + y, \log y, z\right)} \]
      7. lower-+.f64N/A

        \[\leadsto y - \mathsf{fma}\left(\color{blue}{\frac{1}{2} + y}, \log y, z\right) \]
      8. lower-log.f6487.8

        \[\leadsto y - \mathsf{fma}\left(0.5 + y, \color{blue}{\log y}, z\right) \]
    5. Applied rewrites87.8%

      \[\leadsto \color{blue}{y - \mathsf{fma}\left(0.5 + y, \log y, z\right)} \]
    6. Taylor expanded in y around 0

      \[\leadsto y - \mathsf{fma}\left(\frac{1}{2}, \log \color{blue}{y}, z\right) \]
    7. Step-by-step derivation
      1. Applied rewrites86.3%

        \[\leadsto y - \mathsf{fma}\left(0.5, \log \color{blue}{y}, z\right) \]

      if 2.00000000000000016e91 < (+.f64 (-.f64 x (*.f64 (+.f64 y #s(literal 1/2 binary64)) (log.f64 y))) y)

      1. Initial program 100.0%

        \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

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

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

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

          \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
        4. lower--.f64N/A

          \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
        5. lower--.f64N/A

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

          \[\leadsto y - \left(\color{blue}{\left(\log y \cdot \left(\frac{1}{2} + y\right) + z\right)} - x\right) \]
        7. *-lft-identityN/A

          \[\leadsto y - \left(\left(\color{blue}{1 \cdot \left(\log y \cdot \left(\frac{1}{2} + y\right)\right)} + z\right) - x\right) \]
        8. *-lft-identityN/A

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

          \[\leadsto y - \left(\left(\color{blue}{\left(\frac{1}{2} + y\right) \cdot \log y} + z\right) - x\right) \]
        10. lower-fma.f64N/A

          \[\leadsto y - \left(\color{blue}{\mathsf{fma}\left(\frac{1}{2} + y, \log y, z\right)} - x\right) \]
        11. lower-+.f64N/A

          \[\leadsto y - \left(\mathsf{fma}\left(\color{blue}{\frac{1}{2} + y}, \log y, z\right) - x\right) \]
        12. lower-log.f64100.0

          \[\leadsto y - \left(\mathsf{fma}\left(0.5 + y, \color{blue}{\log y}, z\right) - x\right) \]
      5. Applied rewrites100.0%

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

        \[\leadsto y - -1 \cdot \color{blue}{x} \]
      7. Step-by-step derivation
        1. Applied rewrites86.1%

          \[\leadsto y - \left(-x\right) \]
      8. Recombined 3 regimes into one program.
      9. Add Preprocessing

      Alternative 3: 68.5% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x - \left(y + 0.5\right) \cdot \log y\right) + y\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{+37}:\\ \;\;\;\;\left(1 - \log y\right) \cdot y\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+91}:\\ \;\;\;\;-0.5 \cdot \log y - z\\ \mathbf{else}:\\ \;\;\;\;y - \left(-x\right)\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (let* ((t_0 (+ (- x (* (+ y 0.5) (log y))) y)))
         (if (<= t_0 -5e+37)
           (* (- 1.0 (log y)) y)
           (if (<= t_0 2e+91) (- (* -0.5 (log y)) z) (- y (- x))))))
      double code(double x, double y, double z) {
      	double t_0 = (x - ((y + 0.5) * log(y))) + y;
      	double tmp;
      	if (t_0 <= -5e+37) {
      		tmp = (1.0 - log(y)) * y;
      	} else if (t_0 <= 2e+91) {
      		tmp = (-0.5 * log(y)) - z;
      	} else {
      		tmp = 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 = (x - ((y + 0.5d0) * log(y))) + y
          if (t_0 <= (-5d+37)) then
              tmp = (1.0d0 - log(y)) * y
          else if (t_0 <= 2d+91) then
              tmp = ((-0.5d0) * log(y)) - z
          else
              tmp = y - -x
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double t_0 = (x - ((y + 0.5) * Math.log(y))) + y;
      	double tmp;
      	if (t_0 <= -5e+37) {
      		tmp = (1.0 - Math.log(y)) * y;
      	} else if (t_0 <= 2e+91) {
      		tmp = (-0.5 * Math.log(y)) - z;
      	} else {
      		tmp = y - -x;
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	t_0 = (x - ((y + 0.5) * math.log(y))) + y
      	tmp = 0
      	if t_0 <= -5e+37:
      		tmp = (1.0 - math.log(y)) * y
      	elif t_0 <= 2e+91:
      		tmp = (-0.5 * math.log(y)) - z
      	else:
      		tmp = y - -x
      	return tmp
      
      function code(x, y, z)
      	t_0 = Float64(Float64(x - Float64(Float64(y + 0.5) * log(y))) + y)
      	tmp = 0.0
      	if (t_0 <= -5e+37)
      		tmp = Float64(Float64(1.0 - log(y)) * y);
      	elseif (t_0 <= 2e+91)
      		tmp = Float64(Float64(-0.5 * log(y)) - z);
      	else
      		tmp = Float64(y - Float64(-x));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	t_0 = (x - ((y + 0.5) * log(y))) + y;
      	tmp = 0.0;
      	if (t_0 <= -5e+37)
      		tmp = (1.0 - log(y)) * y;
      	elseif (t_0 <= 2e+91)
      		tmp = (-0.5 * log(y)) - z;
      	else
      		tmp = y - -x;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x - N[(N[(y + 0.5), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t$95$0, -5e+37], N[(N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$0, 2e+91], N[(N[(-0.5 * N[Log[y], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], N[(y - (-x)), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \left(x - \left(y + 0.5\right) \cdot \log y\right) + y\\
      \mathbf{if}\;t\_0 \leq -5 \cdot 10^{+37}:\\
      \;\;\;\;\left(1 - \log y\right) \cdot y\\
      
      \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+91}:\\
      \;\;\;\;-0.5 \cdot \log y - z\\
      
      \mathbf{else}:\\
      \;\;\;\;y - \left(-x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (+.f64 (-.f64 x (*.f64 (+.f64 y #s(literal 1/2 binary64)) (log.f64 y))) y) < -4.99999999999999989e37

        1. Initial program 99.6%

          \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
        2. Add Preprocessing
        3. Taylor expanded in y around inf

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

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

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

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

            \[\leadsto \left(1 - \color{blue}{\log y}\right) \cdot y \]
          5. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(1 - \log y\right) \cdot y} \]
          6. lower--.f64N/A

            \[\leadsto \color{blue}{\left(1 - \log y\right)} \cdot y \]
          7. lower-log.f6455.4

            \[\leadsto \left(1 - \color{blue}{\log y}\right) \cdot y \]
        5. Applied rewrites55.4%

          \[\leadsto \color{blue}{\left(1 - \log y\right) \cdot y} \]

        if -4.99999999999999989e37 < (+.f64 (-.f64 x (*.f64 (+.f64 y #s(literal 1/2 binary64)) (log.f64 y))) y) < 2.00000000000000016e91

        1. Initial program 99.9%

          \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{y - \left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right)} \]
        4. Step-by-step derivation
          1. lower--.f64N/A

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

            \[\leadsto y - \color{blue}{\left(\log y \cdot \left(\frac{1}{2} + y\right) + z\right)} \]
          3. *-lft-identityN/A

            \[\leadsto y - \left(\color{blue}{1 \cdot \left(\log y \cdot \left(\frac{1}{2} + y\right)\right)} + z\right) \]
          4. *-lft-identityN/A

            \[\leadsto y - \left(\color{blue}{\log y \cdot \left(\frac{1}{2} + y\right)} + z\right) \]
          5. *-commutativeN/A

            \[\leadsto y - \left(\color{blue}{\left(\frac{1}{2} + y\right) \cdot \log y} + z\right) \]
          6. lower-fma.f64N/A

            \[\leadsto y - \color{blue}{\mathsf{fma}\left(\frac{1}{2} + y, \log y, z\right)} \]
          7. lower-+.f64N/A

            \[\leadsto y - \mathsf{fma}\left(\color{blue}{\frac{1}{2} + y}, \log y, z\right) \]
          8. lower-log.f6487.8

            \[\leadsto y - \mathsf{fma}\left(0.5 + y, \color{blue}{\log y}, z\right) \]
        5. Applied rewrites87.8%

          \[\leadsto \color{blue}{y - \mathsf{fma}\left(0.5 + y, \log y, z\right)} \]
        6. Taylor expanded in y around 0

          \[\leadsto -1 \cdot \color{blue}{\left(z + \frac{1}{2} \cdot \log y\right)} \]
        7. Step-by-step derivation
          1. Applied rewrites86.2%

            \[\leadsto -0.5 \cdot \log y - \color{blue}{z} \]

          if 2.00000000000000016e91 < (+.f64 (-.f64 x (*.f64 (+.f64 y #s(literal 1/2 binary64)) (log.f64 y))) y)

          1. Initial program 100.0%

            \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
          2. Add Preprocessing
          3. Taylor expanded in x around 0

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

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

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

              \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
            4. lower--.f64N/A

              \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
            5. lower--.f64N/A

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

              \[\leadsto y - \left(\color{blue}{\left(\log y \cdot \left(\frac{1}{2} + y\right) + z\right)} - x\right) \]
            7. *-lft-identityN/A

              \[\leadsto y - \left(\left(\color{blue}{1 \cdot \left(\log y \cdot \left(\frac{1}{2} + y\right)\right)} + z\right) - x\right) \]
            8. *-lft-identityN/A

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

              \[\leadsto y - \left(\left(\color{blue}{\left(\frac{1}{2} + y\right) \cdot \log y} + z\right) - x\right) \]
            10. lower-fma.f64N/A

              \[\leadsto y - \left(\color{blue}{\mathsf{fma}\left(\frac{1}{2} + y, \log y, z\right)} - x\right) \]
            11. lower-+.f64N/A

              \[\leadsto y - \left(\mathsf{fma}\left(\color{blue}{\frac{1}{2} + y}, \log y, z\right) - x\right) \]
            12. lower-log.f64100.0

              \[\leadsto y - \left(\mathsf{fma}\left(0.5 + y, \color{blue}{\log y}, z\right) - x\right) \]
          5. Applied rewrites100.0%

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

            \[\leadsto y - -1 \cdot \color{blue}{x} \]
          7. Step-by-step derivation
            1. Applied rewrites86.1%

              \[\leadsto y - \left(-x\right) \]
          8. Recombined 3 regimes into one program.
          9. Add Preprocessing

          Alternative 4: 47.3% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := y - \left(-x\right)\\ \mathbf{if}\;z \leq -2.3 \cdot 10^{+16}:\\ \;\;\;\;-z\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-127}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-252}:\\ \;\;\;\;-0.5 \cdot \log y\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{+46}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (let* ((t_0 (- y (- x))))
             (if (<= z -2.3e+16)
               (- z)
               (if (<= z -7e-127)
                 t_0
                 (if (<= z -4e-252) (* -0.5 (log y)) (if (<= z 1.06e+46) t_0 (- z)))))))
          double code(double x, double y, double z) {
          	double t_0 = y - -x;
          	double tmp;
          	if (z <= -2.3e+16) {
          		tmp = -z;
          	} else if (z <= -7e-127) {
          		tmp = t_0;
          	} else if (z <= -4e-252) {
          		tmp = -0.5 * log(y);
          	} else if (z <= 1.06e+46) {
          		tmp = t_0;
          	} else {
          		tmp = -z;
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8) :: t_0
              real(8) :: tmp
              t_0 = y - -x
              if (z <= (-2.3d+16)) then
                  tmp = -z
              else if (z <= (-7d-127)) then
                  tmp = t_0
              else if (z <= (-4d-252)) then
                  tmp = (-0.5d0) * log(y)
              else if (z <= 1.06d+46) then
                  tmp = t_0
              else
                  tmp = -z
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z) {
          	double t_0 = y - -x;
          	double tmp;
          	if (z <= -2.3e+16) {
          		tmp = -z;
          	} else if (z <= -7e-127) {
          		tmp = t_0;
          	} else if (z <= -4e-252) {
          		tmp = -0.5 * Math.log(y);
          	} else if (z <= 1.06e+46) {
          		tmp = t_0;
          	} else {
          		tmp = -z;
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	t_0 = y - -x
          	tmp = 0
          	if z <= -2.3e+16:
          		tmp = -z
          	elif z <= -7e-127:
          		tmp = t_0
          	elif z <= -4e-252:
          		tmp = -0.5 * math.log(y)
          	elif z <= 1.06e+46:
          		tmp = t_0
          	else:
          		tmp = -z
          	return tmp
          
          function code(x, y, z)
          	t_0 = Float64(y - Float64(-x))
          	tmp = 0.0
          	if (z <= -2.3e+16)
          		tmp = Float64(-z);
          	elseif (z <= -7e-127)
          		tmp = t_0;
          	elseif (z <= -4e-252)
          		tmp = Float64(-0.5 * log(y));
          	elseif (z <= 1.06e+46)
          		tmp = t_0;
          	else
          		tmp = Float64(-z);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	t_0 = y - -x;
          	tmp = 0.0;
          	if (z <= -2.3e+16)
          		tmp = -z;
          	elseif (z <= -7e-127)
          		tmp = t_0;
          	elseif (z <= -4e-252)
          		tmp = -0.5 * log(y);
          	elseif (z <= 1.06e+46)
          		tmp = t_0;
          	else
          		tmp = -z;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := Block[{t$95$0 = N[(y - (-x)), $MachinePrecision]}, If[LessEqual[z, -2.3e+16], (-z), If[LessEqual[z, -7e-127], t$95$0, If[LessEqual[z, -4e-252], N[(-0.5 * N[Log[y], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.06e+46], t$95$0, (-z)]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := y - \left(-x\right)\\
          \mathbf{if}\;z \leq -2.3 \cdot 10^{+16}:\\
          \;\;\;\;-z\\
          
          \mathbf{elif}\;z \leq -7 \cdot 10^{-127}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;z \leq -4 \cdot 10^{-252}:\\
          \;\;\;\;-0.5 \cdot \log y\\
          
          \mathbf{elif}\;z \leq 1.06 \cdot 10^{+46}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{else}:\\
          \;\;\;\;-z\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if z < -2.3e16 or 1.05999999999999998e46 < z

            1. Initial program 99.9%

              \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
            2. Add Preprocessing
            3. Taylor expanded in z around inf

              \[\leadsto \color{blue}{-1 \cdot z} \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \color{blue}{\mathsf{neg}\left(z\right)} \]
              2. lower-neg.f6466.0

                \[\leadsto \color{blue}{-z} \]
            5. Applied rewrites66.0%

              \[\leadsto \color{blue}{-z} \]

            if -2.3e16 < z < -6.99999999999999979e-127 or -3.99999999999999977e-252 < z < 1.05999999999999998e46

            1. Initial program 99.7%

              \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
            2. Add Preprocessing
            3. Taylor expanded in x around 0

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

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

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

                \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
              4. lower--.f64N/A

                \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
              5. lower--.f64N/A

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

                \[\leadsto y - \left(\color{blue}{\left(\log y \cdot \left(\frac{1}{2} + y\right) + z\right)} - x\right) \]
              7. *-lft-identityN/A

                \[\leadsto y - \left(\left(\color{blue}{1 \cdot \left(\log y \cdot \left(\frac{1}{2} + y\right)\right)} + z\right) - x\right) \]
              8. *-lft-identityN/A

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

                \[\leadsto y - \left(\left(\color{blue}{\left(\frac{1}{2} + y\right) \cdot \log y} + z\right) - x\right) \]
              10. lower-fma.f64N/A

                \[\leadsto y - \left(\color{blue}{\mathsf{fma}\left(\frac{1}{2} + y, \log y, z\right)} - x\right) \]
              11. lower-+.f64N/A

                \[\leadsto y - \left(\mathsf{fma}\left(\color{blue}{\frac{1}{2} + y}, \log y, z\right) - x\right) \]
              12. lower-log.f6499.7

                \[\leadsto y - \left(\mathsf{fma}\left(0.5 + y, \color{blue}{\log y}, z\right) - x\right) \]
            5. Applied rewrites99.7%

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

              \[\leadsto y - -1 \cdot \color{blue}{x} \]
            7. Step-by-step derivation
              1. Applied rewrites45.2%

                \[\leadsto y - \left(-x\right) \]

              if -6.99999999999999979e-127 < z < -3.99999999999999977e-252

              1. Initial program 99.6%

                \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
              2. Add Preprocessing
              3. Taylor expanded in x around 0

                \[\leadsto \color{blue}{y - \left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right)} \]
              4. Step-by-step derivation
                1. lower--.f64N/A

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

                  \[\leadsto y - \color{blue}{\left(\log y \cdot \left(\frac{1}{2} + y\right) + z\right)} \]
                3. *-lft-identityN/A

                  \[\leadsto y - \left(\color{blue}{1 \cdot \left(\log y \cdot \left(\frac{1}{2} + y\right)\right)} + z\right) \]
                4. *-lft-identityN/A

                  \[\leadsto y - \left(\color{blue}{\log y \cdot \left(\frac{1}{2} + y\right)} + z\right) \]
                5. *-commutativeN/A

                  \[\leadsto y - \left(\color{blue}{\left(\frac{1}{2} + y\right) \cdot \log y} + z\right) \]
                6. lower-fma.f64N/A

                  \[\leadsto y - \color{blue}{\mathsf{fma}\left(\frac{1}{2} + y, \log y, z\right)} \]
                7. lower-+.f64N/A

                  \[\leadsto y - \mathsf{fma}\left(\color{blue}{\frac{1}{2} + y}, \log y, z\right) \]
                8. lower-log.f6485.2

                  \[\leadsto y - \mathsf{fma}\left(0.5 + y, \color{blue}{\log y}, z\right) \]
              5. Applied rewrites85.2%

                \[\leadsto \color{blue}{y - \mathsf{fma}\left(0.5 + y, \log y, z\right)} \]
              6. Taylor expanded in y around 0

                \[\leadsto y - \mathsf{fma}\left(\frac{1}{2}, \log \color{blue}{y}, z\right) \]
              7. Step-by-step derivation
                1. Applied rewrites53.4%

                  \[\leadsto y - \mathsf{fma}\left(0.5, \log \color{blue}{y}, z\right) \]
                2. Taylor expanded in y around 0

                  \[\leadsto -1 \cdot \color{blue}{\left(z + \frac{1}{2} \cdot \log y\right)} \]
                3. Step-by-step derivation
                  1. Applied rewrites55.4%

                    \[\leadsto \mathsf{fma}\left(-0.5, \color{blue}{\log y}, -z\right) \]
                  2. Taylor expanded in z around 0

                    \[\leadsto \frac{-1}{2} \cdot \log y \]
                  3. Step-by-step derivation
                    1. Applied rewrites55.4%

                      \[\leadsto -0.5 \cdot \log y \]
                  4. Recombined 3 regimes into one program.
                  5. Add Preprocessing

                  Alternative 5: 61.1% accurate, 1.0× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+17} \lor \neg \left(x \leq 1.05 \cdot 10^{+100}\right):\\ \;\;\;\;y - \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \log y - z\\ \end{array} \end{array} \]
                  (FPCore (x y z)
                   :precision binary64
                   (if (or (<= x -9.5e+17) (not (<= x 1.05e+100)))
                     (- y (- x))
                     (- (* -0.5 (log y)) z)))
                  double code(double x, double y, double z) {
                  	double tmp;
                  	if ((x <= -9.5e+17) || !(x <= 1.05e+100)) {
                  		tmp = y - -x;
                  	} else {
                  		tmp = (-0.5 * log(y)) - z;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y, z)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8) :: tmp
                      if ((x <= (-9.5d+17)) .or. (.not. (x <= 1.05d+100))) then
                          tmp = y - -x
                      else
                          tmp = ((-0.5d0) * log(y)) - z
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z) {
                  	double tmp;
                  	if ((x <= -9.5e+17) || !(x <= 1.05e+100)) {
                  		tmp = y - -x;
                  	} else {
                  		tmp = (-0.5 * Math.log(y)) - z;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z):
                  	tmp = 0
                  	if (x <= -9.5e+17) or not (x <= 1.05e+100):
                  		tmp = y - -x
                  	else:
                  		tmp = (-0.5 * math.log(y)) - z
                  	return tmp
                  
                  function code(x, y, z)
                  	tmp = 0.0
                  	if ((x <= -9.5e+17) || !(x <= 1.05e+100))
                  		tmp = Float64(y - Float64(-x));
                  	else
                  		tmp = Float64(Float64(-0.5 * log(y)) - z);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z)
                  	tmp = 0.0;
                  	if ((x <= -9.5e+17) || ~((x <= 1.05e+100)))
                  		tmp = y - -x;
                  	else
                  		tmp = (-0.5 * log(y)) - z;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_] := If[Or[LessEqual[x, -9.5e+17], N[Not[LessEqual[x, 1.05e+100]], $MachinePrecision]], N[(y - (-x)), $MachinePrecision], N[(N[(-0.5 * N[Log[y], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq -9.5 \cdot 10^{+17} \lor \neg \left(x \leq 1.05 \cdot 10^{+100}\right):\\
                  \;\;\;\;y - \left(-x\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;-0.5 \cdot \log y - z\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < -9.5e17 or 1.0499999999999999e100 < x

                    1. Initial program 99.8%

                      \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                    2. Add Preprocessing
                    3. Taylor expanded in x around 0

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

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

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

                        \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
                      4. lower--.f64N/A

                        \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
                      5. lower--.f64N/A

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

                        \[\leadsto y - \left(\color{blue}{\left(\log y \cdot \left(\frac{1}{2} + y\right) + z\right)} - x\right) \]
                      7. *-lft-identityN/A

                        \[\leadsto y - \left(\left(\color{blue}{1 \cdot \left(\log y \cdot \left(\frac{1}{2} + y\right)\right)} + z\right) - x\right) \]
                      8. *-lft-identityN/A

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

                        \[\leadsto y - \left(\left(\color{blue}{\left(\frac{1}{2} + y\right) \cdot \log y} + z\right) - x\right) \]
                      10. lower-fma.f64N/A

                        \[\leadsto y - \left(\color{blue}{\mathsf{fma}\left(\frac{1}{2} + y, \log y, z\right)} - x\right) \]
                      11. lower-+.f64N/A

                        \[\leadsto y - \left(\mathsf{fma}\left(\color{blue}{\frac{1}{2} + y}, \log y, z\right) - x\right) \]
                      12. lower-log.f6499.8

                        \[\leadsto y - \left(\mathsf{fma}\left(0.5 + y, \color{blue}{\log y}, z\right) - x\right) \]
                    5. Applied rewrites99.8%

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

                      \[\leadsto y - -1 \cdot \color{blue}{x} \]
                    7. Step-by-step derivation
                      1. Applied rewrites64.4%

                        \[\leadsto y - \left(-x\right) \]

                      if -9.5e17 < x < 1.0499999999999999e100

                      1. Initial program 99.7%

                        \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                      2. Add Preprocessing
                      3. Taylor expanded in x around 0

                        \[\leadsto \color{blue}{y - \left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right)} \]
                      4. Step-by-step derivation
                        1. lower--.f64N/A

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

                          \[\leadsto y - \color{blue}{\left(\log y \cdot \left(\frac{1}{2} + y\right) + z\right)} \]
                        3. *-lft-identityN/A

                          \[\leadsto y - \left(\color{blue}{1 \cdot \left(\log y \cdot \left(\frac{1}{2} + y\right)\right)} + z\right) \]
                        4. *-lft-identityN/A

                          \[\leadsto y - \left(\color{blue}{\log y \cdot \left(\frac{1}{2} + y\right)} + z\right) \]
                        5. *-commutativeN/A

                          \[\leadsto y - \left(\color{blue}{\left(\frac{1}{2} + y\right) \cdot \log y} + z\right) \]
                        6. lower-fma.f64N/A

                          \[\leadsto y - \color{blue}{\mathsf{fma}\left(\frac{1}{2} + y, \log y, z\right)} \]
                        7. lower-+.f64N/A

                          \[\leadsto y - \mathsf{fma}\left(\color{blue}{\frac{1}{2} + y}, \log y, z\right) \]
                        8. lower-log.f6494.4

                          \[\leadsto y - \mathsf{fma}\left(0.5 + y, \color{blue}{\log y}, z\right) \]
                      5. Applied rewrites94.4%

                        \[\leadsto \color{blue}{y - \mathsf{fma}\left(0.5 + y, \log y, z\right)} \]
                      6. Taylor expanded in y around 0

                        \[\leadsto -1 \cdot \color{blue}{\left(z + \frac{1}{2} \cdot \log y\right)} \]
                      7. Step-by-step derivation
                        1. Applied rewrites62.1%

                          \[\leadsto -0.5 \cdot \log y - \color{blue}{z} \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification63.0%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+17} \lor \neg \left(x \leq 1.05 \cdot 10^{+100}\right):\\ \;\;\;\;y - \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \log y - z\\ \end{array} \]
                      10. Add Preprocessing

                      Alternative 6: 99.2% accurate, 1.0× speedup?

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

                        1. Initial program 100.0%

                          \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                        2. Add Preprocessing
                        3. Taylor expanded in y around 0

                          \[\leadsto \left(\color{blue}{\left(x - \frac{1}{2} \cdot \log y\right)} + y\right) - z \]
                        4. Step-by-step derivation
                          1. fp-cancel-sub-sign-invN/A

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

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

                            \[\leadsto \left(\left(\color{blue}{\frac{-1}{2}} \cdot \log y + x\right) + y\right) - z \]
                          4. lower-fma.f64N/A

                            \[\leadsto \left(\color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \log y, x\right)} + y\right) - z \]
                          5. lower-log.f6499.3

                            \[\leadsto \left(\mathsf{fma}\left(-0.5, \color{blue}{\log y}, x\right) + y\right) - z \]
                        5. Applied rewrites99.3%

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

                        if 0.5 < y

                        1. Initial program 99.6%

                          \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                        2. Add Preprocessing
                        3. Step-by-step derivation
                          1. lift-+.f64N/A

                            \[\leadsto \color{blue}{\left(\left(x - \left(y + \frac{1}{2}\right) \cdot \log y\right) + y\right)} - z \]
                          2. lift--.f64N/A

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

                            \[\leadsto \left(\left(x - \color{blue}{\left(y + \frac{1}{2}\right) \cdot \log y}\right) + y\right) - z \]
                          4. fp-cancel-sub-sign-invN/A

                            \[\leadsto \left(\color{blue}{\left(x + \left(\mathsf{neg}\left(\left(y + \frac{1}{2}\right)\right)\right) \cdot \log y\right)} + y\right) - z \]
                          5. associate-+l+N/A

                            \[\leadsto \color{blue}{\left(x + \left(\left(\mathsf{neg}\left(\left(y + \frac{1}{2}\right)\right)\right) \cdot \log y + y\right)\right)} - z \]
                          6. lower-+.f64N/A

                            \[\leadsto \color{blue}{\left(x + \left(\left(\mathsf{neg}\left(\left(y + \frac{1}{2}\right)\right)\right) \cdot \log y + y\right)\right)} - z \]
                          7. distribute-lft-neg-outN/A

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

                            \[\leadsto \left(x + \left(\left(\mathsf{neg}\left(\color{blue}{\log y \cdot \left(y + \frac{1}{2}\right)}\right)\right) + y\right)\right) - z \]
                          9. distribute-lft-neg-inN/A

                            \[\leadsto \left(x + \left(\color{blue}{\left(\mathsf{neg}\left(\log y\right)\right) \cdot \left(y + \frac{1}{2}\right)} + y\right)\right) - z \]
                          10. lower-fma.f64N/A

                            \[\leadsto \left(x + \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\log y\right), y + \frac{1}{2}, y\right)}\right) - z \]
                          11. lower-neg.f6499.7

                            \[\leadsto \left(x + \mathsf{fma}\left(\color{blue}{-\log y}, y + 0.5, y\right)\right) - z \]
                          12. lift-+.f64N/A

                            \[\leadsto \left(x + \mathsf{fma}\left(-\log y, \color{blue}{y + \frac{1}{2}}, y\right)\right) - z \]
                          13. +-commutativeN/A

                            \[\leadsto \left(x + \mathsf{fma}\left(-\log y, \color{blue}{\frac{1}{2} + y}, y\right)\right) - z \]
                          14. lower-+.f6499.7

                            \[\leadsto \left(x + \mathsf{fma}\left(-\log y, \color{blue}{0.5 + y}, y\right)\right) - z \]
                        4. Applied rewrites99.7%

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

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

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

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

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

                            \[\leadsto \left(x + \left(1 + \color{blue}{-1 \cdot \log y}\right) \cdot y\right) - z \]
                          5. fp-cancel-sign-sub-invN/A

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

                            \[\leadsto \left(x + \left(1 - \color{blue}{1} \cdot \log y\right) \cdot y\right) - z \]
                          7. *-lft-identityN/A

                            \[\leadsto \left(x + \left(1 - \color{blue}{\log y}\right) \cdot y\right) - z \]
                          8. lower--.f64N/A

                            \[\leadsto \left(x + \color{blue}{\left(1 - \log y\right)} \cdot y\right) - z \]
                          9. lower-log.f6499.2

                            \[\leadsto \left(x + \left(1 - \color{blue}{\log y}\right) \cdot y\right) - z \]
                        7. Applied rewrites99.2%

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

                      Alternative 7: 90.4% accurate, 1.0× speedup?

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

                        1. Initial program 99.9%

                          \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                        2. Add Preprocessing
                        3. Taylor expanded in y around 0

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

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

                            \[\leadsto \color{blue}{\left(x - \frac{1}{2} \cdot \log y\right) - z} \]
                          3. lower--.f64N/A

                            \[\leadsto \color{blue}{\left(x - \frac{1}{2} \cdot \log y\right) - z} \]
                          4. fp-cancel-sub-sign-invN/A

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

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

                            \[\leadsto \left(\color{blue}{\frac{-1}{2}} \cdot \log y + x\right) - z \]
                          7. lower-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \log y, x\right)} - z \]
                          8. lower-log.f6498.7

                            \[\leadsto \mathsf{fma}\left(-0.5, \color{blue}{\log y}, x\right) - z \]
                        5. Applied rewrites98.7%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \log y, x\right) - z} \]

                        if 6.5000000000000003e35 < y

                        1. Initial program 99.6%

                          \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                        2. Add Preprocessing
                        3. Taylor expanded in x around 0

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

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

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

                            \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
                          4. lower--.f64N/A

                            \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
                          5. lower--.f64N/A

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

                            \[\leadsto y - \left(\color{blue}{\left(\log y \cdot \left(\frac{1}{2} + y\right) + z\right)} - x\right) \]
                          7. *-lft-identityN/A

                            \[\leadsto y - \left(\left(\color{blue}{1 \cdot \left(\log y \cdot \left(\frac{1}{2} + y\right)\right)} + z\right) - x\right) \]
                          8. *-lft-identityN/A

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

                            \[\leadsto y - \left(\left(\color{blue}{\left(\frac{1}{2} + y\right) \cdot \log y} + z\right) - x\right) \]
                          10. lower-fma.f64N/A

                            \[\leadsto y - \left(\color{blue}{\mathsf{fma}\left(\frac{1}{2} + y, \log y, z\right)} - x\right) \]
                          11. lower-+.f64N/A

                            \[\leadsto y - \left(\mathsf{fma}\left(\color{blue}{\frac{1}{2} + y}, \log y, z\right) - x\right) \]
                          12. lower-log.f6499.6

                            \[\leadsto y - \left(\mathsf{fma}\left(0.5 + y, \color{blue}{\log y}, z\right) - x\right) \]
                        5. Applied rewrites99.6%

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

                          \[\leadsto y - \left(\log y \cdot \left(\frac{1}{2} + y\right) - x\right) \]
                        7. Step-by-step derivation
                          1. Applied rewrites83.8%

                            \[\leadsto y - \left(\left(y - -0.5\right) \cdot \log y - x\right) \]
                        8. Recombined 2 regimes into one program.
                        9. Add Preprocessing

                        Alternative 8: 90.4% accurate, 1.0× speedup?

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

                          1. Initial program 99.9%

                            \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                          2. Add Preprocessing
                          3. Taylor expanded in y around 0

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

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

                              \[\leadsto \color{blue}{\left(x - \frac{1}{2} \cdot \log y\right) - z} \]
                            3. lower--.f64N/A

                              \[\leadsto \color{blue}{\left(x - \frac{1}{2} \cdot \log y\right) - z} \]
                            4. fp-cancel-sub-sign-invN/A

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

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

                              \[\leadsto \left(\color{blue}{\frac{-1}{2}} \cdot \log y + x\right) - z \]
                            7. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \log y, x\right)} - z \]
                            8. lower-log.f6498.7

                              \[\leadsto \mathsf{fma}\left(-0.5, \color{blue}{\log y}, x\right) - z \]
                          5. Applied rewrites98.7%

                            \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \log y, x\right) - z} \]

                          if 6.5000000000000003e35 < y

                          1. Initial program 99.6%

                            \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                          2. Add Preprocessing
                          3. Taylor expanded in x around 0

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

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

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

                              \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
                            4. lower--.f64N/A

                              \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
                            5. lower--.f64N/A

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

                              \[\leadsto y - \left(\color{blue}{\left(\log y \cdot \left(\frac{1}{2} + y\right) + z\right)} - x\right) \]
                            7. *-lft-identityN/A

                              \[\leadsto y - \left(\left(\color{blue}{1 \cdot \left(\log y \cdot \left(\frac{1}{2} + y\right)\right)} + z\right) - x\right) \]
                            8. *-lft-identityN/A

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

                              \[\leadsto y - \left(\left(\color{blue}{\left(\frac{1}{2} + y\right) \cdot \log y} + z\right) - x\right) \]
                            10. lower-fma.f64N/A

                              \[\leadsto y - \left(\color{blue}{\mathsf{fma}\left(\frac{1}{2} + y, \log y, z\right)} - x\right) \]
                            11. lower-+.f64N/A

                              \[\leadsto y - \left(\mathsf{fma}\left(\color{blue}{\frac{1}{2} + y}, \log y, z\right) - x\right) \]
                            12. lower-log.f6499.6

                              \[\leadsto y - \left(\mathsf{fma}\left(0.5 + y, \color{blue}{\log y}, z\right) - x\right) \]
                          5. Applied rewrites99.6%

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

                            \[\leadsto y - \left(-1 \cdot \left(y \cdot \log \left(\frac{1}{y}\right)\right) - x\right) \]
                          7. Step-by-step derivation
                            1. Applied rewrites83.8%

                              \[\leadsto y - \left(\log y \cdot y - x\right) \]
                          8. Recombined 2 regimes into one program.
                          9. Add Preprocessing

                          Alternative 9: 85.2% accurate, 1.0× speedup?

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

                            1. Initial program 99.9%

                              \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                            2. Add Preprocessing
                            3. Taylor expanded in y around 0

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

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

                                \[\leadsto \color{blue}{\left(x - \frac{1}{2} \cdot \log y\right) - z} \]
                              3. lower--.f64N/A

                                \[\leadsto \color{blue}{\left(x - \frac{1}{2} \cdot \log y\right) - z} \]
                              4. fp-cancel-sub-sign-invN/A

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

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

                                \[\leadsto \left(\color{blue}{\frac{-1}{2}} \cdot \log y + x\right) - z \]
                              7. lower-fma.f64N/A

                                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2}, \log y, x\right)} - z \]
                              8. lower-log.f6490.6

                                \[\leadsto \mathsf{fma}\left(-0.5, \color{blue}{\log y}, x\right) - z \]
                            5. Applied rewrites90.6%

                              \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5, \log y, x\right) - z} \]

                            if 6.40000000000000024e122 < y

                            1. Initial program 99.5%

                              \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                            2. Add Preprocessing
                            3. Taylor expanded in y around inf

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

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

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

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

                                \[\leadsto \left(1 - \color{blue}{\log y}\right) \cdot y \]
                              5. lower-*.f64N/A

                                \[\leadsto \color{blue}{\left(1 - \log y\right) \cdot y} \]
                              6. lower--.f64N/A

                                \[\leadsto \color{blue}{\left(1 - \log y\right)} \cdot y \]
                              7. lower-log.f6473.0

                                \[\leadsto \left(1 - \color{blue}{\log y}\right) \cdot y \]
                            5. Applied rewrites73.0%

                              \[\leadsto \color{blue}{\left(1 - \log y\right) \cdot y} \]
                          3. Recombined 2 regimes into one program.
                          4. Add Preprocessing

                          Alternative 10: 99.8% accurate, 1.0× speedup?

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

                            \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                          2. Add Preprocessing
                          3. Taylor expanded in x around 0

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

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

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

                              \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
                            4. lower--.f64N/A

                              \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
                            5. lower--.f64N/A

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

                              \[\leadsto y - \left(\color{blue}{\left(\log y \cdot \left(\frac{1}{2} + y\right) + z\right)} - x\right) \]
                            7. *-lft-identityN/A

                              \[\leadsto y - \left(\left(\color{blue}{1 \cdot \left(\log y \cdot \left(\frac{1}{2} + y\right)\right)} + z\right) - x\right) \]
                            8. *-lft-identityN/A

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

                              \[\leadsto y - \left(\left(\color{blue}{\left(\frac{1}{2} + y\right) \cdot \log y} + z\right) - x\right) \]
                            10. lower-fma.f64N/A

                              \[\leadsto y - \left(\color{blue}{\mathsf{fma}\left(\frac{1}{2} + y, \log y, z\right)} - x\right) \]
                            11. lower-+.f64N/A

                              \[\leadsto y - \left(\mathsf{fma}\left(\color{blue}{\frac{1}{2} + y}, \log y, z\right) - x\right) \]
                            12. lower-log.f6499.8

                              \[\leadsto y - \left(\mathsf{fma}\left(0.5 + y, \color{blue}{\log y}, z\right) - x\right) \]
                          5. Applied rewrites99.8%

                            \[\leadsto \color{blue}{y - \left(\mathsf{fma}\left(0.5 + y, \log y, z\right) - x\right)} \]
                          6. Add Preprocessing

                          Alternative 11: 48.4% accurate, 6.5× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+16} \lor \neg \left(z \leq 1.06 \cdot 10^{+46}\right):\\ \;\;\;\;-z\\ \mathbf{else}:\\ \;\;\;\;y - \left(-x\right)\\ \end{array} \end{array} \]
                          (FPCore (x y z)
                           :precision binary64
                           (if (or (<= z -2.3e+16) (not (<= z 1.06e+46))) (- z) (- y (- x))))
                          double code(double x, double y, double z) {
                          	double tmp;
                          	if ((z <= -2.3e+16) || !(z <= 1.06e+46)) {
                          		tmp = -z;
                          	} else {
                          		tmp = y - -x;
                          	}
                          	return tmp;
                          }
                          
                          real(8) function code(x, y, z)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8) :: tmp
                              if ((z <= (-2.3d+16)) .or. (.not. (z <= 1.06d+46))) then
                                  tmp = -z
                              else
                                  tmp = y - -x
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z) {
                          	double tmp;
                          	if ((z <= -2.3e+16) || !(z <= 1.06e+46)) {
                          		tmp = -z;
                          	} else {
                          		tmp = y - -x;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z):
                          	tmp = 0
                          	if (z <= -2.3e+16) or not (z <= 1.06e+46):
                          		tmp = -z
                          	else:
                          		tmp = y - -x
                          	return tmp
                          
                          function code(x, y, z)
                          	tmp = 0.0
                          	if ((z <= -2.3e+16) || !(z <= 1.06e+46))
                          		tmp = Float64(-z);
                          	else
                          		tmp = Float64(y - Float64(-x));
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z)
                          	tmp = 0.0;
                          	if ((z <= -2.3e+16) || ~((z <= 1.06e+46)))
                          		tmp = -z;
                          	else
                          		tmp = y - -x;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_] := If[Or[LessEqual[z, -2.3e+16], N[Not[LessEqual[z, 1.06e+46]], $MachinePrecision]], (-z), N[(y - (-x)), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;z \leq -2.3 \cdot 10^{+16} \lor \neg \left(z \leq 1.06 \cdot 10^{+46}\right):\\
                          \;\;\;\;-z\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;y - \left(-x\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if z < -2.3e16 or 1.05999999999999998e46 < z

                            1. Initial program 99.9%

                              \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                            2. Add Preprocessing
                            3. Taylor expanded in z around inf

                              \[\leadsto \color{blue}{-1 \cdot z} \]
                            4. Step-by-step derivation
                              1. mul-1-negN/A

                                \[\leadsto \color{blue}{\mathsf{neg}\left(z\right)} \]
                              2. lower-neg.f6466.0

                                \[\leadsto \color{blue}{-z} \]
                            5. Applied rewrites66.0%

                              \[\leadsto \color{blue}{-z} \]

                            if -2.3e16 < z < 1.05999999999999998e46

                            1. Initial program 99.7%

                              \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                            2. Add Preprocessing
                            3. Taylor expanded in x around 0

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

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

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

                                \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
                              4. lower--.f64N/A

                                \[\leadsto \color{blue}{y - \left(\left(z + \log y \cdot \left(\frac{1}{2} + y\right)\right) - x\right)} \]
                              5. lower--.f64N/A

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

                                \[\leadsto y - \left(\color{blue}{\left(\log y \cdot \left(\frac{1}{2} + y\right) + z\right)} - x\right) \]
                              7. *-lft-identityN/A

                                \[\leadsto y - \left(\left(\color{blue}{1 \cdot \left(\log y \cdot \left(\frac{1}{2} + y\right)\right)} + z\right) - x\right) \]
                              8. *-lft-identityN/A

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

                                \[\leadsto y - \left(\left(\color{blue}{\left(\frac{1}{2} + y\right) \cdot \log y} + z\right) - x\right) \]
                              10. lower-fma.f64N/A

                                \[\leadsto y - \left(\color{blue}{\mathsf{fma}\left(\frac{1}{2} + y, \log y, z\right)} - x\right) \]
                              11. lower-+.f64N/A

                                \[\leadsto y - \left(\mathsf{fma}\left(\color{blue}{\frac{1}{2} + y}, \log y, z\right) - x\right) \]
                              12. lower-log.f6499.7

                                \[\leadsto y - \left(\mathsf{fma}\left(0.5 + y, \color{blue}{\log y}, z\right) - x\right) \]
                            5. Applied rewrites99.7%

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

                              \[\leadsto y - -1 \cdot \color{blue}{x} \]
                            7. Step-by-step derivation
                              1. Applied rewrites39.6%

                                \[\leadsto y - \left(-x\right) \]
                            8. Recombined 2 regimes into one program.
                            9. Final simplification50.0%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+16} \lor \neg \left(z \leq 1.06 \cdot 10^{+46}\right):\\ \;\;\;\;-z\\ \mathbf{else}:\\ \;\;\;\;y - \left(-x\right)\\ \end{array} \]
                            10. Add Preprocessing

                            Alternative 12: 29.7% accurate, 39.3× speedup?

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

                              \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                            2. Add Preprocessing
                            3. Taylor expanded in z around inf

                              \[\leadsto \color{blue}{-1 \cdot z} \]
                            4. Step-by-step derivation
                              1. mul-1-negN/A

                                \[\leadsto \color{blue}{\mathsf{neg}\left(z\right)} \]
                              2. lower-neg.f6427.9

                                \[\leadsto \color{blue}{-z} \]
                            5. Applied rewrites27.9%

                              \[\leadsto \color{blue}{-z} \]
                            6. Add Preprocessing

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

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

                            Reproduce

                            ?
                            herbie shell --seed 2024342 
                            (FPCore (x y z)
                              :name "Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2"
                              :precision binary64
                            
                              :alt
                              (! :herbie-platform default (- (- (+ y x) z) (* (+ y 1/2) (log y))))
                            
                              (- (+ (- x (* (+ y 0.5) (log y))) y) z))