Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B

Percentage Accurate: 76.5% → 89.6%
Time: 11.2s
Alternatives: 12
Speedup: 1.0×

Specification

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

\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\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: 76.5% accurate, 1.0× speedup?

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

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

Alternative 1: 89.6% accurate, 1.0× speedup?

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

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

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

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

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

      \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
    4. cancel-sign-sub-invN/A

      \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
    5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
    13. sub-negN/A

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
    15. distribute-neg-inN/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
    16. unsub-negN/A

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
    18. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
    19. metadata-eval92.4%

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
  3. Simplified92.4%

    \[\leadsto \color{blue}{x + y \cdot \left(\frac{z - t}{t - a} + 1\right)} \]
  4. Add Preprocessing
  5. Add Preprocessing

Alternative 2: 83.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-59}:\\
\;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\

\mathbf{elif}\;a \leq 2.8 \cdot 10^{-34}:\\
\;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.6e-59

    1. Initial program 86.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{z}{a}\right)}\right)\right) \]
      3. /-lowering-/.f6488.5%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    5. Simplified88.5%

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, y\right), \left(y \cdot \frac{1}{\color{blue}{\frac{a}{z}}}\right)\right) \]
      2. un-div-invN/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{/.f64}\left(y, \color{blue}{\left(\frac{a}{z}\right)}\right)\right) \]
      4. /-lowering-/.f6488.5%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{/.f64}\left(y, \mathsf{/.f64}\left(a, \color{blue}{z}\right)\right)\right) \]
    7. Applied egg-rr88.5%

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

    if -1.6e-59 < a < 2.79999999999999997e-34

    1. Initial program 79.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{a \cdot y}{t}\right) - -1 \cdot \frac{y \cdot z}{t}} \]
    4. Simplified84.1%

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, z\right), \left(\frac{\color{blue}{y}}{t}\right)\right)\right) \]
      5. /-lowering-/.f6484.6%

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

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

    if 2.79999999999999997e-34 < a

    1. Initial program 84.4%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{z}{a}\right)}\right)\right) \]
      3. /-lowering-/.f6490.1%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    5. Simplified90.1%

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

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

Alternative 3: 83.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2.2 \cdot 10^{-33}:\\
\;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.09999999999999995e-61 or 2.20000000000000005e-33 < a

    1. Initial program 85.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{z}{a}\right)}\right)\right) \]
      3. /-lowering-/.f6489.2%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(x, y\right), \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    5. Simplified89.2%

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

    if -3.09999999999999995e-61 < a < 2.20000000000000005e-33

    1. Initial program 79.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{a \cdot y}{t}\right) - -1 \cdot \frac{y \cdot z}{t}} \]
    4. Simplified84.1%

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, z\right), \left(\frac{\color{blue}{y}}{t}\right)\right)\right) \]
      5. /-lowering-/.f6484.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.1 \cdot 10^{-61}:\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-33}:\\ \;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 79.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.1 \cdot 10^{+29}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;a \leq 4.3 \cdot 10^{-17}:\\
