Optimisation.CirclePacking:place from circle-packing-0.1.0.4, B

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

Specification

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

\\
\frac{\left(x + y\right) - z}{t \cdot 2}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 99.9% accurate, 1.0× speedup?

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

\\
\frac{\left(x + y\right) - z}{t \cdot 2}
\end{array}

Alternative 1: 99.9% accurate, 1.0× speedup?

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

\\
\frac{\frac{x + \left(y - z\right)}{t}}{2}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
  2. Step-by-step derivation
    1. associate-/r*N/A

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
    4. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
    5. associate--l+N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
    6. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
    7. associate-+l-N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
    8. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
    9. --lowering--.f64100.0%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
  3. Simplified100.0%

    \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
  4. Add Preprocessing
  5. Final simplification100.0%

    \[\leadsto \frac{\frac{x + \left(y - z\right)}{t}}{2} \]
  6. Add Preprocessing

Alternative 2: 80.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z \cdot -0.5}{t}\\ \mathbf{if}\;z \leq -3.7 \cdot 10^{+85}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.44 \cdot 10^{+169}:\\ \;\;\;\;\frac{\frac{x + y}{t}}{2}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (* z -0.5) t)))
   (if (<= z -3.7e+85) t_1 (if (<= z 1.44e+169) (/ (/ (+ x y) t) 2.0) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = (z * -0.5) / t;
	double tmp;
	if (z <= -3.7e+85) {
		tmp = t_1;
	} else if (z <= 1.44e+169) {
		tmp = ((x + y) / t) / 2.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z * (-0.5d0)) / t
    if (z <= (-3.7d+85)) then
        tmp = t_1
    else if (z <= 1.44d+169) then
        tmp = ((x + y) / t) / 2.0d0
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (z * -0.5) / t;
	double tmp;
	if (z <= -3.7e+85) {
		tmp = t_1;
	} else if (z <= 1.44e+169) {
		tmp = ((x + y) / t) / 2.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (z * -0.5) / t
	tmp = 0
	if z <= -3.7e+85:
		tmp = t_1
	elif z <= 1.44e+169:
		tmp = ((x + y) / t) / 2.0
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(z * -0.5) / t)
	tmp = 0.0
	if (z <= -3.7e+85)
		tmp = t_1;
	elseif (z <= 1.44e+169)
		tmp = Float64(Float64(Float64(x + y) / t) / 2.0);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (z * -0.5) / t;
	tmp = 0.0;
	if (z <= -3.7e+85)
		tmp = t_1;
	elseif (z <= 1.44e+169)
		tmp = ((x + y) / t) / 2.0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * -0.5), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -3.7e+85], t$95$1, If[LessEqual[z, 1.44e+169], N[(N[(N[(x + y), $MachinePrecision] / t), $MachinePrecision] / 2.0), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{z \cdot -0.5}{t}\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.44 \cdot 10^{+169}:\\
\;\;\;\;\frac{\frac{x + y}{t}}{2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.7000000000000002e85 or 1.44e169 < z

    1. Initial program 98.6%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
      7. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
      9. --lowering--.f6499.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf

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

        \[\leadsto \frac{\frac{-1}{2} \cdot z}{\color{blue}{t}} \]
      2. metadata-evalN/A

        \[\leadsto \frac{\left(\frac{1}{2} \cdot -1\right) \cdot z}{t} \]
      3. associate-*r*N/A

        \[\leadsto \frac{\frac{1}{2} \cdot \left(-1 \cdot z\right)}{t} \]
      4. mul-1-negN/A

        \[\leadsto \frac{\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)}{t} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)\right), \color{blue}{t}\right) \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(-1 \cdot z\right)\right), t\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{1}{2} \cdot -1\right) \cdot z\right), t\right) \]
      8. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot z\right), t\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \frac{-1}{2}\right), t\right) \]
      10. *-lowering-*.f6472.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \frac{-1}{2}\right), t\right) \]
    7. Simplified72.4%

      \[\leadsto \color{blue}{\frac{z \cdot -0.5}{t}} \]

    if -3.7000000000000002e85 < z < 1.44e169

    1. Initial program 100.0%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
      7. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
      9. --lowering--.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x + y}{t}\right)}, 2\right) \]
    6. Step-by-step derivation
      1. *-lft-identityN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(-1 \cdot -1\right) \cdot x + y}{t}\right), 2\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(-1 \cdot x\right) + y}{t}\right), 2\right) \]
      4. *-lft-identityN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(-1 \cdot x\right) + \left(-1 \cdot -1\right) \cdot y}{t}\right), 2\right) \]
      6. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(-1 \cdot x\right) + -1 \cdot \left(-1 \cdot y\right)}{t}\right), 2\right) \]
      7. distribute-lft-outN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(-1 \cdot x + -1 \cdot y\right)}{t}\right), 2\right) \]
      8. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(-1 \cdot \left(x + y\right)\right)}{t}\right), 2\right) \]
      9. *-rgt-identityN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(\left(-1 \cdot \left(x + y\right)\right) \cdot 1\right)}{t}\right), 2\right) \]
      10. *-inversesN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(\left(-1 \cdot \left(x + y\right)\right) \cdot \frac{z}{z}\right)}{t}\right), 2\right) \]
      11. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \frac{\left(-1 \cdot \left(x + y\right)\right) \cdot z}{z}}{t}\right), 2\right) \]
      12. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(\frac{-1 \cdot \left(x + y\right)}{z} \cdot z\right)}{t}\right), 2\right) \]
      13. associate-*r/N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{x + y}{z}\right)\right)}{t}\right), 2\right) \]
      15. neg-mul-1N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(z \cdot \left(-1 \cdot \frac{x + y}{z}\right)\right)\right), t\right), 2\right) \]
    7. Simplified88.5%

      \[\leadsto \frac{\color{blue}{\frac{y + x}{t}}}{2} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification84.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{+85}:\\ \;\;\;\;\frac{z \cdot -0.5}{t}\\ \mathbf{elif}\;z \leq 1.44 \cdot 10^{+169}:\\ \;\;\;\;\frac{\frac{x + y}{t}}{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot -0.5}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 80.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z \cdot -0.5}{t}\\ \mathbf{if}\;z \leq -2.8 \cdot 10^{+86}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.9 \cdot 10^{+168}:\\ \;\;\;\;\frac{0.5}{t} \cdot \left(x + y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (* z -0.5) t)))
   (if (<= z -2.8e+86) t_1 (if (<= z 5.9e+168) (* (/ 0.5 t) (+ x y)) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = (z * -0.5) / t;
	double tmp;
	if (z <= -2.8e+86) {
		tmp = t_1;
	} else if (z <= 5.9e+168) {
		tmp = (0.5 / t) * (x + y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z * (-0.5d0)) / t
    if (z <= (-2.8d+86)) then
        tmp = t_1
    else if (z <= 5.9d+168) then
        tmp = (0.5d0 / t) * (x + y)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (z * -0.5) / t;
	double tmp;
	if (z <= -2.8e+86) {
		tmp = t_1;
	} else if (z <= 5.9e+168) {
		tmp = (0.5 / t) * (x + y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (z * -0.5) / t
	tmp = 0
	if z <= -2.8e+86:
		tmp = t_1
	elif z <= 5.9e+168:
		tmp = (0.5 / t) * (x + y)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(z * -0.5) / t)
	tmp = 0.0
	if (z <= -2.8e+86)
		tmp = t_1;
	elseif (z <= 5.9e+168)
		tmp = Float64(Float64(0.5 / t) * Float64(x + y));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (z * -0.5) / t;
	tmp = 0.0;
	if (z <= -2.8e+86)
		tmp = t_1;
	elseif (z <= 5.9e+168)
		tmp = (0.5 / t) * (x + y);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * -0.5), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -2.8e+86], t$95$1, If[LessEqual[z, 5.9e+168], N[(N[(0.5 / t), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{z \cdot -0.5}{t}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 5.9 \cdot 10^{+168}:\\
\;\;\;\;\frac{0.5}{t} \cdot \left(x + y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.80000000000000004e86 or 5.89999999999999986e168 < z

    1. Initial program 98.6%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
      7. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
      9. --lowering--.f6499.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf

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

        \[\leadsto \frac{\frac{-1}{2} \cdot z}{\color{blue}{t}} \]
      2. metadata-evalN/A

        \[\leadsto \frac{\left(\frac{1}{2} \cdot -1\right) \cdot z}{t} \]
      3. associate-*r*N/A

        \[\leadsto \frac{\frac{1}{2} \cdot \left(-1 \cdot z\right)}{t} \]
      4. mul-1-negN/A

        \[\leadsto \frac{\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)}{t} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)\right), \color{blue}{t}\right) \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(-1 \cdot z\right)\right), t\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{1}{2} \cdot -1\right) \cdot z\right), t\right) \]
      8. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot z\right), t\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \frac{-1}{2}\right), t\right) \]
      10. *-lowering-*.f6472.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \frac{-1}{2}\right), t\right) \]
    7. Simplified72.4%

      \[\leadsto \color{blue}{\frac{z \cdot -0.5}{t}} \]

    if -2.80000000000000004e86 < z < 5.89999999999999986e168

    1. Initial program 100.0%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
      7. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
      9. --lowering--.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
    3. Simplified100.0%

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

        \[\leadsto \frac{x - \left(z - y\right)}{\color{blue}{2 \cdot t}} \]
      2. clear-numN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{2 \cdot t}\right), \color{blue}{\left(x - \left(z - y\right)\right)}\right) \]
      5. associate-/r*N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2}\right), t\right), \left(\color{blue}{x} - \left(z - y\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \left(x - \left(z - y\right)\right)\right) \]
      8. sub-negN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \color{blue}{\left(z - y\right)}\right)\right)\right) \]
      11. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \left(z + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)\right)\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \left(\left(\mathsf{neg}\left(y\right)\right) + \color{blue}{z}\right)\right)\right)\right) \]
      13. associate--r+N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) - z\right)\right)\right) \]
      15. remove-double-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    6. Applied egg-rr99.7%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \color{blue}{\left(x + y\right)}\right) \]
    8. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(y, \color{blue}{x}\right)\right) \]
    9. Simplified88.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+86}:\\ \;\;\;\;\frac{z \cdot -0.5}{t}\\ \mathbf{elif}\;z \leq 5.9 \cdot 10^{+168}:\\ \;\;\;\;\frac{0.5}{t} \cdot \left(x + y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot -0.5}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 47.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+64}:\\ \;\;\;\;\frac{\frac{x}{t}}{2}\\ \mathbf{elif}\;x \leq -4.8 \cdot 10^{-110}:\\ \;\;\;\;\frac{z \cdot -0.5}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{t}}{2}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -2.5e+64)
   (/ (/ x t) 2.0)
   (if (<= x -4.8e-110) (/ (* z -0.5) t) (/ (/ y t) 2.0))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -2.5e+64) {
		tmp = (x / t) / 2.0;
	} else if (x <= -4.8e-110) {
		tmp = (z * -0.5) / t;
	} else {
		tmp = (y / t) / 2.0;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-2.5d+64)) then
        tmp = (x / t) / 2.0d0
    else if (x <= (-4.8d-110)) then
        tmp = (z * (-0.5d0)) / t
    else
        tmp = (y / t) / 2.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -2.5e+64) {
		tmp = (x / t) / 2.0;
	} else if (x <= -4.8e-110) {
		tmp = (z * -0.5) / t;
	} else {
		tmp = (y / t) / 2.0;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -2.5e+64:
		tmp = (x / t) / 2.0
	elif x <= -4.8e-110:
		tmp = (z * -0.5) / t
	else:
		tmp = (y / t) / 2.0
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -2.5e+64)
		tmp = Float64(Float64(x / t) / 2.0);
	elseif (x <= -4.8e-110)
		tmp = Float64(Float64(z * -0.5) / t);
	else
		tmp = Float64(Float64(y / t) / 2.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -2.5e+64)
		tmp = (x / t) / 2.0;
	elseif (x <= -4.8e-110)
		tmp = (z * -0.5) / t;
	else
		tmp = (y / t) / 2.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.5e+64], N[(N[(x / t), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, -4.8e-110], N[(N[(z * -0.5), $MachinePrecision] / t), $MachinePrecision], N[(N[(y / t), $MachinePrecision] / 2.0), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+64}:\\
\;\;\;\;\frac{\frac{x}{t}}{2}\\

\mathbf{elif}\;x \leq -4.8 \cdot 10^{-110}:\\
\;\;\;\;\frac{z \cdot -0.5}{t}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{t}}{2}\\


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

    1. Initial program 100.0%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
      7. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
      9. --lowering--.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x}{t}\right)}, 2\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6487.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), 2\right) \]
    7. Simplified87.2%

      \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{2} \]

    if -2.5e64 < x < -4.80000000000000013e-110

    1. Initial program 99.9%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
      7. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
      9. --lowering--.f6499.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf

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

        \[\leadsto \frac{\frac{-1}{2} \cdot z}{\color{blue}{t}} \]
      2. metadata-evalN/A

        \[\leadsto \frac{\left(\frac{1}{2} \cdot -1\right) \cdot z}{t} \]
      3. associate-*r*N/A

        \[\leadsto \frac{\frac{1}{2} \cdot \left(-1 \cdot z\right)}{t} \]
      4. mul-1-negN/A

        \[\leadsto \frac{\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)}{t} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)\right), \color{blue}{t}\right) \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(-1 \cdot z\right)\right), t\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{1}{2} \cdot -1\right) \cdot z\right), t\right) \]
      8. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot z\right), t\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \frac{-1}{2}\right), t\right) \]
      10. *-lowering-*.f6443.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \frac{-1}{2}\right), t\right) \]
    7. Simplified43.8%

      \[\leadsto \color{blue}{\frac{z \cdot -0.5}{t}} \]

    if -4.80000000000000013e-110 < x

    1. Initial program 99.4%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
      7. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
      9. --lowering--.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{y}{t}\right)}, 2\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6446.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(y, t\right), 2\right) \]
    7. Simplified46.9%

      \[\leadsto \frac{\color{blue}{\frac{y}{t}}}{2} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 5: 47.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+64}:\\ \;\;\;\;\frac{\frac{x}{t}}{2}\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{-110}:\\ \;\;\;\;\frac{z \cdot -0.5}{t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{0.5}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -2.5e+64)
   (/ (/ x t) 2.0)
   (if (<= x -3.5e-110) (/ (* z -0.5) t) (* y (/ 0.5 t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -2.5e+64) {
		tmp = (x / t) / 2.0;
	} else if (x <= -3.5e-110) {
		tmp = (z * -0.5) / t;
	} else {
		tmp = y * (0.5 / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-2.5d+64)) then
        tmp = (x / t) / 2.0d0
    else if (x <= (-3.5d-110)) then
        tmp = (z * (-0.5d0)) / t
    else
        tmp = y * (0.5d0 / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -2.5e+64) {
		tmp = (x / t) / 2.0;
	} else if (x <= -3.5e-110) {
		tmp = (z * -0.5) / t;
	} else {
		tmp = y * (0.5 / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -2.5e+64:
		tmp = (x / t) / 2.0
	elif x <= -3.5e-110:
		tmp = (z * -0.5) / t
	else:
		tmp = y * (0.5 / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -2.5e+64)
		tmp = Float64(Float64(x / t) / 2.0);
	elseif (x <= -3.5e-110)
		tmp = Float64(Float64(z * -0.5) / t);
	else
		tmp = Float64(y * Float64(0.5 / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -2.5e+64)
		tmp = (x / t) / 2.0;
	elseif (x <= -3.5e-110)
		tmp = (z * -0.5) / t;
	else
		tmp = y * (0.5 / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.5e+64], N[(N[(x / t), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[x, -3.5e-110], N[(N[(z * -0.5), $MachinePrecision] / t), $MachinePrecision], N[(y * N[(0.5 / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+64}:\\
\;\;\;\;\frac{\frac{x}{t}}{2}\\

\mathbf{elif}\;x \leq -3.5 \cdot 10^{-110}:\\
\;\;\;\;\frac{z \cdot -0.5}{t}\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{0.5}{t}\\


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

    1. Initial program 100.0%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
      7. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
      9. --lowering--.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x}{t}\right)}, 2\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6487.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), 2\right) \]
    7. Simplified87.2%

      \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{2} \]

    if -2.5e64 < x < -3.49999999999999974e-110

    1. Initial program 99.9%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
      7. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
      9. --lowering--.f6499.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf

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

        \[\leadsto \frac{\frac{-1}{2} \cdot z}{\color{blue}{t}} \]
      2. metadata-evalN/A

        \[\leadsto \frac{\left(\frac{1}{2} \cdot -1\right) \cdot z}{t} \]
      3. associate-*r*N/A

        \[\leadsto \frac{\frac{1}{2} \cdot \left(-1 \cdot z\right)}{t} \]
      4. mul-1-negN/A

        \[\leadsto \frac{\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)}{t} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)\right), \color{blue}{t}\right) \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(-1 \cdot z\right)\right), t\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{1}{2} \cdot -1\right) \cdot z\right), t\right) \]
      8. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot z\right), t\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \frac{-1}{2}\right), t\right) \]
      10. *-lowering-*.f6443.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \frac{-1}{2}\right), t\right) \]
    7. Simplified43.8%

      \[\leadsto \color{blue}{\frac{z \cdot -0.5}{t}} \]

    if -3.49999999999999974e-110 < x

    1. Initial program 99.4%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
      7. associate-+l-N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
      9. --lowering--.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
    3. Simplified100.0%

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

        \[\leadsto \frac{x - \left(z - y\right)}{\color{blue}{2 \cdot t}} \]
      2. clear-numN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{2 \cdot t}\right), \color{blue}{\left(x - \left(z - y\right)\right)}\right) \]
      5. associate-/r*N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2}\right), t\right), \left(\color{blue}{x} - \left(z - y\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \left(x - \left(z - y\right)\right)\right) \]
      8. sub-negN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \color{blue}{\left(z - y\right)}\right)\right)\right) \]
      11. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \left(z + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)\right)\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \left(\left(\mathsf{neg}\left(y\right)\right) + \color{blue}{z}\right)\right)\right)\right) \]
      13. associate--r+N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) - z\right)\right)\right) \]
      15. remove-double-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
    6. Applied egg-rr99.6%

      \[\leadsto \color{blue}{\frac{0.5}{t} \cdot \left(x + \left(y - z\right)\right)} \]
    7. Taylor expanded in y around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \color{blue}{y}\right) \]
    8. Step-by-step derivation
      1. Simplified46.8%

        \[\leadsto \frac{0.5}{t} \cdot \color{blue}{y} \]
    9. Recombined 3 regimes into one program.
    10. Final simplification52.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{+64}:\\ \;\;\;\;\frac{\frac{x}{t}}{2}\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{-110}:\\ \;\;\;\;\frac{z \cdot -0.5}{t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{0.5}{t}\\ \end{array} \]
    11. Add Preprocessing

    Alternative 6: 47.7% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.6 \cdot 10^{+64}:\\ \;\;\;\;\frac{0.5}{\frac{t}{x}}\\ \mathbf{elif}\;x \leq -4 \cdot 10^{-110}:\\ \;\;\;\;\frac{z \cdot -0.5}{t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{0.5}{t}\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (if (<= x -2.6e+64)
       (/ 0.5 (/ t x))
       (if (<= x -4e-110) (/ (* z -0.5) t) (* y (/ 0.5 t)))))
    double code(double x, double y, double z, double t) {
    	double tmp;
    	if (x <= -2.6e+64) {
    		tmp = 0.5 / (t / x);
    	} else if (x <= -4e-110) {
    		tmp = (z * -0.5) / t;
    	} else {
    		tmp = y * (0.5 / t);
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8) :: tmp
        if (x <= (-2.6d+64)) then
            tmp = 0.5d0 / (t / x)
        else if (x <= (-4d-110)) then
            tmp = (z * (-0.5d0)) / t
        else
            tmp = y * (0.5d0 / t)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double tmp;
    	if (x <= -2.6e+64) {
    		tmp = 0.5 / (t / x);
    	} else if (x <= -4e-110) {
    		tmp = (z * -0.5) / t;
    	} else {
    		tmp = y * (0.5 / t);
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	tmp = 0
    	if x <= -2.6e+64:
    		tmp = 0.5 / (t / x)
    	elif x <= -4e-110:
    		tmp = (z * -0.5) / t
    	else:
    		tmp = y * (0.5 / t)
    	return tmp
    
    function code(x, y, z, t)
    	tmp = 0.0
    	if (x <= -2.6e+64)
    		tmp = Float64(0.5 / Float64(t / x));
    	elseif (x <= -4e-110)
    		tmp = Float64(Float64(z * -0.5) / t);
    	else
    		tmp = Float64(y * Float64(0.5 / t));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	tmp = 0.0;
    	if (x <= -2.6e+64)
    		tmp = 0.5 / (t / x);
    	elseif (x <= -4e-110)
    		tmp = (z * -0.5) / t;
    	else
    		tmp = y * (0.5 / t);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := If[LessEqual[x, -2.6e+64], N[(0.5 / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4e-110], N[(N[(z * -0.5), $MachinePrecision] / t), $MachinePrecision], N[(y * N[(0.5 / t), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;x \leq -2.6 \cdot 10^{+64}:\\
    \;\;\;\;\frac{0.5}{\frac{t}{x}}\\
    
    \mathbf{elif}\;x \leq -4 \cdot 10^{-110}:\\
    \;\;\;\;\frac{z \cdot -0.5}{t}\\
    
    \mathbf{else}:\\
    \;\;\;\;y \cdot \frac{0.5}{t}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if x < -2.59999999999999997e64

      1. Initial program 100.0%

        \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
      2. Step-by-step derivation
        1. associate-/r*N/A

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
        4. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
        5. associate--l+N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
        6. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
        7. associate-+l-N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
        8. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
        9. --lowering--.f64100.0%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
      4. Add Preprocessing
      5. Taylor expanded in x around inf

        \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x}{t}\right)}, 2\right) \]
      6. Step-by-step derivation
        1. /-lowering-/.f6487.2%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), 2\right) \]
      7. Simplified87.2%

        \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{2} \]
      8. Step-by-step derivation
        1. div-invN/A

          \[\leadsto \frac{x}{t} \cdot \color{blue}{\frac{1}{2}} \]
        2. clear-numN/A

          \[\leadsto \frac{1}{\frac{t}{x}} \cdot \frac{\color{blue}{1}}{2} \]
        3. metadata-evalN/A

          \[\leadsto \frac{1}{\frac{t}{x}} \cdot \frac{1}{2} \]
        4. associate-*l/N/A

          \[\leadsto \frac{1 \cdot \frac{1}{2}}{\color{blue}{\frac{t}{x}}} \]
        5. metadata-evalN/A

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

          \[\leadsto \mathsf{/.f64}\left(\frac{1}{2}, \color{blue}{\left(\frac{t}{x}\right)}\right) \]
        7. /-lowering-/.f6487.0%

          \[\leadsto \mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(t, \color{blue}{x}\right)\right) \]
      9. Applied egg-rr87.0%

        \[\leadsto \color{blue}{\frac{0.5}{\frac{t}{x}}} \]

      if -2.59999999999999997e64 < x < -4.0000000000000002e-110

      1. Initial program 99.9%

        \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
      2. Step-by-step derivation
        1. associate-/r*N/A

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
        4. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
        5. associate--l+N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
        6. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
        7. associate-+l-N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
        8. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
        9. --lowering--.f6499.9%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
      3. Simplified99.9%

        \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
      4. Add Preprocessing
      5. Taylor expanded in z around inf

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

          \[\leadsto \frac{\frac{-1}{2} \cdot z}{\color{blue}{t}} \]
        2. metadata-evalN/A

          \[\leadsto \frac{\left(\frac{1}{2} \cdot -1\right) \cdot z}{t} \]
        3. associate-*r*N/A

          \[\leadsto \frac{\frac{1}{2} \cdot \left(-1 \cdot z\right)}{t} \]
        4. mul-1-negN/A

          \[\leadsto \frac{\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)}{t} \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)\right), \color{blue}{t}\right) \]
        6. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(-1 \cdot z\right)\right), t\right) \]
        7. associate-*r*N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{1}{2} \cdot -1\right) \cdot z\right), t\right) \]
        8. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot z\right), t\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \frac{-1}{2}\right), t\right) \]
        10. *-lowering-*.f6443.8%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \frac{-1}{2}\right), t\right) \]
      7. Simplified43.8%

        \[\leadsto \color{blue}{\frac{z \cdot -0.5}{t}} \]

      if -4.0000000000000002e-110 < x

      1. Initial program 99.4%

        \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
      2. Step-by-step derivation
        1. associate-/r*N/A

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
        4. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
        5. associate--l+N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
        6. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
        7. associate-+l-N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
        8. --lowering--.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
        9. --lowering--.f64100.0%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
      3. Simplified100.0%

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

          \[\leadsto \frac{x - \left(z - y\right)}{\color{blue}{2 \cdot t}} \]
        2. clear-numN/A

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

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

          \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{2 \cdot t}\right), \color{blue}{\left(x - \left(z - y\right)\right)}\right) \]
        5. associate-/r*N/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2}\right), t\right), \left(\color{blue}{x} - \left(z - y\right)\right)\right) \]
        7. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \left(x - \left(z - y\right)\right)\right) \]
        8. sub-negN/A

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \color{blue}{\left(z - y\right)}\right)\right)\right) \]
        11. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \left(z + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)\right)\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \left(\left(\mathsf{neg}\left(y\right)\right) + \color{blue}{z}\right)\right)\right)\right) \]
        13. associate--r+N/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) - z\right)\right)\right) \]
        15. remove-double-negN/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
      6. Applied egg-rr99.6%

        \[\leadsto \color{blue}{\frac{0.5}{t} \cdot \left(x + \left(y - z\right)\right)} \]
      7. Taylor expanded in y around inf

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \color{blue}{y}\right) \]
      8. Step-by-step derivation
        1. Simplified46.8%

          \[\leadsto \frac{0.5}{t} \cdot \color{blue}{y} \]
      9. Recombined 3 regimes into one program.
      10. Final simplification52.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.6 \cdot 10^{+64}:\\ \;\;\;\;\frac{0.5}{\frac{t}{x}}\\ \mathbf{elif}\;x \leq -4 \cdot 10^{-110}:\\ \;\;\;\;\frac{z \cdot -0.5}{t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{0.5}{t}\\ \end{array} \]
      11. Add Preprocessing

      Alternative 7: 47.7% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.6 \cdot 10^{+64}:\\ \;\;\;\;\frac{0.5}{\frac{t}{x}}\\ \mathbf{elif}\;x \leq -3.3 \cdot 10^{-110}:\\ \;\;\;\;z \cdot \frac{-0.5}{t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{0.5}{t}\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (if (<= x -3.6e+64)
         (/ 0.5 (/ t x))
         (if (<= x -3.3e-110) (* z (/ -0.5 t)) (* y (/ 0.5 t)))))
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if (x <= -3.6e+64) {
      		tmp = 0.5 / (t / x);
      	} else if (x <= -3.3e-110) {
      		tmp = z * (-0.5 / t);
      	} else {
      		tmp = y * (0.5 / t);
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8) :: tmp
          if (x <= (-3.6d+64)) then
              tmp = 0.5d0 / (t / x)
          else if (x <= (-3.3d-110)) then
              tmp = z * ((-0.5d0) / t)
          else
              tmp = y * (0.5d0 / t)
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t) {
      	double tmp;
      	if (x <= -3.6e+64) {
      		tmp = 0.5 / (t / x);
      	} else if (x <= -3.3e-110) {
      		tmp = z * (-0.5 / t);
      	} else {
      		tmp = y * (0.5 / t);
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	tmp = 0
      	if x <= -3.6e+64:
      		tmp = 0.5 / (t / x)
      	elif x <= -3.3e-110:
      		tmp = z * (-0.5 / t)
      	else:
      		tmp = y * (0.5 / t)
      	return tmp
      
      function code(x, y, z, t)
      	tmp = 0.0
      	if (x <= -3.6e+64)
      		tmp = Float64(0.5 / Float64(t / x));
      	elseif (x <= -3.3e-110)
      		tmp = Float64(z * Float64(-0.5 / t));
      	else
      		tmp = Float64(y * Float64(0.5 / t));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t)
      	tmp = 0.0;
      	if (x <= -3.6e+64)
      		tmp = 0.5 / (t / x);
      	elseif (x <= -3.3e-110)
      		tmp = z * (-0.5 / t);
      	else
      		tmp = y * (0.5 / t);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := If[LessEqual[x, -3.6e+64], N[(0.5 / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.3e-110], N[(z * N[(-0.5 / t), $MachinePrecision]), $MachinePrecision], N[(y * N[(0.5 / t), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -3.6 \cdot 10^{+64}:\\
      \;\;\;\;\frac{0.5}{\frac{t}{x}}\\
      
      \mathbf{elif}\;x \leq -3.3 \cdot 10^{-110}:\\
      \;\;\;\;z \cdot \frac{-0.5}{t}\\
      
      \mathbf{else}:\\
      \;\;\;\;y \cdot \frac{0.5}{t}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if x < -3.60000000000000014e64

        1. Initial program 100.0%

          \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
        2. Step-by-step derivation
          1. associate-/r*N/A

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
          4. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
          5. associate--l+N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
          6. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
          7. associate-+l-N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
          8. --lowering--.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
          9. --lowering--.f64100.0%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
        3. Simplified100.0%

          \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
        4. Add Preprocessing
        5. Taylor expanded in x around inf

          \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x}{t}\right)}, 2\right) \]
        6. Step-by-step derivation
          1. /-lowering-/.f6487.2%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, t\right), 2\right) \]
        7. Simplified87.2%

          \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{2} \]
        8. Step-by-step derivation
          1. div-invN/A

            \[\leadsto \frac{x}{t} \cdot \color{blue}{\frac{1}{2}} \]
          2. clear-numN/A

            \[\leadsto \frac{1}{\frac{t}{x}} \cdot \frac{\color{blue}{1}}{2} \]
          3. metadata-evalN/A

            \[\leadsto \frac{1}{\frac{t}{x}} \cdot \frac{1}{2} \]
          4. associate-*l/N/A

            \[\leadsto \frac{1 \cdot \frac{1}{2}}{\color{blue}{\frac{t}{x}}} \]
          5. metadata-evalN/A

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

            \[\leadsto \mathsf{/.f64}\left(\frac{1}{2}, \color{blue}{\left(\frac{t}{x}\right)}\right) \]
          7. /-lowering-/.f6487.0%

            \[\leadsto \mathsf{/.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(t, \color{blue}{x}\right)\right) \]
        9. Applied egg-rr87.0%

          \[\leadsto \color{blue}{\frac{0.5}{\frac{t}{x}}} \]

        if -3.60000000000000014e64 < x < -3.2999999999999999e-110

        1. Initial program 99.9%

          \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
        2. Step-by-step derivation
          1. associate-/r*N/A

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
          4. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
          5. associate--l+N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
          6. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
          7. associate-+l-N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
          8. --lowering--.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
          9. --lowering--.f6499.9%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
        3. Simplified99.9%

          \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
        4. Add Preprocessing
        5. Taylor expanded in z around inf

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

            \[\leadsto \frac{\frac{-1}{2} \cdot z}{\color{blue}{t}} \]
          2. metadata-evalN/A

            \[\leadsto \frac{\left(\frac{1}{2} \cdot -1\right) \cdot z}{t} \]
          3. associate-*r*N/A

            \[\leadsto \frac{\frac{1}{2} \cdot \left(-1 \cdot z\right)}{t} \]
          4. mul-1-negN/A

            \[\leadsto \frac{\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)}{t} \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)\right), \color{blue}{t}\right) \]
          6. mul-1-negN/A

            \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(-1 \cdot z\right)\right), t\right) \]
          7. associate-*r*N/A

            \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{1}{2} \cdot -1\right) \cdot z\right), t\right) \]
          8. metadata-evalN/A

            \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot z\right), t\right) \]
          9. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \frac{-1}{2}\right), t\right) \]
          10. *-lowering-*.f6443.8%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \frac{-1}{2}\right), t\right) \]
        7. Simplified43.8%

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

            \[\leadsto z \cdot \color{blue}{\frac{\frac{-1}{2}}{t}} \]
          2. *-commutativeN/A

            \[\leadsto \frac{\frac{-1}{2}}{t} \cdot \color{blue}{z} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2}}{t}\right), \color{blue}{z}\right) \]
          4. /-lowering-/.f6443.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{2}, t\right), z\right) \]
        9. Applied egg-rr43.7%

          \[\leadsto \color{blue}{\frac{-0.5}{t} \cdot z} \]

        if -3.2999999999999999e-110 < x

        1. Initial program 99.4%

          \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
        2. Step-by-step derivation
          1. associate-/r*N/A

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
          4. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
          5. associate--l+N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
          6. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
          7. associate-+l-N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
          8. --lowering--.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
          9. --lowering--.f64100.0%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
        3. Simplified100.0%

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

            \[\leadsto \frac{x - \left(z - y\right)}{\color{blue}{2 \cdot t}} \]
          2. clear-numN/A

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

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

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{2 \cdot t}\right), \color{blue}{\left(x - \left(z - y\right)\right)}\right) \]
          5. associate-/r*N/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2}\right), t\right), \left(\color{blue}{x} - \left(z - y\right)\right)\right) \]
          7. metadata-evalN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \left(x - \left(z - y\right)\right)\right) \]
          8. sub-negN/A

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \color{blue}{\left(z - y\right)}\right)\right)\right) \]
          11. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \left(z + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)\right)\right)\right) \]
          12. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \left(\left(\mathsf{neg}\left(y\right)\right) + \color{blue}{z}\right)\right)\right)\right) \]
          13. associate--r+N/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) - z\right)\right)\right) \]
          15. remove-double-negN/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
        6. Applied egg-rr99.6%

          \[\leadsto \color{blue}{\frac{0.5}{t} \cdot \left(x + \left(y - z\right)\right)} \]
        7. Taylor expanded in y around inf

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \color{blue}{y}\right) \]
        8. Step-by-step derivation
          1. Simplified46.8%

            \[\leadsto \frac{0.5}{t} \cdot \color{blue}{y} \]
        9. Recombined 3 regimes into one program.
        10. Final simplification52.8%

          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.6 \cdot 10^{+64}:\\ \;\;\;\;\frac{0.5}{\frac{t}{x}}\\ \mathbf{elif}\;x \leq -3.3 \cdot 10^{-110}:\\ \;\;\;\;z \cdot \frac{-0.5}{t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{0.5}{t}\\ \end{array} \]
        11. Add Preprocessing

        Alternative 8: 56.5% accurate, 0.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{-0.5}{t}\\ \mathbf{if}\;z \leq -128000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.3 \cdot 10^{+50}:\\ \;\;\;\;y \cdot \frac{0.5}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (* z (/ -0.5 t))))
           (if (<= z -128000.0) t_1 (if (<= z 7.3e+50) (* y (/ 0.5 t)) t_1))))
        double code(double x, double y, double z, double t) {
        	double t_1 = z * (-0.5 / t);
        	double tmp;
        	if (z <= -128000.0) {
        		tmp = t_1;
        	} else if (z <= 7.3e+50) {
        		tmp = y * (0.5 / t);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z, t)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8) :: t_1
            real(8) :: tmp
            t_1 = z * ((-0.5d0) / t)
            if (z <= (-128000.0d0)) then
                tmp = t_1
            else if (z <= 7.3d+50) then
                tmp = y * (0.5d0 / t)
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t) {
        	double t_1 = z * (-0.5 / t);
        	double tmp;
        	if (z <= -128000.0) {
        		tmp = t_1;
        	} else if (z <= 7.3e+50) {
        		tmp = y * (0.5 / t);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	t_1 = z * (-0.5 / t)
        	tmp = 0
        	if z <= -128000.0:
        		tmp = t_1
        	elif z <= 7.3e+50:
        		tmp = y * (0.5 / t)
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t)
        	t_1 = Float64(z * Float64(-0.5 / t))
        	tmp = 0.0
        	if (z <= -128000.0)
        		tmp = t_1;
        	elseif (z <= 7.3e+50)
        		tmp = Float64(y * Float64(0.5 / t));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	t_1 = z * (-0.5 / t);
        	tmp = 0.0;
        	if (z <= -128000.0)
        		tmp = t_1;
        	elseif (z <= 7.3e+50)
        		tmp = y * (0.5 / t);
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(-0.5 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -128000.0], t$95$1, If[LessEqual[z, 7.3e+50], N[(y * N[(0.5 / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := z \cdot \frac{-0.5}{t}\\
        \mathbf{if}\;z \leq -128000:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq 7.3 \cdot 10^{+50}:\\
        \;\;\;\;y \cdot \frac{0.5}{t}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -128000 or 7.3000000000000003e50 < z

          1. Initial program 99.0%

            \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
          2. Step-by-step derivation
            1. associate-/r*N/A

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
            4. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
            5. associate--l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
            6. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
            7. associate-+l-N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
            8. --lowering--.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
            9. --lowering--.f64100.0%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
          3. Simplified100.0%

            \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
          4. Add Preprocessing
          5. Taylor expanded in z around inf

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

              \[\leadsto \frac{\frac{-1}{2} \cdot z}{\color{blue}{t}} \]
            2. metadata-evalN/A

              \[\leadsto \frac{\left(\frac{1}{2} \cdot -1\right) \cdot z}{t} \]
            3. associate-*r*N/A

              \[\leadsto \frac{\frac{1}{2} \cdot \left(-1 \cdot z\right)}{t} \]
            4. mul-1-negN/A

              \[\leadsto \frac{\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)}{t} \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)\right), \color{blue}{t}\right) \]
            6. mul-1-negN/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(-1 \cdot z\right)\right), t\right) \]
            7. associate-*r*N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{1}{2} \cdot -1\right) \cdot z\right), t\right) \]
            8. metadata-evalN/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot z\right), t\right) \]
            9. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \frac{-1}{2}\right), t\right) \]
            10. *-lowering-*.f6461.6%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \frac{-1}{2}\right), t\right) \]
          7. Simplified61.6%

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

              \[\leadsto z \cdot \color{blue}{\frac{\frac{-1}{2}}{t}} \]
            2. *-commutativeN/A

              \[\leadsto \frac{\frac{-1}{2}}{t} \cdot \color{blue}{z} \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2}}{t}\right), \color{blue}{z}\right) \]
            4. /-lowering-/.f6461.3%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{2}, t\right), z\right) \]
          9. Applied egg-rr61.3%

            \[\leadsto \color{blue}{\frac{-0.5}{t} \cdot z} \]

          if -128000 < z < 7.3000000000000003e50

          1. Initial program 99.9%

            \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
          2. Step-by-step derivation
            1. associate-/r*N/A

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
            4. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
            5. associate--l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
            6. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
            7. associate-+l-N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
            8. --lowering--.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
            9. --lowering--.f6499.9%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
          3. Simplified99.9%

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

              \[\leadsto \frac{x - \left(z - y\right)}{\color{blue}{2 \cdot t}} \]
            2. clear-numN/A

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

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

              \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{2 \cdot t}\right), \color{blue}{\left(x - \left(z - y\right)\right)}\right) \]
            5. associate-/r*N/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2}\right), t\right), \left(\color{blue}{x} - \left(z - y\right)\right)\right) \]
            7. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \left(x - \left(z - y\right)\right)\right) \]
            8. sub-negN/A

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \color{blue}{\left(z - y\right)}\right)\right)\right) \]
            11. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \left(z + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)\right)\right)\right) \]
            12. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \left(\left(\mathsf{neg}\left(y\right)\right) + \color{blue}{z}\right)\right)\right)\right) \]
            13. associate--r+N/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) - z\right)\right)\right) \]
            15. remove-double-negN/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
          6. Applied egg-rr99.7%

            \[\leadsto \color{blue}{\frac{0.5}{t} \cdot \left(x + \left(y - z\right)\right)} \]
          7. Taylor expanded in y around inf

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \color{blue}{y}\right) \]
          8. Step-by-step derivation
            1. Simplified51.5%

              \[\leadsto \frac{0.5}{t} \cdot \color{blue}{y} \]
          9. Recombined 2 regimes into one program.
          10. Final simplification55.6%

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -128000:\\ \;\;\;\;z \cdot \frac{-0.5}{t}\\ \mathbf{elif}\;z \leq 7.3 \cdot 10^{+50}:\\ \;\;\;\;y \cdot \frac{0.5}{t}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{-0.5}{t}\\ \end{array} \]
          11. Add Preprocessing

          Alternative 9: 68.9% accurate, 0.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x + y \leq -1 \cdot 10^{-113}:\\ \;\;\;\;\frac{\frac{x - z}{t}}{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y - z}{t}}{2}\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (if (<= (+ x y) -1e-113) (/ (/ (- x z) t) 2.0) (/ (/ (- y z) t) 2.0)))
          double code(double x, double y, double z, double t) {
          	double tmp;
          	if ((x + y) <= -1e-113) {
          		tmp = ((x - z) / t) / 2.0;
          	} else {
          		tmp = ((y - z) / t) / 2.0;
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z, t)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8) :: tmp
              if ((x + y) <= (-1d-113)) then
                  tmp = ((x - z) / t) / 2.0d0
              else
                  tmp = ((y - z) / t) / 2.0d0
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double tmp;
          	if ((x + y) <= -1e-113) {
          		tmp = ((x - z) / t) / 2.0;
          	} else {
          		tmp = ((y - z) / t) / 2.0;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	tmp = 0
          	if (x + y) <= -1e-113:
          		tmp = ((x - z) / t) / 2.0
          	else:
          		tmp = ((y - z) / t) / 2.0
          	return tmp
          
          function code(x, y, z, t)
          	tmp = 0.0
          	if (Float64(x + y) <= -1e-113)
          		tmp = Float64(Float64(Float64(x - z) / t) / 2.0);
          	else
          		tmp = Float64(Float64(Float64(y - z) / t) / 2.0);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	tmp = 0.0;
          	if ((x + y) <= -1e-113)
          		tmp = ((x - z) / t) / 2.0;
          	else
          		tmp = ((y - z) / t) / 2.0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := If[LessEqual[N[(x + y), $MachinePrecision], -1e-113], N[(N[(N[(x - z), $MachinePrecision] / t), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision] / 2.0), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x + y \leq -1 \cdot 10^{-113}:\\
          \;\;\;\;\frac{\frac{x - z}{t}}{2}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\frac{y - z}{t}}{2}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 x y) < -9.99999999999999979e-114

            1. Initial program 99.9%

              \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
            2. Step-by-step derivation
              1. associate-/r*N/A

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
              4. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
              5. associate--l+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
              6. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
              7. associate-+l-N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
              8. --lowering--.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
              9. --lowering--.f6499.9%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
            3. Simplified99.9%

              \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
            4. Add Preprocessing
            5. Taylor expanded in y around 0

              \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x - z}{t}\right)}, 2\right) \]
            6. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - z\right), t\right), 2\right) \]
              2. --lowering--.f6462.7%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, z\right), t\right), 2\right) \]
            7. Simplified62.7%

              \[\leadsto \frac{\color{blue}{\frac{x - z}{t}}}{2} \]

            if -9.99999999999999979e-114 < (+.f64 x y)

            1. Initial program 99.4%

              \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
            2. Step-by-step derivation
              1. associate-/r*N/A

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
              4. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
              5. associate--l+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
              6. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
              7. associate-+l-N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
              8. --lowering--.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
              9. --lowering--.f64100.0%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
            3. Simplified100.0%

              \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
            4. Add Preprocessing
            5. Taylor expanded in x around 0

              \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{y - z}{t}\right)}, 2\right) \]
            6. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y - z\right), t\right), 2\right) \]
              2. --lowering--.f6472.2%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, z\right), t\right), 2\right) \]
            7. Simplified72.2%

              \[\leadsto \frac{\color{blue}{\frac{y - z}{t}}}{2} \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 10: 73.6% accurate, 0.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x + y \leq 1.3 \cdot 10^{-52}:\\ \;\;\;\;\frac{\frac{x - z}{t}}{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x + y}{t}}{2}\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (if (<= (+ x y) 1.3e-52) (/ (/ (- x z) t) 2.0) (/ (/ (+ x y) t) 2.0)))
          double code(double x, double y, double z, double t) {
          	double tmp;
          	if ((x + y) <= 1.3e-52) {
          		tmp = ((x - z) / t) / 2.0;
          	} else {
          		tmp = ((x + y) / t) / 2.0;
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z, t)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8) :: tmp
              if ((x + y) <= 1.3d-52) then
                  tmp = ((x - z) / t) / 2.0d0
              else
                  tmp = ((x + y) / t) / 2.0d0
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double tmp;
          	if ((x + y) <= 1.3e-52) {
          		tmp = ((x - z) / t) / 2.0;
          	} else {
          		tmp = ((x + y) / t) / 2.0;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	tmp = 0
          	if (x + y) <= 1.3e-52:
          		tmp = ((x - z) / t) / 2.0
          	else:
          		tmp = ((x + y) / t) / 2.0
          	return tmp
          
          function code(x, y, z, t)
          	tmp = 0.0
          	if (Float64(x + y) <= 1.3e-52)
          		tmp = Float64(Float64(Float64(x - z) / t) / 2.0);
          	else
          		tmp = Float64(Float64(Float64(x + y) / t) / 2.0);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	tmp = 0.0;
          	if ((x + y) <= 1.3e-52)
          		tmp = ((x - z) / t) / 2.0;
          	else
          		tmp = ((x + y) / t) / 2.0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := If[LessEqual[N[(x + y), $MachinePrecision], 1.3e-52], N[(N[(N[(x - z), $MachinePrecision] / t), $MachinePrecision] / 2.0), $MachinePrecision], N[(N[(N[(x + y), $MachinePrecision] / t), $MachinePrecision] / 2.0), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x + y \leq 1.3 \cdot 10^{-52}:\\
          \;\;\;\;\frac{\frac{x - z}{t}}{2}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\frac{x + y}{t}}{2}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 x y) < 1.2999999999999999e-52

            1. Initial program 99.9%

              \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
            2. Step-by-step derivation
              1. associate-/r*N/A

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
              4. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
              5. associate--l+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
              6. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
              7. associate-+l-N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
              8. --lowering--.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
              9. --lowering--.f6499.9%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
            3. Simplified99.9%

              \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
            4. Add Preprocessing
            5. Taylor expanded in y around 0

              \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x - z}{t}\right)}, 2\right) \]
            6. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - z\right), t\right), 2\right) \]
              2. --lowering--.f6470.3%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, z\right), t\right), 2\right) \]
            7. Simplified70.3%

              \[\leadsto \frac{\color{blue}{\frac{x - z}{t}}}{2} \]

            if 1.2999999999999999e-52 < (+.f64 x y)

            1. Initial program 99.2%

              \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
            2. Step-by-step derivation
              1. associate-/r*N/A

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
              4. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
              5. associate--l+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
              6. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
              7. associate-+l-N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
              8. --lowering--.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
              9. --lowering--.f64100.0%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
            3. Simplified100.0%

              \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
            4. Add Preprocessing
            5. Taylor expanded in z around 0

              \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{x + y}{t}\right)}, 2\right) \]
            6. Step-by-step derivation
              1. *-lft-identityN/A

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

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(-1 \cdot -1\right) \cdot x + y}{t}\right), 2\right) \]
              3. associate-*r*N/A

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(-1 \cdot x\right) + y}{t}\right), 2\right) \]
              4. *-lft-identityN/A

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

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(-1 \cdot x\right) + \left(-1 \cdot -1\right) \cdot y}{t}\right), 2\right) \]
              6. associate-*r*N/A

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(-1 \cdot x\right) + -1 \cdot \left(-1 \cdot y\right)}{t}\right), 2\right) \]
              7. distribute-lft-outN/A

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(-1 \cdot x + -1 \cdot y\right)}{t}\right), 2\right) \]
              8. distribute-lft-inN/A

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(-1 \cdot \left(x + y\right)\right)}{t}\right), 2\right) \]
              9. *-rgt-identityN/A

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(\left(-1 \cdot \left(x + y\right)\right) \cdot 1\right)}{t}\right), 2\right) \]
              10. *-inversesN/A

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(\left(-1 \cdot \left(x + y\right)\right) \cdot \frac{z}{z}\right)}{t}\right), 2\right) \]
              11. associate-/l*N/A

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \frac{\left(-1 \cdot \left(x + y\right)\right) \cdot z}{z}}{t}\right), 2\right) \]
              12. associate-*l/N/A

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(\frac{-1 \cdot \left(x + y\right)}{z} \cdot z\right)}{t}\right), 2\right) \]
              13. associate-*r/N/A

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

                \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{x + y}{z}\right)\right)}{t}\right), 2\right) \]
              15. neg-mul-1N/A

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(z \cdot \left(-1 \cdot \frac{x + y}{z}\right)\right)\right), t\right), 2\right) \]
            7. Simplified77.6%

              \[\leadsto \frac{\color{blue}{\frac{y + x}{t}}}{2} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification73.8%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x + y \leq 1.3 \cdot 10^{-52}:\\ \;\;\;\;\frac{\frac{x - z}{t}}{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x + y}{t}}{2}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 11: 99.7% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \frac{0.5}{t} \cdot \left(x + \left(y - z\right)\right) \end{array} \]
          (FPCore (x y z t) :precision binary64 (* (/ 0.5 t) (+ x (- y z))))
          double code(double x, double y, double z, double t) {
          	return (0.5 / t) * (x + (y - z));
          }
          
          real(8) function code(x, y, z, t)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              code = (0.5d0 / t) * (x + (y - z))
          end function
          
          public static double code(double x, double y, double z, double t) {
          	return (0.5 / t) * (x + (y - z));
          }
          
          def code(x, y, z, t):
          	return (0.5 / t) * (x + (y - z))
          
          function code(x, y, z, t)
          	return Float64(Float64(0.5 / t) * Float64(x + Float64(y - z)))
          end
          
          function tmp = code(x, y, z, t)
          	tmp = (0.5 / t) * (x + (y - z));
          end
          
          code[x_, y_, z_, t_] := N[(N[(0.5 / t), $MachinePrecision] * N[(x + N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \frac{0.5}{t} \cdot \left(x + \left(y - z\right)\right)
          \end{array}
          
          Derivation
          1. Initial program 99.6%

            \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
          2. Step-by-step derivation
            1. associate-/r*N/A

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
            4. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
            5. associate--l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
            6. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
            7. associate-+l-N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
            8. --lowering--.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
            9. --lowering--.f64100.0%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
          3. Simplified100.0%

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

              \[\leadsto \frac{x - \left(z - y\right)}{\color{blue}{2 \cdot t}} \]
            2. clear-numN/A

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

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

              \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{2 \cdot t}\right), \color{blue}{\left(x - \left(z - y\right)\right)}\right) \]
            5. associate-/r*N/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{2}\right), t\right), \left(\color{blue}{x} - \left(z - y\right)\right)\right) \]
            7. metadata-evalN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \left(x - \left(z - y\right)\right)\right) \]
            8. sub-negN/A

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \color{blue}{\left(z - y\right)}\right)\right)\right) \]
            11. sub-negN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \left(z + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)\right)\right)\right) \]
            12. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(0 - \left(\left(\mathsf{neg}\left(y\right)\right) + \color{blue}{z}\right)\right)\right)\right) \]
            13. associate--r+N/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) - z\right)\right)\right) \]
            15. remove-double-negN/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, t\right), \mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right)\right) \]
          6. Applied egg-rr99.7%

            \[\leadsto \color{blue}{\frac{0.5}{t} \cdot \left(x + \left(y - z\right)\right)} \]
          7. Add Preprocessing

          Alternative 12: 37.5% accurate, 1.8× speedup?

          \[\begin{array}{l} \\ z \cdot \frac{-0.5}{t} \end{array} \]
          (FPCore (x y z t) :precision binary64 (* z (/ -0.5 t)))
          double code(double x, double y, double z, double t) {
          	return z * (-0.5 / t);
          }
          
          real(8) function code(x, y, z, t)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              code = z * ((-0.5d0) / t)
          end function
          
          public static double code(double x, double y, double z, double t) {
          	return z * (-0.5 / t);
          }
          
          def code(x, y, z, t):
          	return z * (-0.5 / t)
          
          function code(x, y, z, t)
          	return Float64(z * Float64(-0.5 / t))
          end
          
          function tmp = code(x, y, z, t)
          	tmp = z * (-0.5 / t);
          end
          
          code[x_, y_, z_, t_] := N[(z * N[(-0.5 / t), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          z \cdot \frac{-0.5}{t}
          \end{array}
          
          Derivation
          1. Initial program 99.6%

            \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
          2. Step-by-step derivation
            1. associate-/r*N/A

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x + y\right) - z\right), t\right), 2\right) \]
            4. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(y + x\right) - z\right), t\right), 2\right) \]
            5. associate--l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(y + \left(x - z\right)\right), t\right), 2\right) \]
            6. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(x - z\right) + y\right), t\right), 2\right) \]
            7. associate-+l-N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(x - \left(z - y\right)\right), t\right), 2\right) \]
            8. --lowering--.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(z - y\right)\right), t\right), 2\right) \]
            9. --lowering--.f64100.0%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{\_.f64}\left(z, y\right)\right), t\right), 2\right) \]
          3. Simplified100.0%

            \[\leadsto \color{blue}{\frac{\frac{x - \left(z - y\right)}{t}}{2}} \]
          4. Add Preprocessing
          5. Taylor expanded in z around inf

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

              \[\leadsto \frac{\frac{-1}{2} \cdot z}{\color{blue}{t}} \]
            2. metadata-evalN/A

              \[\leadsto \frac{\left(\frac{1}{2} \cdot -1\right) \cdot z}{t} \]
            3. associate-*r*N/A

              \[\leadsto \frac{\frac{1}{2} \cdot \left(-1 \cdot z\right)}{t} \]
            4. mul-1-negN/A

              \[\leadsto \frac{\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)}{t} \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(\mathsf{neg}\left(z\right)\right)\right), \color{blue}{t}\right) \]
            6. mul-1-negN/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot \left(-1 \cdot z\right)\right), t\right) \]
            7. associate-*r*N/A

              \[\leadsto \mathsf{/.f64}\left(\left(\left(\frac{1}{2} \cdot -1\right) \cdot z\right), t\right) \]
            8. metadata-evalN/A

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot z\right), t\right) \]
            9. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\left(z \cdot \frac{-1}{2}\right), t\right) \]
            10. *-lowering-*.f6435.0%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(z, \frac{-1}{2}\right), t\right) \]
          7. Simplified35.0%

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

              \[\leadsto z \cdot \color{blue}{\frac{\frac{-1}{2}}{t}} \]
            2. *-commutativeN/A

              \[\leadsto \frac{\frac{-1}{2}}{t} \cdot \color{blue}{z} \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2}}{t}\right), \color{blue}{z}\right) \]
            4. /-lowering-/.f6434.9%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{2}, t\right), z\right) \]
          9. Applied egg-rr34.9%

            \[\leadsto \color{blue}{\frac{-0.5}{t} \cdot z} \]
          10. Final simplification34.9%

            \[\leadsto z \cdot \frac{-0.5}{t} \]
          11. Add Preprocessing

          Reproduce

          ?
          herbie shell --seed 2024138 
          (FPCore (x y z t)
            :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, B"
            :precision binary64
            (/ (- (+ x y) z) (* t 2.0)))