Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2

Percentage Accurate: 99.8% → 99.8%
Time: 11.4s
Alternatives: 14
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 14 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.8% accurate, 1.0× speedup?

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

\\
\left(x + \left(y - \left(y + 0.5\right) \cdot \log 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. associate-+l-N/A

      \[\leadsto \mathsf{\_.f64}\left(\left(x - \left(\left(y + \frac{1}{2}\right) \cdot \log y - y\right)\right), z\right) \]
    2. --lowering--.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \left(\left(y + \frac{1}{2}\right) \cdot \log y - y\right)\right), z\right) \]
    3. --lowering--.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(\left(\left(y + \frac{1}{2}\right) \cdot \log y\right), y\right)\right), z\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(y + \frac{1}{2}\right), \log y\right), y\right)\right), z\right) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{1}{2}\right), \log y\right), y\right)\right), z\right) \]
    6. log-lowering-log.f6499.8%

      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{1}{2}\right), \mathsf{log.f64}\left(y\right)\right), y\right)\right), z\right) \]
  4. Applied egg-rr99.8%

    \[\leadsto \color{blue}{\left(x - \left(\left(y + 0.5\right) \cdot \log y - y\right)\right)} - z \]
  5. Final simplification99.8%

    \[\leadsto \left(x + \left(y - \left(y + 0.5\right) \cdot \log y\right)\right) - z \]
  6. Add Preprocessing

Alternative 2: 74.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(y + 0.5\right) \cdot \log y\\ \mathbf{if}\;z \leq -1400000:\\ \;\;\;\;x - z\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-119}:\\ \;\;\;\;x - t\_0\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+34}:\\ \;\;\;\;y - t\_0\\ \mathbf{else}:\\ \;\;\;\;x - z\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* (+ y 0.5) (log y))))
   (if (<= z -1400000.0)
     (- x z)
     (if (<= z 3.3e-119) (- x t_0) (if (<= z 3.4e+34) (- y t_0) (- x z))))))