\;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.0999999999999999e29 or 4.30000000000000023e-17 < a

    1. Initial program 84.5%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
      4. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
      5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      15. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      16. unsub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      18. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      19. metadata-eval96.0%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
    3. Simplified96.0%

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto y + \color{blue}{x} \]
      2. +-lowering-+.f6482.8%

        \[\leadsto \mathsf{+.f64}\left(y, \color{blue}{x}\right) \]
    7. Simplified82.8%

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

    if -3.0999999999999999e29 < a < 4.30000000000000023e-17

    1. Initial program 81.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{a \cdot y}{t}\right) - -1 \cdot \frac{y \cdot z}{t}} \]
    4. Simplified79.5%

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

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, z\right), \left(\frac{\color{blue}{y}}{t}\right)\right)\right) \]
      5. /-lowering-/.f6480.0%

        \[\leadsto \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(a, z\right), \mathsf{/.f64}\left(y, \color{blue}{t}\right)\right)\right) \]
    6. Applied egg-rr80.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.1 \cdot 10^{+29}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{-17}:\\ \;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 79.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.7 \cdot 10^{+29}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-16}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.7e29 or 4.5000000000000002e-16 < a

    1. Initial program 84.5%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
      4. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
      5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      15. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      16. unsub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      18. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      19. metadata-eval96.0%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
    3. Simplified96.0%

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto y + \color{blue}{x} \]
      2. +-lowering-+.f6482.8%

        \[\leadsto \mathsf{+.f64}\left(y, \color{blue}{x}\right) \]
    7. Simplified82.8%

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

    if -2.7e29 < a < 4.5000000000000002e-16

    1. Initial program 81.3%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
      4. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
      5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      15. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      16. unsub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      18. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      19. metadata-eval89.2%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
    3. Simplified89.2%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(y \cdot \color{blue}{\frac{z + -1 \cdot a}{t}}\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(y \cdot \frac{z + \left(\mathsf{neg}\left(a\right)\right)}{t}\right)\right) \]
      4. sub-negN/A

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\left(z - a\right), \color{blue}{t}\right)\right)\right) \]
      7. --lowering--.f6478.2%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, a\right), t\right)\right)\right) \]
    7. Simplified78.2%

      \[\leadsto \color{blue}{x + y \cdot \frac{z - a}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{+29}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-16}:\\ \;\;\;\;x + y \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 76.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.1 \cdot 10^{+29}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;a \leq 1.18 \cdot 10^{-70}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.0999999999999999e29 or 1.18e-70 < a

    1. Initial program 84.1%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
      4. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
      5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      15. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      16. unsub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      18. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      19. metadata-eval94.7%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
    3. Simplified94.7%

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto y + \color{blue}{x} \]
      2. +-lowering-+.f6479.7%

        \[\leadsto \mathsf{+.f64}\left(y, \color{blue}{x}\right) \]
    7. Simplified79.7%

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

    if -3.0999999999999999e29 < a < 1.18e-70

    1. Initial program 81.4%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
      4. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
      5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      15. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      16. unsub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      18. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      19. metadata-eval90.0%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
    3. Simplified90.0%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), \color{blue}{t}\right)\right) \]
      3. *-lowering-*.f6478.4%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right) \]
    7. Simplified78.4%

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{t}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.1 \cdot 10^{+29}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 1.18 \cdot 10^{-70}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 77.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+29}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-71}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.19999999999999987e29 or 4.5000000000000002e-71 < a

    1. Initial program 84.1%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
      4. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
      5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      15. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      16. unsub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      18. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      19. metadata-eval94.7%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
    3. Simplified94.7%

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto y + \color{blue}{x} \]
      2. +-lowering-+.f6479.7%

        \[\leadsto \mathsf{+.f64}\left(y, \color{blue}{x}\right) \]
    7. Simplified79.7%

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

    if -3.19999999999999987e29 < a < 4.5000000000000002e-71

    1. Initial program 81.4%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
      4. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
      5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      15. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      16. unsub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      18. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      19. metadata-eval90.0%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
    3. Simplified90.0%

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

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{\left(\frac{z}{t}\right)}\right)\right) \]
    6. Step-by-step derivation
      1. /-lowering-/.f6477.0%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(z, \color{blue}{t}\right)\right)\right) \]
    7. Simplified77.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{+29}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-71}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 64.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{t - a}\\ \mathbf{if}\;z \leq -5.5 \cdot 10^{+118}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+179}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ z (- t a)))))
   (if (<= z -5.5e+118) t_1 (if (<= z 2.3e+179) (+ x y) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / (t - a));
	double tmp;
	if (z <= -5.5e+118) {
		tmp = t_1;
	} else if (z <= 2.3e+179) {
		tmp = x + y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (z / (t - a))
    if (z <= (-5.5d+118)) then
        tmp = t_1
    else if (z <= 2.3d+179) then
        tmp = 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 a) {
	double t_1 = y * (z / (t - a));
	double tmp;
	if (z <= -5.5e+118) {
		tmp = t_1;
	} else if (z <= 2.3e+179) {
		tmp = x + y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z / (t - a))
	tmp = 0
	if z <= -5.5e+118:
		tmp = t_1
	elif z <= 2.3e+179:
		tmp = x + y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z / Float64(t - a)))
	tmp = 0.0
	if (z <= -5.5e+118)
		tmp = t_1;
	elseif (z <= 2.3e+179)
		tmp = Float64(x + y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z / (t - a));
	tmp = 0.0;
	if (z <= -5.5e+118)
		tmp = t_1;
	elseif (z <= 2.3e+179)
		tmp = x + y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e+118], t$95$1, If[LessEqual[z, 2.3e+179], N[(x + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{t - a}\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+179}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.5000000000000003e118 or 2.29999999999999994e179 < z

    1. Initial program 89.8%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
      4. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
      5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      15. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      16. unsub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      18. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      19. metadata-eval91.7%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
    3. Simplified91.7%

      \[\leadsto \color{blue}{x + y \cdot \left(\frac{z - t}{t - a} + 1\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-numN/A

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(t - a\right), \left(z - t\right)\right)\right), 1\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(t, a\right), \left(z - t\right)\right)\right), 1\right)\right)\right) \]
      5. --lowering--.f6491.6%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(z, \color{blue}{\left(t - a\right)}\right)\right) \]
      4. --lowering--.f6470.4%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(z, \mathsf{\_.f64}\left(t, \color{blue}{a}\right)\right)\right) \]
    9. Simplified70.4%

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

    if -5.5000000000000003e118 < z < 2.29999999999999994e179

    1. Initial program 80.8%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
      4. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
      5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      15. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      16. unsub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      18. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      19. metadata-eval92.6%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
    3. Simplified92.6%

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto y + \color{blue}{x} \]
      2. +-lowering-+.f6472.1%

        \[\leadsto \mathsf{+.f64}\left(y, \color{blue}{x}\right) \]
    7. Simplified72.1%

      \[\leadsto \color{blue}{y + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification71.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+118}:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+179}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 58.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot z}{t}\\ \mathbf{if}\;z \leq -4.8 \cdot 10^{+119}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+178}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* y z) t)))
   (if (<= z -4.8e+119) t_1 (if (<= z 6e+178) (+ x y) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * z) / t;
	double tmp;
	if (z <= -4.8e+119) {
		tmp = t_1;
	} else if (z <= 6e+178) {
		tmp = x + y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y * z) / t
    if (z <= (-4.8d+119)) then
        tmp = t_1
    else if (z <= 6d+178) then
        tmp = 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 a) {
	double t_1 = (y * z) / t;
	double tmp;
	if (z <= -4.8e+119) {
		tmp = t_1;
	} else if (z <= 6e+178) {
		tmp = x + y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y * z) / t
	tmp = 0
	if z <= -4.8e+119:
		tmp = t_1
	elif z <= 6e+178:
		tmp = x + y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y * z) / t)
	tmp = 0.0
	if (z <= -4.8e+119)
		tmp = t_1;
	elseif (z <= 6e+178)
		tmp = Float64(x + y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y * z) / t;
	tmp = 0.0;
	if (z <= -4.8e+119)
		tmp = t_1;
	elseif (z <= 6e+178)
		tmp = x + y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -4.8e+119], t$95$1, If[LessEqual[z, 6e+178], N[(x + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y \cdot z}{t}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 6 \cdot 10^{+178}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.8e119 or 6.00000000000000031e178 < z

    1. Initial program 89.8%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
      4. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
      5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      15. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      16. unsub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      18. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      19. metadata-eval91.7%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
    3. Simplified91.7%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\left(y \cdot z\right), \color{blue}{t}\right)\right) \]
      3. *-lowering-*.f6469.3%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right)\right) \]
    7. Simplified69.3%

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{t}} \]
    8. Taylor expanded in x around 0

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

        \[\leadsto \mathsf{/.f64}\left(\left(y \cdot z\right), \color{blue}{t}\right) \]
      2. *-lowering-*.f6454.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), t\right) \]
    10. Simplified54.9%

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

    if -4.8e119 < z < 6.00000000000000031e178

    1. Initial program 80.8%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
      4. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
      5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      15. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      16. unsub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      18. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      19. metadata-eval92.6%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
    3. Simplified92.6%

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto y + \color{blue}{x} \]
      2. +-lowering-+.f6472.1%

        \[\leadsto \mathsf{+.f64}\left(y, \color{blue}{x}\right) \]
    7. Simplified72.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+119}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+178}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 63.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+204}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{+120}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -2.1e+204) x (if (<= t 2.05e+120) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -2.1e+204) {
		tmp = x;
	} else if (t <= 2.05e+120) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-2.1d+204)) then
        tmp = x
    else if (t <= 2.05d+120) then
        tmp = x + y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -2.1e+204) {
		tmp = x;
	} else if (t <= 2.05e+120) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -2.1e+204:
		tmp = x
	elif t <= 2.05e+120:
		tmp = x + y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -2.1e+204)
		tmp = x;
	elseif (t <= 2.05e+120)
		tmp = Float64(x + y);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -2.1e+204)
		tmp = x;
	elseif (t <= 2.05e+120)
		tmp = x + y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.1e+204], x, If[LessEqual[t, 2.05e+120], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+204}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.05 \cdot 10^{+120}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.1e204 or 2.05e120 < t

    1. Initial program 61.8%

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
      4. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
      5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      15. distribute-neg-inN/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      16. unsub-negN/A

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

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      18. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
      19. metadata-eval88.3%

        \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
    3. Simplified88.3%

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

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

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

      if -2.1e204 < t < 2.05e120

      1. Initial program 89.8%

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
        4. cancel-sign-sub-invN/A

          \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
        5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
        13. sub-negN/A

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
        15. distribute-neg-inN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
        16. unsub-negN/A

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
        18. --lowering--.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
        19. metadata-eval93.8%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
      3. Simplified93.8%

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

        \[\leadsto \color{blue}{x + y} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto y + \color{blue}{x} \]
        2. +-lowering-+.f6463.1%

          \[\leadsto \mathsf{+.f64}\left(y, \color{blue}{x}\right) \]
      7. Simplified63.1%

        \[\leadsto \color{blue}{y + x} \]
    7. Recombined 2 regimes into one program.
    8. Final simplification65.9%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+204}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{+120}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
    9. Add Preprocessing

    Alternative 11: 54.0% accurate, 1.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+165}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{+119}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (if (<= y -6e+165) y (if (<= y 8.8e+119) x y)))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (y <= -6e+165) {
    		tmp = y;
    	} else if (y <= 8.8e+119) {
    		tmp = x;
    	} else {
    		tmp = y;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: tmp
        if (y <= (-6d+165)) then
            tmp = y
        else if (y <= 8.8d+119) then
            tmp = x
        else
            tmp = y
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (y <= -6e+165) {
    		tmp = y;
    	} else if (y <= 8.8e+119) {
    		tmp = x;
    	} else {
    		tmp = y;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	tmp = 0
    	if y <= -6e+165:
    		tmp = y
    	elif y <= 8.8e+119:
    		tmp = x
    	else:
    		tmp = y
    	return tmp
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (y <= -6e+165)
    		tmp = y;
    	elseif (y <= 8.8e+119)
    		tmp = x;
    	else
    		tmp = y;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	tmp = 0.0;
    	if (y <= -6e+165)
    		tmp = y;
    	elseif (y <= 8.8e+119)
    		tmp = x;
    	else
    		tmp = y;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[y, -6e+165], y, If[LessEqual[y, 8.8e+119], x, y]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -6 \cdot 10^{+165}:\\
    \;\;\;\;y\\
    
    \mathbf{elif}\;y \leq 8.8 \cdot 10^{+119}:\\
    \;\;\;\;x\\
    
    \mathbf{else}:\\
    \;\;\;\;y\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -5.99999999999999981e165 or 8.8000000000000005e119 < y

      1. Initial program 67.2%

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
        4. cancel-sign-sub-invN/A

          \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
        5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
        13. sub-negN/A

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
        15. distribute-neg-inN/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
        16. unsub-negN/A

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

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
        18. --lowering--.f64N/A

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
        19. metadata-eval87.6%

          \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
      3. Simplified87.6%

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

        \[\leadsto \color{blue}{x + y} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto y + \color{blue}{x} \]
        2. +-lowering-+.f6448.8%

          \[\leadsto \mathsf{+.f64}\left(y, \color{blue}{x}\right) \]
      7. Simplified48.8%

        \[\leadsto \color{blue}{y + x} \]
      8. Taylor expanded in y around inf

        \[\leadsto \color{blue}{y} \]
      9. Step-by-step derivation
        1. Simplified47.2%

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

        if -5.99999999999999981e165 < y < 8.8000000000000005e119

        1. Initial program 87.2%

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

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
          4. cancel-sign-sub-invN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
          5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
          13. sub-negN/A

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
          15. distribute-neg-inN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
          16. unsub-negN/A

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
          18. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
          19. metadata-eval93.8%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
        3. Simplified93.8%

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

          \[\leadsto \color{blue}{x} \]
        6. Step-by-step derivation
          1. Simplified61.7%

            \[\leadsto \color{blue}{x} \]
        7. Recombined 2 regimes into one program.
        8. Add Preprocessing

        Alternative 12: 50.8% accurate, 13.0× speedup?

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

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

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \left(y - \frac{z - t}{a - t} \cdot \color{blue}{y}\right)\right) \]
          4. cancel-sign-sub-invN/A

            \[\leadsto \mathsf{+.f64}\left(x, \left(y + \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{a - t}\right)\right) \cdot y}\right)\right) \]
          5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(a - t\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
          13. sub-negN/A

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
          15. distribute-neg-inN/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
          16. unsub-negN/A

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \left(t - a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
          18. --lowering--.f64N/A

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), \left(\mathsf{neg}\left(-1\right)\right)\right)\right)\right) \]
          19. metadata-eval92.4%

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(z, t\right), \mathsf{\_.f64}\left(t, a\right)\right), 1\right)\right)\right) \]
        3. Simplified92.4%

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

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

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

          Developer Target 1: 88.5% accurate, 0.3× speedup?

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

          Reproduce

          ?
          herbie shell --seed 2024152 
          (FPCore (x y z t a)
            :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
            :precision binary64
          
            :alt
            (! :herbie-platform default (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -13664970889390727/100000000000000000000000) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 14754293444577233/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)))))
          
            (- (+ x y) (/ (* (- z t) y) (- a t))))