double code(double x, double y, double z) {
	double t_0 = (y + 0.5) * log(y);
	double tmp;
	if (z <= -1400000.0) {
		tmp = x - z;
	} else if (z <= 3.3e-119) {
		tmp = x - t_0;
	} else if (z <= 3.4e+34) {
		tmp = y - t_0;
	} else {
		tmp = x - 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 + 0.5d0) * log(y)
    if (z <= (-1400000.0d0)) then
        tmp = x - z
    else if (z <= 3.3d-119) then
        tmp = x - t_0
    else if (z <= 3.4d+34) then
        tmp = y - t_0
    else
        tmp = x - z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (y + 0.5) * Math.log(y);
	double tmp;
	if (z <= -1400000.0) {
		tmp = x - z;
	} else if (z <= 3.3e-119) {
		tmp = x - t_0;
	} else if (z <= 3.4e+34) {
		tmp = y - t_0;
	} else {
		tmp = x - z;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (y + 0.5) * math.log(y)
	tmp = 0
	if z <= -1400000.0:
		tmp = x - z
	elif z <= 3.3e-119:
		tmp = x - t_0
	elif z <= 3.4e+34:
		tmp = y - t_0
	else:
		tmp = x - z
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(y + 0.5) * log(y))
	tmp = 0.0
	if (z <= -1400000.0)
		tmp = Float64(x - z);
	elseif (z <= 3.3e-119)
		tmp = Float64(x - t_0);
	elseif (z <= 3.4e+34)
		tmp = Float64(y - t_0);
	else
		tmp = Float64(x - z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (y + 0.5) * log(y);
	tmp = 0.0;
	if (z <= -1400000.0)
		tmp = x - z;
	elseif (z <= 3.3e-119)
		tmp = x - t_0;
	elseif (z <= 3.4e+34)
		tmp = y - t_0;
	else
		tmp = x - z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y + 0.5), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1400000.0], N[(x - z), $MachinePrecision], If[LessEqual[z, 3.3e-119], N[(x - t$95$0), $MachinePrecision], If[LessEqual[z, 3.4e+34], N[(y - t$95$0), $MachinePrecision], N[(x - z), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(y + 0.5\right) \cdot \log y\\
\mathbf{if}\;z \leq -1400000:\\
\;\;\;\;x - z\\

\mathbf{elif}\;z \leq 3.3 \cdot 10^{-119}:\\
\;\;\;\;x - t\_0\\

\mathbf{elif}\;z \leq 3.4 \cdot 10^{+34}:\\
\;\;\;\;y - t\_0\\

\mathbf{else}:\\
\;\;\;\;x - z\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.4e6 or 3.3999999999999999e34 < z

    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 inf

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{x}, z\right) \]
    4. Step-by-step derivation
      1. Simplified79.3%

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

      if -1.4e6 < z < 3.30000000000000008e-119

      1. Initial program 99.8%

        \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
      2. Step-by-step derivation
        1. associate--l+N/A

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

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

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

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

          \[\leadsto \mathsf{\_.f64}\left(\left(x + \left(y - z\right)\right), \color{blue}{\left(\left(y + \frac{1}{2}\right) \cdot \log y\right)}\right) \]
        6. remove-double-negN/A

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

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

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

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

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \left(\left(0 - y\right) + z\right)\right), \left(\left(y + \color{blue}{\frac{1}{2}}\right) \cdot \log y\right)\right) \]
        11. neg-sub0N/A

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

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

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), \left(\left(y + \color{blue}{\frac{1}{2}}\right) \cdot \log y\right)\right) \]
        14. --lowering--.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \left(\left(y + \color{blue}{\frac{1}{2}}\right) \cdot \log y\right)\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{*.f64}\left(\left(y + \frac{1}{2}\right), \color{blue}{\log y}\right)\right) \]
        16. +-lowering-+.f64N/A

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{1}{2}\right), \log \color{blue}{y}\right)\right) \]
        17. log-lowering-log.f6499.8%

          \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{1}{2}\right), \mathsf{log.f64}\left(y\right)\right)\right) \]
      3. Simplified99.8%

        \[\leadsto \color{blue}{\left(x - \left(z - y\right)\right) - \left(y + 0.5\right) \cdot \log y} \]
      4. Add Preprocessing
      5. Taylor expanded in x around inf

        \[\leadsto \mathsf{\_.f64}\left(\color{blue}{x}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{1}{2}\right), \mathsf{log.f64}\left(y\right)\right)\right) \]
      6. Step-by-step derivation
        1. Simplified74.4%

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

        if 3.30000000000000008e-119 < z < 3.3999999999999999e34

        1. Initial program 99.8%

          \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
        2. Step-by-step derivation
          1. associate--l+N/A

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

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

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

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

            \[\leadsto \mathsf{\_.f64}\left(\left(x + \left(y - z\right)\right), \color{blue}{\left(\left(y + \frac{1}{2}\right) \cdot \log y\right)}\right) \]
          6. remove-double-negN/A

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

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

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

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

            \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \left(\left(0 - y\right) + z\right)\right), \left(\left(y + \color{blue}{\frac{1}{2}}\right) \cdot \log y\right)\right) \]
          11. neg-sub0N/A

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

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

            \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), \left(\left(y + \color{blue}{\frac{1}{2}}\right) \cdot \log y\right)\right) \]
          14. --lowering--.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \left(\left(y + \color{blue}{\frac{1}{2}}\right) \cdot \log y\right)\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{*.f64}\left(\left(y + \frac{1}{2}\right), \color{blue}{\log y}\right)\right) \]
          16. +-lowering-+.f64N/A

            \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{1}{2}\right), \log \color{blue}{y}\right)\right) \]
          17. log-lowering-log.f6499.7%

            \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{1}{2}\right), \mathsf{log.f64}\left(y\right)\right)\right) \]
        3. Simplified99.7%

          \[\leadsto \color{blue}{\left(x - \left(z - y\right)\right) - \left(y + 0.5\right) \cdot \log y} \]
        4. Add Preprocessing
        5. Taylor expanded in y around inf

          \[\leadsto \mathsf{\_.f64}\left(\color{blue}{y}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{1}{2}\right), \mathsf{log.f64}\left(y\right)\right)\right) \]
        6. Step-by-step derivation
          1. Simplified75.6%

            \[\leadsto \color{blue}{y} - \left(y + 0.5\right) \cdot \log y \]
        7. Recombined 3 regimes into one program.
        8. Add Preprocessing

        Alternative 3: 76.4% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{+78}:\\ \;\;\;\;x - z\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+113}:\\ \;\;\;\;y \cdot \left(1 - \log y\right) - z\\ \mathbf{else}:\\ \;\;\;\;x - z\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= x -6.8e+78)
           (- x z)
           (if (<= x 4e+113) (- (* y (- 1.0 (log y))) z) (- x z))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (x <= -6.8e+78) {
        		tmp = x - z;
        	} else if (x <= 4e+113) {
        		tmp = (y * (1.0 - log(y))) - z;
        	} else {
        		tmp = x - 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 <= (-6.8d+78)) then
                tmp = x - z
            else if (x <= 4d+113) then
                tmp = (y * (1.0d0 - log(y))) - z
            else
                tmp = x - z
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if (x <= -6.8e+78) {
        		tmp = x - z;
        	} else if (x <= 4e+113) {
        		tmp = (y * (1.0 - Math.log(y))) - z;
        	} else {
        		tmp = x - z;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if x <= -6.8e+78:
        		tmp = x - z
        	elif x <= 4e+113:
        		tmp = (y * (1.0 - math.log(y))) - z
        	else:
        		tmp = x - z
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (x <= -6.8e+78)
        		tmp = Float64(x - z);
        	elseif (x <= 4e+113)
        		tmp = Float64(Float64(y * Float64(1.0 - log(y))) - z);
        	else
        		tmp = Float64(x - z);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if (x <= -6.8e+78)
        		tmp = x - z;
        	elseif (x <= 4e+113)
        		tmp = (y * (1.0 - log(y))) - z;
        	else
        		tmp = x - z;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[LessEqual[x, -6.8e+78], N[(x - z), $MachinePrecision], If[LessEqual[x, 4e+113], N[(N[(y * N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], N[(x - z), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq -6.8 \cdot 10^{+78}:\\
        \;\;\;\;x - z\\
        
        \mathbf{elif}\;x \leq 4 \cdot 10^{+113}:\\
        \;\;\;\;y \cdot \left(1 - \log y\right) - z\\
        
        \mathbf{else}:\\
        \;\;\;\;x - z\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < -6.80000000000000014e78 or 4e113 < x

          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 inf

            \[\leadsto \mathsf{\_.f64}\left(\color{blue}{x}, z\right) \]
          4. Step-by-step derivation
            1. Simplified84.7%

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

            if -6.80000000000000014e78 < x < 4e113

            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 y around inf

              \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(y \cdot \left(1 - -1 \cdot \log \left(\frac{1}{y}\right)\right)\right)}, z\right) \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{\_.f64}\left(\left(y \cdot \left(1 - \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right)\right), z\right) \]
              2. log-recN/A

                \[\leadsto \mathsf{\_.f64}\left(\left(y \cdot \left(1 - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right)\right), z\right) \]
              3. remove-double-negN/A

                \[\leadsto \mathsf{\_.f64}\left(\left(y \cdot \left(1 - \log y\right)\right), z\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, \left(1 - \log y\right)\right), z\right) \]
              5. --lowering--.f64N/A

                \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \log y\right)\right), z\right) \]
              6. log-lowering-log.f6474.3%

                \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \mathsf{log.f64}\left(y\right)\right)\right), z\right) \]
            5. Simplified74.3%

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

          Alternative 4: 75.2% accurate, 0.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1820000:\\ \;\;\;\;x - z\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+15}:\\ \;\;\;\;x - \left(y + 0.5\right) \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;x - z\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (<= z -1820000.0)
             (- x z)
             (if (<= z 1.65e+15) (- x (* (+ y 0.5) (log y))) (- x z))))
          double code(double x, double y, double z) {
          	double tmp;
          	if (z <= -1820000.0) {
          		tmp = x - z;
          	} else if (z <= 1.65e+15) {
          		tmp = x - ((y + 0.5) * log(y));
          	} else {
          		tmp = x - 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 (z <= (-1820000.0d0)) then
                  tmp = x - z
              else if (z <= 1.65d+15) then
                  tmp = x - ((y + 0.5d0) * log(y))
              else
                  tmp = x - z
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z) {
          	double tmp;
          	if (z <= -1820000.0) {
          		tmp = x - z;
          	} else if (z <= 1.65e+15) {
          		tmp = x - ((y + 0.5) * Math.log(y));
          	} else {
          		tmp = x - z;
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	tmp = 0
          	if z <= -1820000.0:
          		tmp = x - z
          	elif z <= 1.65e+15:
          		tmp = x - ((y + 0.5) * math.log(y))
          	else:
          		tmp = x - z
          	return tmp
          
          function code(x, y, z)
          	tmp = 0.0
          	if (z <= -1820000.0)
          		tmp = Float64(x - z);
          	elseif (z <= 1.65e+15)
          		tmp = Float64(x - Float64(Float64(y + 0.5) * log(y)));
          	else
          		tmp = Float64(x - z);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	tmp = 0.0;
          	if (z <= -1820000.0)
          		tmp = x - z;
          	elseif (z <= 1.65e+15)
          		tmp = x - ((y + 0.5) * log(y));
          	else
          		tmp = x - z;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := If[LessEqual[z, -1820000.0], N[(x - z), $MachinePrecision], If[LessEqual[z, 1.65e+15], N[(x - N[(N[(y + 0.5), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - z), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -1820000:\\
          \;\;\;\;x - z\\
          
          \mathbf{elif}\;z \leq 1.65 \cdot 10^{+15}:\\
          \;\;\;\;x - \left(y + 0.5\right) \cdot \log y\\
          
          \mathbf{else}:\\
          \;\;\;\;x - z\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -1.82e6 or 1.65e15 < z

            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 inf

              \[\leadsto \mathsf{\_.f64}\left(\color{blue}{x}, z\right) \]
            4. Step-by-step derivation
              1. Simplified78.2%

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

              if -1.82e6 < z < 1.65e15

              1. Initial program 99.8%

                \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
              2. Step-by-step derivation
                1. associate--l+N/A

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

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

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

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

                  \[\leadsto \mathsf{\_.f64}\left(\left(x + \left(y - z\right)\right), \color{blue}{\left(\left(y + \frac{1}{2}\right) \cdot \log y\right)}\right) \]
                6. remove-double-negN/A

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

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

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

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

                  \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \left(\left(0 - y\right) + z\right)\right), \left(\left(y + \color{blue}{\frac{1}{2}}\right) \cdot \log y\right)\right) \]
                11. neg-sub0N/A

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

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

                  \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), \left(\left(y + \color{blue}{\frac{1}{2}}\right) \cdot \log y\right)\right) \]
                14. --lowering--.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \left(\left(y + \color{blue}{\frac{1}{2}}\right) \cdot \log y\right)\right) \]
                15. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{*.f64}\left(\left(y + \frac{1}{2}\right), \color{blue}{\log y}\right)\right) \]
                16. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{1}{2}\right), \log \color{blue}{y}\right)\right) \]
                17. log-lowering-log.f6499.8%

                  \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{1}{2}\right), \mathsf{log.f64}\left(y\right)\right)\right) \]
              3. Simplified99.8%

                \[\leadsto \color{blue}{\left(x - \left(z - y\right)\right) - \left(y + 0.5\right) \cdot \log y} \]
              4. Add Preprocessing
              5. Taylor expanded in x around inf

                \[\leadsto \mathsf{\_.f64}\left(\color{blue}{x}, \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{1}{2}\right), \mathsf{log.f64}\left(y\right)\right)\right) \]
              6. Step-by-step derivation
                1. Simplified71.7%

                  \[\leadsto \color{blue}{x} - \left(y + 0.5\right) \cdot \log y \]
              7. Recombined 2 regimes into one program.
              8. Add Preprocessing

              Alternative 5: 69.5% accurate, 1.0× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -122:\\ \;\;\;\;x - z\\ \mathbf{elif}\;x \leq 5.3 \cdot 10^{+35}:\\ \;\;\;\;\log y \cdot -0.5 - z\\ \mathbf{else}:\\ \;\;\;\;x - z\\ \end{array} \end{array} \]
              (FPCore (x y z)
               :precision binary64
               (if (<= x -122.0) (- x z) (if (<= x 5.3e+35) (- (* (log y) -0.5) z) (- x z))))
              double code(double x, double y, double z) {
              	double tmp;
              	if (x <= -122.0) {
              		tmp = x - z;
              	} else if (x <= 5.3e+35) {
              		tmp = (log(y) * -0.5) - z;
              	} else {
              		tmp = x - 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 <= (-122.0d0)) then
                      tmp = x - z
                  else if (x <= 5.3d+35) then
                      tmp = (log(y) * (-0.5d0)) - z
                  else
                      tmp = x - z
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z) {
              	double tmp;
              	if (x <= -122.0) {
              		tmp = x - z;
              	} else if (x <= 5.3e+35) {
              		tmp = (Math.log(y) * -0.5) - z;
              	} else {
              		tmp = x - z;
              	}
              	return tmp;
              }
              
              def code(x, y, z):
              	tmp = 0
              	if x <= -122.0:
              		tmp = x - z
              	elif x <= 5.3e+35:
              		tmp = (math.log(y) * -0.5) - z
              	else:
              		tmp = x - z
              	return tmp
              
              function code(x, y, z)
              	tmp = 0.0
              	if (x <= -122.0)
              		tmp = Float64(x - z);
              	elseif (x <= 5.3e+35)
              		tmp = Float64(Float64(log(y) * -0.5) - z);
              	else
              		tmp = Float64(x - z);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z)
              	tmp = 0.0;
              	if (x <= -122.0)
              		tmp = x - z;
              	elseif (x <= 5.3e+35)
              		tmp = (log(y) * -0.5) - z;
              	else
              		tmp = x - z;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_] := If[LessEqual[x, -122.0], N[(x - z), $MachinePrecision], If[LessEqual[x, 5.3e+35], N[(N[(N[Log[y], $MachinePrecision] * -0.5), $MachinePrecision] - z), $MachinePrecision], N[(x - z), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;x \leq -122:\\
              \;\;\;\;x - z\\
              
              \mathbf{elif}\;x \leq 5.3 \cdot 10^{+35}:\\
              \;\;\;\;\log y \cdot -0.5 - z\\
              
              \mathbf{else}:\\
              \;\;\;\;x - z\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x < -122 or 5.30000000000000009e35 < x

                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 inf

                  \[\leadsto \mathsf{\_.f64}\left(\color{blue}{x}, z\right) \]
                4. Step-by-step derivation
                  1. Simplified74.3%

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

                  if -122 < x < 5.30000000000000009e35

                  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 y around 0

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

                      \[\leadsto \mathsf{\_.f64}\left(\left(x + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \log y\right)\right)\right), z\right) \]
                    2. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \log y\right)\right)\right), z\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(\log y \cdot \frac{1}{2}\right)\right)\right), z\right) \]
                    4. distribute-rgt-neg-inN/A

                      \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\log y \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right), z\right) \]
                    5. metadata-evalN/A

                      \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\log y \cdot \frac{-1}{2}\right)\right), z\right) \]
                    6. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\log y, \frac{-1}{2}\right)\right), z\right) \]
                    7. log-lowering-log.f6467.8%

                      \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{log.f64}\left(y\right), \frac{-1}{2}\right)\right), z\right) \]
                  5. Simplified67.8%

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

                    \[\leadsto \color{blue}{\frac{-1}{2} \cdot \log y - z} \]
                  7. Step-by-step derivation
                    1. --lowering--.f64N/A

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

                      \[\leadsto \mathsf{\_.f64}\left(\left(\log y \cdot \frac{-1}{2}\right), z\right) \]
                    3. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\log y, \frac{-1}{2}\right), z\right) \]
                    4. log-lowering-log.f6467.1%

                      \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(y\right), \frac{-1}{2}\right), z\right) \]
                  8. Simplified67.1%

                    \[\leadsto \color{blue}{\log y \cdot -0.5 - z} \]
                5. Recombined 2 regimes into one program.
                6. Add Preprocessing

                Alternative 6: 70.0% accurate, 1.0× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -260:\\ \;\;\;\;x - z\\ \mathbf{elif}\;z \leq 200:\\ \;\;\;\;x + \log y \cdot -0.5\\ \mathbf{else}:\\ \;\;\;\;x - z\\ \end{array} \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (<= z -260.0) (- x z) (if (<= z 200.0) (+ x (* (log y) -0.5)) (- x z))))
                double code(double x, double y, double z) {
                	double tmp;
                	if (z <= -260.0) {
                		tmp = x - z;
                	} else if (z <= 200.0) {
                		tmp = x + (log(y) * -0.5);
                	} else {
                		tmp = x - 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 (z <= (-260.0d0)) then
                        tmp = x - z
                    else if (z <= 200.0d0) then
                        tmp = x + (log(y) * (-0.5d0))
                    else
                        tmp = x - z
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z) {
                	double tmp;
                	if (z <= -260.0) {
                		tmp = x - z;
                	} else if (z <= 200.0) {
                		tmp = x + (Math.log(y) * -0.5);
                	} else {
                		tmp = x - z;
                	}
                	return tmp;
                }
                
                def code(x, y, z):
                	tmp = 0
                	if z <= -260.0:
                		tmp = x - z
                	elif z <= 200.0:
                		tmp = x + (math.log(y) * -0.5)
                	else:
                		tmp = x - z
                	return tmp
                
                function code(x, y, z)
                	tmp = 0.0
                	if (z <= -260.0)
                		tmp = Float64(x - z);
                	elseif (z <= 200.0)
                		tmp = Float64(x + Float64(log(y) * -0.5));
                	else
                		tmp = Float64(x - z);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z)
                	tmp = 0.0;
                	if (z <= -260.0)
                		tmp = x - z;
                	elseif (z <= 200.0)
                		tmp = x + (log(y) * -0.5);
                	else
                		tmp = x - z;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_] := If[LessEqual[z, -260.0], N[(x - z), $MachinePrecision], If[LessEqual[z, 200.0], N[(x + N[(N[Log[y], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision], N[(x - z), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \leq -260:\\
                \;\;\;\;x - z\\
                
                \mathbf{elif}\;z \leq 200:\\
                \;\;\;\;x + \log y \cdot -0.5\\
                
                \mathbf{else}:\\
                \;\;\;\;x - z\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if z < -260 or 200 < z

                  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 inf

                    \[\leadsto \mathsf{\_.f64}\left(\color{blue}{x}, z\right) \]
                  4. Step-by-step derivation
                    1. Simplified76.6%

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

                    if -260 < z < 200

                    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 y around 0

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

                        \[\leadsto \mathsf{\_.f64}\left(\left(x + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \log y\right)\right)\right), z\right) \]
                      2. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \log y\right)\right)\right), z\right) \]
                      3. *-commutativeN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(\log y \cdot \frac{1}{2}\right)\right)\right), z\right) \]
                      4. distribute-rgt-neg-inN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\log y \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right), z\right) \]
                      5. metadata-evalN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\log y \cdot \frac{-1}{2}\right)\right), z\right) \]
                      6. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\log y, \frac{-1}{2}\right)\right), z\right) \]
                      7. log-lowering-log.f6463.2%

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{log.f64}\left(y\right), \frac{-1}{2}\right)\right), z\right) \]
                    5. Simplified63.2%

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

                      \[\leadsto \color{blue}{x + \frac{-1}{2} \cdot \log y} \]
                    7. Step-by-step derivation
                      1. +-lowering-+.f64N/A

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

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

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\log y, \color{blue}{\frac{-1}{2}}\right)\right) \]
                      4. log-lowering-log.f6462.7%

                        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{log.f64}\left(y\right), \frac{-1}{2}\right)\right) \]
                    8. Simplified62.7%

                      \[\leadsto \color{blue}{x + \log y \cdot -0.5} \]
                  5. Recombined 2 regimes into one program.
                  6. Add Preprocessing

                  Alternative 7: 99.3% accurate, 1.0× speedup?

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

                    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 \mathsf{\_.f64}\left(\color{blue}{\left(x - \frac{1}{2} \cdot \log y\right)}, z\right) \]
                    4. Step-by-step derivation
                      1. sub-negN/A

                        \[\leadsto \mathsf{\_.f64}\left(\left(x + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \log y\right)\right)\right), z\right) \]
                      2. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \log y\right)\right)\right), z\right) \]
                      3. *-commutativeN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(\log y \cdot \frac{1}{2}\right)\right)\right), z\right) \]
                      4. distribute-rgt-neg-inN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\log y \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right), z\right) \]
                      5. metadata-evalN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\log y \cdot \frac{-1}{2}\right)\right), z\right) \]
                      6. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\log y, \frac{-1}{2}\right)\right), z\right) \]
                      7. log-lowering-log.f6499.9%

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{log.f64}\left(y\right), \frac{-1}{2}\right)\right), z\right) \]
                    5. Simplified99.9%

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

                    if 7.9999999999999996e-7 < y

                    1. Initial program 99.6%

                      \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z \]
                    2. Step-by-step derivation
                      1. associate--l+N/A

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

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

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

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

                        \[\leadsto \mathsf{\_.f64}\left(\left(x + \left(y - z\right)\right), \color{blue}{\left(\left(y + \frac{1}{2}\right) \cdot \log y\right)}\right) \]
                      6. remove-double-negN/A

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

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

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

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

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \left(\left(0 - y\right) + z\right)\right), \left(\left(y + \color{blue}{\frac{1}{2}}\right) \cdot \log y\right)\right) \]
                      11. neg-sub0N/A

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

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

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), \left(\left(y + \color{blue}{\frac{1}{2}}\right) \cdot \log y\right)\right) \]
                      14. --lowering--.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \left(\left(y + \color{blue}{\frac{1}{2}}\right) \cdot \log y\right)\right) \]
                      15. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{*.f64}\left(\left(y + \frac{1}{2}\right), \color{blue}{\log y}\right)\right) \]
                      16. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{1}{2}\right), \log \color{blue}{y}\right)\right) \]
                      17. log-lowering-log.f6499.7%

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(y, \frac{1}{2}\right), \mathsf{log.f64}\left(y\right)\right)\right) \]
                    3. Simplified99.7%

                      \[\leadsto \color{blue}{\left(x - \left(z - y\right)\right) - \left(y + 0.5\right) \cdot \log y} \]
                    4. Add Preprocessing
                    5. Taylor expanded in y around inf

                      \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \color{blue}{\left(-1 \cdot \left(y \cdot \log \left(\frac{1}{y}\right)\right)\right)}\right) \]
                    6. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \left(\mathsf{neg}\left(y \cdot \log \left(\frac{1}{y}\right)\right)\right)\right) \]
                      2. distribute-rgt-neg-inN/A

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

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \left(y \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right)\right) \]
                      4. remove-double-negN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \left(y \cdot \log y\right)\right) \]
                      5. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{*.f64}\left(y, \color{blue}{\log y}\right)\right) \]
                      6. log-lowering-log.f6499.5%

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{*.f64}\left(y, \mathsf{log.f64}\left(y\right)\right)\right) \]
                    7. Simplified99.5%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 8 \cdot 10^{-7}:\\ \;\;\;\;\left(x + \log y \cdot -0.5\right) - z\\ \mathbf{else}:\\ \;\;\;\;\left(x + \left(y - z\right)\right) - y \cdot \log y\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 8: 99.3% accurate, 1.0× speedup?

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

                    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 \mathsf{\_.f64}\left(\color{blue}{\left(x - \frac{1}{2} \cdot \log y\right)}, z\right) \]
                    4. Step-by-step derivation
                      1. sub-negN/A

                        \[\leadsto \mathsf{\_.f64}\left(\left(x + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \log y\right)\right)\right), z\right) \]
                      2. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \log y\right)\right)\right), z\right) \]
                      3. *-commutativeN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(\log y \cdot \frac{1}{2}\right)\right)\right), z\right) \]
                      4. distribute-rgt-neg-inN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\log y \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right), z\right) \]
                      5. metadata-evalN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\log y \cdot \frac{-1}{2}\right)\right), z\right) \]
                      6. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\log y, \frac{-1}{2}\right)\right), z\right) \]
                      7. log-lowering-log.f6499.9%

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{log.f64}\left(y\right), \frac{-1}{2}\right)\right), z\right) \]
                    5. Simplified99.9%

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

                    if 7.9999999999999996e-7 < 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 y around inf

                      \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(x, \color{blue}{\left(-1 \cdot \left(y \cdot \log \left(\frac{1}{y}\right)\right)\right)}\right), y\right), z\right) \]
                    4. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(x, \left(\mathsf{neg}\left(y \cdot \log \left(\frac{1}{y}\right)\right)\right)\right), y\right), z\right) \]
                      2. distribute-rgt-neg-inN/A

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

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right)\right), y\right), z\right) \]
                      4. remove-double-negN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot \log y\right)\right), y\right), z\right) \]
                      5. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, \log y\right)\right), y\right), z\right) \]
                      6. log-lowering-log.f6499.5%

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{log.f64}\left(y\right)\right)\right), y\right), z\right) \]
                    5. Simplified99.5%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 8 \cdot 10^{-7}:\\ \;\;\;\;\left(x + \log y \cdot -0.5\right) - z\\ \mathbf{else}:\\ \;\;\;\;\left(y + \left(x - y \cdot \log y\right)\right) - z\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 9: 90.4% accurate, 1.0× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 6.2 \cdot 10^{+35}:\\ \;\;\;\;\left(x + \log y \cdot -0.5\right) - z\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(1 - \log y\right) - z\\ \end{array} \end{array} \]
                  (FPCore (x y z)
                   :precision binary64
                   (if (<= y 6.2e+35) (- (+ x (* (log y) -0.5)) z) (- (* y (- 1.0 (log y))) z)))
                  double code(double x, double y, double z) {
                  	double tmp;
                  	if (y <= 6.2e+35) {
                  		tmp = (x + (log(y) * -0.5)) - z;
                  	} else {
                  		tmp = (y * (1.0 - 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 (y <= 6.2d+35) then
                          tmp = (x + (log(y) * (-0.5d0))) - z
                      else
                          tmp = (y * (1.0d0 - log(y))) - z
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z) {
                  	double tmp;
                  	if (y <= 6.2e+35) {
                  		tmp = (x + (Math.log(y) * -0.5)) - z;
                  	} else {
                  		tmp = (y * (1.0 - Math.log(y))) - z;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z):
                  	tmp = 0
                  	if y <= 6.2e+35:
                  		tmp = (x + (math.log(y) * -0.5)) - z
                  	else:
                  		tmp = (y * (1.0 - math.log(y))) - z
                  	return tmp
                  
                  function code(x, y, z)
                  	tmp = 0.0
                  	if (y <= 6.2e+35)
                  		tmp = Float64(Float64(x + Float64(log(y) * -0.5)) - z);
                  	else
                  		tmp = Float64(Float64(y * Float64(1.0 - log(y))) - z);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z)
                  	tmp = 0.0;
                  	if (y <= 6.2e+35)
                  		tmp = (x + (log(y) * -0.5)) - z;
                  	else
                  		tmp = (y * (1.0 - log(y))) - z;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_] := If[LessEqual[y, 6.2e+35], N[(N[(x + N[(N[Log[y], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], N[(N[(y * N[(1.0 - N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;y \leq 6.2 \cdot 10^{+35}:\\
                  \;\;\;\;\left(x + \log y \cdot -0.5\right) - z\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;y \cdot \left(1 - \log y\right) - z\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if y < 6.19999999999999973e35

                    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 \mathsf{\_.f64}\left(\color{blue}{\left(x - \frac{1}{2} \cdot \log y\right)}, z\right) \]
                    4. Step-by-step derivation
                      1. sub-negN/A

                        \[\leadsto \mathsf{\_.f64}\left(\left(x + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \log y\right)\right)\right), z\right) \]
                      2. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(\frac{1}{2} \cdot \log y\right)\right)\right), z\right) \]
                      3. *-commutativeN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\mathsf{neg}\left(\log y \cdot \frac{1}{2}\right)\right)\right), z\right) \]
                      4. distribute-rgt-neg-inN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\log y \cdot \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right), z\right) \]
                      5. metadata-evalN/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \left(\log y \cdot \frac{-1}{2}\right)\right), z\right) \]
                      6. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\log y, \frac{-1}{2}\right)\right), z\right) \]
                      7. log-lowering-log.f6498.0%

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{log.f64}\left(y\right), \frac{-1}{2}\right)\right), z\right) \]
                    5. Simplified98.0%

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

                    if 6.19999999999999973e35 < 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 y around inf

                      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(y \cdot \left(1 - -1 \cdot \log \left(\frac{1}{y}\right)\right)\right)}, z\right) \]
                    4. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto \mathsf{\_.f64}\left(\left(y \cdot \left(1 - \left(\mathsf{neg}\left(\log \left(\frac{1}{y}\right)\right)\right)\right)\right), z\right) \]
                      2. log-recN/A

                        \[\leadsto \mathsf{\_.f64}\left(\left(y \cdot \left(1 - \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\log y\right)\right)\right)\right)\right)\right), z\right) \]
                      3. remove-double-negN/A

                        \[\leadsto \mathsf{\_.f64}\left(\left(y \cdot \left(1 - \log y\right)\right), z\right) \]
                      4. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, \left(1 - \log y\right)\right), z\right) \]
                      5. --lowering--.f64N/A

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \log y\right)\right), z\right) \]
                      6. log-lowering-log.f6479.4%

                        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \mathsf{log.f64}\left(y\right)\right)\right), z\right) \]
                    5. Simplified79.4%

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

                  Alternative 10: 99.8% accurate, 1.0× speedup?

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

                    \[\leadsto \left(y + \left(x - \left(y + 0.5\right) \cdot \log y\right)\right) - z \]
                  4. Add Preprocessing

                  Alternative 11: 72.1% accurate, 1.0× speedup?

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

                    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 inf

                      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{x}, z\right) \]
                    4. Step-by-step derivation
                      1. Simplified67.1%

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

                      if 1.8599999999999999e124 < 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. mul-1-negN/A

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

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

                          \[\leadsto y \cdot \left(1 - \log y\right) \]
                        4. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(1 - \log y\right)}\right) \]
                        5. --lowering--.f64N/A

                          \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \color{blue}{\log y}\right)\right) \]
                        6. log-lowering-log.f6468.5%

                          \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(1, \mathsf{log.f64}\left(y\right)\right)\right) \]
                      5. Simplified68.5%

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

                    Alternative 12: 48.1% accurate, 8.5× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -7 \cdot 10^{+74}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{+66}:\\ \;\;\;\;0 - z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                    (FPCore (x y z)
                     :precision binary64
                     (if (<= x -7e+74) x (if (<= x 1.25e+66) (- 0.0 z) x)))
                    double code(double x, double y, double z) {
                    	double tmp;
                    	if (x <= -7e+74) {
                    		tmp = x;
                    	} else if (x <= 1.25e+66) {
                    		tmp = 0.0 - z;
                    	} else {
                    		tmp = x;
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x, y, z)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8) :: tmp
                        if (x <= (-7d+74)) then
                            tmp = x
                        else if (x <= 1.25d+66) then
                            tmp = 0.0d0 - z
                        else
                            tmp = x
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z) {
                    	double tmp;
                    	if (x <= -7e+74) {
                    		tmp = x;
                    	} else if (x <= 1.25e+66) {
                    		tmp = 0.0 - z;
                    	} else {
                    		tmp = x;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z):
                    	tmp = 0
                    	if x <= -7e+74:
                    		tmp = x
                    	elif x <= 1.25e+66:
                    		tmp = 0.0 - z
                    	else:
                    		tmp = x
                    	return tmp
                    
                    function code(x, y, z)
                    	tmp = 0.0
                    	if (x <= -7e+74)
                    		tmp = x;
                    	elseif (x <= 1.25e+66)
                    		tmp = Float64(0.0 - z);
                    	else
                    		tmp = x;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z)
                    	tmp = 0.0;
                    	if (x <= -7e+74)
                    		tmp = x;
                    	elseif (x <= 1.25e+66)
                    		tmp = 0.0 - z;
                    	else
                    		tmp = x;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_] := If[LessEqual[x, -7e+74], x, If[LessEqual[x, 1.25e+66], N[(0.0 - z), $MachinePrecision], x]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;x \leq -7 \cdot 10^{+74}:\\
                    \;\;\;\;x\\
                    
                    \mathbf{elif}\;x \leq 1.25 \cdot 10^{+66}:\\
                    \;\;\;\;0 - z\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x < -7.00000000000000029e74 or 1.24999999999999998e66 < 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 inf

                        \[\leadsto \color{blue}{x} \]
                      4. Step-by-step derivation
                        1. Simplified66.3%

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

                        if -7.00000000000000029e74 < x < 1.24999999999999998e66

                        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 \mathsf{neg}\left(z\right) \]
                          2. neg-sub0N/A

                            \[\leadsto 0 - \color{blue}{z} \]
                          3. --lowering--.f6441.9%

                            \[\leadsto \mathsf{\_.f64}\left(0, \color{blue}{z}\right) \]
                        5. Simplified41.9%

                          \[\leadsto \color{blue}{0 - z} \]
                        6. Step-by-step derivation
                          1. sub0-negN/A

                            \[\leadsto \mathsf{neg}\left(z\right) \]
                          2. neg-lowering-neg.f6441.9%

                            \[\leadsto \mathsf{neg.f64}\left(z\right) \]
                        7. Applied egg-rr41.9%

                          \[\leadsto \color{blue}{-z} \]
                      5. Recombined 2 regimes into one program.
                      6. Final simplification50.4%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7 \cdot 10^{+74}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{+66}:\\ \;\;\;\;0 - z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                      7. Add Preprocessing

                      Alternative 13: 58.0% accurate, 37.0× speedup?

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

                        \[\leadsto \mathsf{\_.f64}\left(\color{blue}{x}, z\right) \]
                      4. Step-by-step derivation
                        1. Simplified55.5%

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

                        Alternative 14: 30.4% accurate, 111.0× speedup?

                        \[\begin{array}{l} \\ x \end{array} \]
                        (FPCore (x y z) :precision binary64 x)
                        double code(double x, double y, double z) {
                        	return x;
                        }
                        
                        real(8) function code(x, y, z)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            code = x
                        end function
                        
                        public static double code(double x, double y, double z) {
                        	return x;
                        }
                        
                        def code(x, y, z):
                        	return x
                        
                        function code(x, y, z)
                        	return x
                        end
                        
                        function tmp = code(x, y, z)
                        	tmp = x;
                        end
                        
                        code[x_, y_, z_] := x
                        
                        \begin{array}{l}
                        
                        \\
                        x
                        \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 inf

                          \[\leadsto \color{blue}{x} \]
                        4. Step-by-step derivation
                          1. Simplified26.3%

                            \[\leadsto \color{blue}{x} \]
                          2. 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 2024158 
                          (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))