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

Percentage Accurate: 76.2% → 90.4%
Time: 11.0s
Alternatives: 13
Speedup: 0.8×

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 13 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.2% 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: 90.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+109} \lor \neg \left(t \leq 7.5 \cdot 10^{+95}\right):\\ \;\;\;\;\left(x + y \cdot \frac{z}{t}\right) - a \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -4.5e+109) (not (<= t 7.5e+95)))
   (- (+ x (* y (/ z t))) (* a (/ y t)))
   (+ (+ x y) (* (- z t) (/ y (- t a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -4.5e+109) || !(t <= 7.5e+95)) {
		tmp = (x + (y * (z / t))) - (a * (y / t));
	} else {
		tmp = (x + y) + ((z - t) * (y / (t - 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 ((t <= (-4.5d+109)) .or. (.not. (t <= 7.5d+95))) then
        tmp = (x + (y * (z / t))) - (a * (y / t))
    else
        tmp = (x + y) + ((z - t) * (y / (t - a)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -4.5e+109) || !(t <= 7.5e+95)) {
		tmp = (x + (y * (z / t))) - (a * (y / t));
	} else {
		tmp = (x + y) + ((z - t) * (y / (t - a)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -4.5e+109) or not (t <= 7.5e+95):
		tmp = (x + (y * (z / t))) - (a * (y / t))
	else:
		tmp = (x + y) + ((z - t) * (y / (t - a)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -4.5e+109) || !(t <= 7.5e+95))
		tmp = Float64(Float64(x + Float64(y * Float64(z / t))) - Float64(a * Float64(y / t)));
	else
		tmp = Float64(Float64(x + y) + Float64(Float64(z - t) * Float64(y / Float64(t - a))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -4.5e+109) || ~((t <= 7.5e+95)))
		tmp = (x + (y * (z / t))) - (a * (y / t));
	else
		tmp = (x + y) + ((z - t) * (y / (t - a)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.5e+109], N[Not[LessEqual[t, 7.5e+95]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+109} \lor \neg \left(t \leq 7.5 \cdot 10^{+95}\right):\\
\;\;\;\;\left(x + y \cdot \frac{z}{t}\right) - a \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.4999999999999996e109 or 7.5000000000000001e95 < t

    1. Initial program 42.0%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg42.0%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative42.0%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg42.0%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out42.0%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*57.8%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg58.1%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac258.1%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg58.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in58.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg58.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative58.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg58.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified58.1%

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

      \[\leadsto \color{blue}{\left(x + \left(y + \left(-1 \cdot y + \frac{y \cdot z}{t}\right)\right)\right) - \frac{a \cdot y}{t}} \]
    6. Step-by-step derivation
      1. associate-+r+77.0%

        \[\leadsto \left(x + \color{blue}{\left(\left(y + -1 \cdot y\right) + \frac{y \cdot z}{t}\right)}\right) - \frac{a \cdot y}{t} \]
      2. distribute-rgt1-in77.0%

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

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

        \[\leadsto \left(x + \left(\color{blue}{0} + \frac{y \cdot z}{t}\right)\right) - \frac{a \cdot y}{t} \]
      5. associate-+r+77.0%

        \[\leadsto \color{blue}{\left(\left(x + 0\right) + \frac{y \cdot z}{t}\right)} - \frac{a \cdot y}{t} \]
      6. associate-/l*82.7%

        \[\leadsto \left(\left(x + 0\right) + \color{blue}{y \cdot \frac{z}{t}}\right) - \frac{a \cdot y}{t} \]
      7. associate-/l*89.5%

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

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

    if -4.4999999999999996e109 < t < 7.5000000000000001e95

    1. Initial program 90.5%

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

      \[\leadsto \left(x + y\right) - \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. associate-*l/94.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+109} \lor \neg \left(t \leq 7.5 \cdot 10^{+95}\right):\\ \;\;\;\;\left(x + y \cdot \frac{z}{t}\right) - a \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 63.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+140} \lor \neg \left(z \leq -1.6 \cdot 10^{-51} \lor \neg \left(z \leq -3.15 \cdot 10^{-55}\right) \land z \leq 9.6 \cdot 10^{+96}\right):\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -8.5e+140)
         (not
          (or (<= z -1.6e-51) (and (not (<= z -3.15e-55)) (<= z 9.6e+96)))))
   (* y (/ z (- t a)))
   (+ x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -8.5e+140) || !((z <= -1.6e-51) || (!(z <= -3.15e-55) && (z <= 9.6e+96)))) {
		tmp = y * (z / (t - 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 ((z <= (-8.5d+140)) .or. (.not. (z <= (-1.6d-51)) .or. (.not. (z <= (-3.15d-55))) .and. (z <= 9.6d+96))) then
        tmp = y * (z / (t - 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 ((z <= -8.5e+140) || !((z <= -1.6e-51) || (!(z <= -3.15e-55) && (z <= 9.6e+96)))) {
		tmp = y * (z / (t - a));
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -8.5e+140) or not ((z <= -1.6e-51) or (not (z <= -3.15e-55) and (z <= 9.6e+96))):
		tmp = y * (z / (t - a))
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -8.5e+140) || !((z <= -1.6e-51) || (!(z <= -3.15e-55) && (z <= 9.6e+96))))
		tmp = Float64(y * Float64(z / Float64(t - a)));
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -8.5e+140) || ~(((z <= -1.6e-51) || (~((z <= -3.15e-55)) && (z <= 9.6e+96)))))
		tmp = y * (z / (t - a));
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.5e+140], N[Not[Or[LessEqual[z, -1.6e-51], And[N[Not[LessEqual[z, -3.15e-55]], $MachinePrecision], LessEqual[z, 9.6e+96]]]], $MachinePrecision]], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+140} \lor \neg \left(z \leq -1.6 \cdot 10^{-51} \lor \neg \left(z \leq -3.15 \cdot 10^{-55}\right) \land z \leq 9.6 \cdot 10^{+96}\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.4999999999999996e140 or -1.6e-51 < z < -3.1499999999999999e-55 or 9.59999999999999972e96 < z

    1. Initial program 76.4%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg76.4%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*90.7%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define90.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg90.8%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac290.8%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg90.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in90.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg90.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative90.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg90.8%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified90.8%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t - a}} \]
    7. Simplified66.3%

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

    if -8.4999999999999996e140 < z < -1.6e-51 or -3.1499999999999999e-55 < z < 9.59999999999999972e96

    1. Initial program 73.9%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative70.0%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified70.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+140} \lor \neg \left(z \leq -1.6 \cdot 10^{-51} \lor \neg \left(z \leq -3.15 \cdot 10^{-55}\right) \land z \leq 9.6 \cdot 10^{+96}\right):\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 56.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+198}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{+116}:\\ \;\;\;\;a \cdot \frac{y}{-t}\\ \mathbf{elif}\;y \leq -1.04 \cdot 10^{-103}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -1.25e+198)
   (+ x y)
   (if (<= y -4.7e+116)
     (* a (/ y (- t)))
     (if (<= y -1.04e-103)
       (+ x y)
       (if (<= y 1.75e+18) x (* y (- 1.0 (/ z a))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -1.25e+198) {
		tmp = x + y;
	} else if (y <= -4.7e+116) {
		tmp = a * (y / -t);
	} else if (y <= -1.04e-103) {
		tmp = x + y;
	} else if (y <= 1.75e+18) {
		tmp = x;
	} else {
		tmp = y * (1.0 - (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 (y <= (-1.25d+198)) then
        tmp = x + y
    else if (y <= (-4.7d+116)) then
        tmp = a * (y / -t)
    else if (y <= (-1.04d-103)) then
        tmp = x + y
    else if (y <= 1.75d+18) then
        tmp = x
    else
        tmp = y * (1.0d0 - (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 (y <= -1.25e+198) {
		tmp = x + y;
	} else if (y <= -4.7e+116) {
		tmp = a * (y / -t);
	} else if (y <= -1.04e-103) {
		tmp = x + y;
	} else if (y <= 1.75e+18) {
		tmp = x;
	} else {
		tmp = y * (1.0 - (z / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -1.25e+198:
		tmp = x + y
	elif y <= -4.7e+116:
		tmp = a * (y / -t)
	elif y <= -1.04e-103:
		tmp = x + y
	elif y <= 1.75e+18:
		tmp = x
	else:
		tmp = y * (1.0 - (z / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -1.25e+198)
		tmp = Float64(x + y);
	elseif (y <= -4.7e+116)
		tmp = Float64(a * Float64(y / Float64(-t)));
	elseif (y <= -1.04e-103)
		tmp = Float64(x + y);
	elseif (y <= 1.75e+18)
		tmp = x;
	else
		tmp = Float64(y * Float64(1.0 - Float64(z / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -1.25e+198)
		tmp = x + y;
	elseif (y <= -4.7e+116)
		tmp = a * (y / -t);
	elseif (y <= -1.04e-103)
		tmp = x + y;
	elseif (y <= 1.75e+18)
		tmp = x;
	else
		tmp = y * (1.0 - (z / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.25e+198], N[(x + y), $MachinePrecision], If[LessEqual[y, -4.7e+116], N[(a * N[(y / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.04e-103], N[(x + y), $MachinePrecision], If[LessEqual[y, 1.75e+18], x, N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+198}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;y \leq -4.7 \cdot 10^{+116}:\\
\;\;\;\;a \cdot \frac{y}{-t}\\

\mathbf{elif}\;y \leq -1.04 \cdot 10^{-103}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;y \leq 1.75 \cdot 10^{+18}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.25000000000000012e198 or -4.7000000000000003e116 < y < -1.04000000000000001e-103

    1. Initial program 77.6%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative66.1%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified66.1%

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

    if -1.25000000000000012e198 < y < -4.7000000000000003e116

    1. Initial program 45.8%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg45.8%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative45.8%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg45.8%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out45.8%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*60.0%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define60.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg60.2%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac260.2%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg60.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in60.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg60.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative60.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg60.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified60.2%

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

      \[\leadsto \color{blue}{\left(x + \left(y + \left(-1 \cdot y + \frac{y \cdot z}{t}\right)\right)\right) - \frac{a \cdot y}{t}} \]
    6. Step-by-step derivation
      1. associate-+r+72.4%

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

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

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

        \[\leadsto \left(x + \left(\color{blue}{0} + \frac{y \cdot z}{t}\right)\right) - \frac{a \cdot y}{t} \]
      5. associate-+r+72.4%

        \[\leadsto \color{blue}{\left(\left(x + 0\right) + \frac{y \cdot z}{t}\right)} - \frac{a \cdot y}{t} \]
      6. associate-/l*81.5%

        \[\leadsto \left(\left(x + 0\right) + \color{blue}{y \cdot \frac{z}{t}}\right) - \frac{a \cdot y}{t} \]
      7. associate-/l*81.5%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{a \cdot y}{t}} \]
    9. Step-by-step derivation
      1. mul-1-neg44.4%

        \[\leadsto \color{blue}{-\frac{a \cdot y}{t}} \]
      2. associate-*r/49.0%

        \[\leadsto -\color{blue}{a \cdot \frac{y}{t}} \]
      3. distribute-rgt-neg-in49.0%

        \[\leadsto \color{blue}{a \cdot \left(-\frac{y}{t}\right)} \]
      4. distribute-neg-frac249.0%

        \[\leadsto a \cdot \color{blue}{\frac{y}{-t}} \]
    10. Simplified49.0%

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

    if -1.04000000000000001e-103 < y < 1.75e18

    1. Initial program 87.6%

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

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

    if 1.75e18 < y

    1. Initial program 59.7%

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

      \[\leadsto \color{blue}{\left(x + y\right) - \frac{y \cdot z}{a}} \]
    4. Step-by-step derivation
      1. +-commutative62.1%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{y \cdot z}{a} \]
      2. associate-/l*69.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+198}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq -4.7 \cdot 10^{+116}:\\ \;\;\;\;a \cdot \frac{y}{-t}\\ \mathbf{elif}\;y \leq -1.04 \cdot 10^{-103}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 63.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{-14}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -2.55 \cdot 10^{-278}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{-278}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-26}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.9e-14)
   (+ x y)
   (if (<= a -2.55e-278)
     x
     (if (<= a 2.35e-278) (/ (* y z) t) (if (<= a 5.5e-26) x (+ x y))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.9e-14) {
		tmp = x + y;
	} else if (a <= -2.55e-278) {
		tmp = x;
	} else if (a <= 2.35e-278) {
		tmp = (y * z) / t;
	} else if (a <= 5.5e-26) {
		tmp = x;
	} 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.9d-14)) then
        tmp = x + y
    else if (a <= (-2.55d-278)) then
        tmp = x
    else if (a <= 2.35d-278) then
        tmp = (y * z) / t
    else if (a <= 5.5d-26) then
        tmp = x
    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.9e-14) {
		tmp = x + y;
	} else if (a <= -2.55e-278) {
		tmp = x;
	} else if (a <= 2.35e-278) {
		tmp = (y * z) / t;
	} else if (a <= 5.5e-26) {
		tmp = x;
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.9e-14:
		tmp = x + y
	elif a <= -2.55e-278:
		tmp = x
	elif a <= 2.35e-278:
		tmp = (y * z) / t
	elif a <= 5.5e-26:
		tmp = x
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.9e-14)
		tmp = Float64(x + y);
	elseif (a <= -2.55e-278)
		tmp = x;
	elseif (a <= 2.35e-278)
		tmp = Float64(Float64(y * z) / t);
	elseif (a <= 5.5e-26)
		tmp = x;
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.9e-14)
		tmp = x + y;
	elseif (a <= -2.55e-278)
		tmp = x;
	elseif (a <= 2.35e-278)
		tmp = (y * z) / t;
	elseif (a <= 5.5e-26)
		tmp = x;
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.9e-14], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.55e-278], x, If[LessEqual[a, 2.35e-278], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[a, 5.5e-26], x, N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.55 \cdot 10^{-278}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.35 \cdot 10^{-278}:\\
\;\;\;\;\frac{y \cdot z}{t}\\

\mathbf{elif}\;a \leq 5.5 \cdot 10^{-26}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.9000000000000003e-14 or 5.5000000000000005e-26 < a

    1. Initial program 77.2%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified74.7%

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

    if -2.9000000000000003e-14 < a < -2.55000000000000005e-278 or 2.3499999999999998e-278 < a < 5.5000000000000005e-26

    1. Initial program 71.9%

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

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

    if -2.55000000000000005e-278 < a < 2.3499999999999998e-278

    1. Initial program 67.8%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg67.8%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative67.8%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg67.8%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out67.8%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*68.2%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg68.1%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac268.1%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg68.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in68.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg68.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative68.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg68.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified68.1%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t - a}} \]
    7. Simplified69.7%

      \[\leadsto \color{blue}{y \cdot \frac{z}{t - a}} \]
    8. Taylor expanded in t around inf 77.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.9 \cdot 10^{-14}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -2.55 \cdot 10^{-278}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{-278}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-26}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 63.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{-13}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{-278}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 10^{-276}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-35}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.1e-13)
   (+ x y)
   (if (<= a -2.25e-278)
     x
     (if (<= a 1e-276) (* y (/ z t)) (if (<= a 5.8e-35) x (+ x y))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.1e-13) {
		tmp = x + y;
	} else if (a <= -2.25e-278) {
		tmp = x;
	} else if (a <= 1e-276) {
		tmp = y * (z / t);
	} else if (a <= 5.8e-35) {
		tmp = x;
	} 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 <= (-1.1d-13)) then
        tmp = x + y
    else if (a <= (-2.25d-278)) then
        tmp = x
    else if (a <= 1d-276) then
        tmp = y * (z / t)
    else if (a <= 5.8d-35) then
        tmp = x
    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 <= -1.1e-13) {
		tmp = x + y;
	} else if (a <= -2.25e-278) {
		tmp = x;
	} else if (a <= 1e-276) {
		tmp = y * (z / t);
	} else if (a <= 5.8e-35) {
		tmp = x;
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.1e-13:
		tmp = x + y
	elif a <= -2.25e-278:
		tmp = x
	elif a <= 1e-276:
		tmp = y * (z / t)
	elif a <= 5.8e-35:
		tmp = x
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.1e-13)
		tmp = Float64(x + y);
	elseif (a <= -2.25e-278)
		tmp = x;
	elseif (a <= 1e-276)
		tmp = Float64(y * Float64(z / t));
	elseif (a <= 5.8e-35)
		tmp = x;
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.1e-13)
		tmp = x + y;
	elseif (a <= -2.25e-278)
		tmp = x;
	elseif (a <= 1e-276)
		tmp = y * (z / t);
	elseif (a <= 5.8e-35)
		tmp = x;
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.1e-13], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.25e-278], x, If[LessEqual[a, 1e-276], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.8e-35], x, N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.25 \cdot 10^{-278}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 10^{-276}:\\
\;\;\;\;y \cdot \frac{z}{t}\\

\mathbf{elif}\;a \leq 5.8 \cdot 10^{-35}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.09999999999999998e-13 or 5.8000000000000004e-35 < a

    1. Initial program 77.2%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified74.7%

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

    if -1.09999999999999998e-13 < a < -2.2499999999999999e-278 or 1e-276 < a < 5.8000000000000004e-35

    1. Initial program 71.9%

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

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

    if -2.2499999999999999e-278 < a < 1e-276

    1. Initial program 67.8%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg67.8%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative67.8%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg67.8%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out67.8%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*68.2%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg68.1%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac268.1%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg68.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in68.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg68.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative68.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg68.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified68.1%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t - a}} \]
    7. Simplified69.7%

      \[\leadsto \color{blue}{y \cdot \frac{z}{t - a}} \]
    8. Taylor expanded in t around inf 77.3%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    9. Step-by-step derivation
      1. associate-/l*69.7%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    10. Simplified69.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{-13}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{-278}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 10^{-276}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-35}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 86.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+201} \lor \neg \left(t \leq 1.55 \cdot 10^{+98}\right):\\ \;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -2.8e+201) (not (<= t 1.55e+98)))
   (- x (/ (* y (- a z)) t))
   (+ (+ x y) (* (- z t) (/ y (- t a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2.8e+201) || !(t <= 1.55e+98)) {
		tmp = x - ((y * (a - z)) / t);
	} else {
		tmp = (x + y) + ((z - t) * (y / (t - 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 ((t <= (-2.8d+201)) .or. (.not. (t <= 1.55d+98))) then
        tmp = x - ((y * (a - z)) / t)
    else
        tmp = (x + y) + ((z - t) * (y / (t - a)))
    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.8e+201) || !(t <= 1.55e+98)) {
		tmp = x - ((y * (a - z)) / t);
	} else {
		tmp = (x + y) + ((z - t) * (y / (t - a)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -2.8e+201) or not (t <= 1.55e+98):
		tmp = x - ((y * (a - z)) / t)
	else:
		tmp = (x + y) + ((z - t) * (y / (t - a)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -2.8e+201) || !(t <= 1.55e+98))
		tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t));
	else
		tmp = Float64(Float64(x + y) + Float64(Float64(z - t) * Float64(y / Float64(t - a))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -2.8e+201) || ~((t <= 1.55e+98)))
		tmp = x - ((y * (a - z)) / t);
	else
		tmp = (x + y) + ((z - t) * (y / (t - a)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.8e+201], N[Not[LessEqual[t, 1.55e+98]], $MachinePrecision]], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+201} \lor \neg \left(t \leq 1.55 \cdot 10^{+98}\right):\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.80000000000000005e201 or 1.5500000000000001e98 < t

    1. Initial program 38.6%

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

      \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{a \cdot y}{t}\right) - -1 \cdot \frac{y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. associate--l+79.3%

        \[\leadsto \color{blue}{x + \left(-1 \cdot \frac{a \cdot y}{t} - -1 \cdot \frac{y \cdot z}{t}\right)} \]
      2. distribute-lft-out--79.3%

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

        \[\leadsto x + -1 \cdot \color{blue}{\frac{a \cdot y - y \cdot z}{t}} \]
      4. mul-1-neg79.3%

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

        \[\leadsto \color{blue}{x - \frac{a \cdot y - y \cdot z}{t}} \]
      6. *-commutative79.3%

        \[\leadsto x - \frac{\color{blue}{y \cdot a} - y \cdot z}{t} \]
      7. distribute-lft-out--79.4%

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

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

    if -2.80000000000000005e201 < t < 1.5500000000000001e98

    1. Initial program 88.2%

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

      \[\leadsto \left(x + y\right) - \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. associate-*l/93.0%

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

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

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

Alternative 7: 58.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+116}:\\ \;\;\;\;y \cdot \frac{z - a}{t}\\ \mathbf{elif}\;y \leq -1.06 \cdot 10^{-101}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+19}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -2.7e+116)
   (* y (/ (- z a) t))
   (if (<= y -1.06e-101) (+ x y) (if (<= y 2.9e+19) x (* y (- 1.0 (/ z a)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -2.7e+116) {
		tmp = y * ((z - a) / t);
	} else if (y <= -1.06e-101) {
		tmp = x + y;
	} else if (y <= 2.9e+19) {
		tmp = x;
	} else {
		tmp = y * (1.0 - (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 (y <= (-2.7d+116)) then
        tmp = y * ((z - a) / t)
    else if (y <= (-1.06d-101)) then
        tmp = x + y
    else if (y <= 2.9d+19) then
        tmp = x
    else
        tmp = y * (1.0d0 - (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 (y <= -2.7e+116) {
		tmp = y * ((z - a) / t);
	} else if (y <= -1.06e-101) {
		tmp = x + y;
	} else if (y <= 2.9e+19) {
		tmp = x;
	} else {
		tmp = y * (1.0 - (z / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -2.7e+116:
		tmp = y * ((z - a) / t)
	elif y <= -1.06e-101:
		tmp = x + y
	elif y <= 2.9e+19:
		tmp = x
	else:
		tmp = y * (1.0 - (z / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -2.7e+116)
		tmp = Float64(y * Float64(Float64(z - a) / t));
	elseif (y <= -1.06e-101)
		tmp = Float64(x + y);
	elseif (y <= 2.9e+19)
		tmp = x;
	else
		tmp = Float64(y * Float64(1.0 - Float64(z / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -2.7e+116)
		tmp = y * ((z - a) / t);
	elseif (y <= -1.06e-101)
		tmp = x + y;
	elseif (y <= 2.9e+19)
		tmp = x;
	else
		tmp = y * (1.0 - (z / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.7e+116], N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.06e-101], N[(x + y), $MachinePrecision], If[LessEqual[y, 2.9e+19], x, N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+116}:\\
\;\;\;\;y \cdot \frac{z - a}{t}\\

\mathbf{elif}\;y \leq -1.06 \cdot 10^{-101}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;y \leq 2.9 \cdot 10^{+19}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.7e116

    1. Initial program 55.5%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg55.5%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*70.5%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg70.5%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac270.5%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg70.5%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in70.5%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg70.5%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative70.5%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg70.5%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified70.5%

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

      \[\leadsto \color{blue}{\left(x + \left(y + \left(-1 \cdot y + \frac{y \cdot z}{t}\right)\right)\right) - \frac{a \cdot y}{t}} \]
    6. Step-by-step derivation
      1. associate-+r+63.3%

        \[\leadsto \left(x + \color{blue}{\left(\left(y + -1 \cdot y\right) + \frac{y \cdot z}{t}\right)}\right) - \frac{a \cdot y}{t} \]
      2. distribute-rgt1-in63.3%

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

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

        \[\leadsto \left(x + \left(\color{blue}{0} + \frac{y \cdot z}{t}\right)\right) - \frac{a \cdot y}{t} \]
      5. associate-+r+63.3%

        \[\leadsto \color{blue}{\left(\left(x + 0\right) + \frac{y \cdot z}{t}\right)} - \frac{a \cdot y}{t} \]
      6. associate-/l*67.5%

        \[\leadsto \left(\left(x + 0\right) + \color{blue}{y \cdot \frac{z}{t}}\right) - \frac{a \cdot y}{t} \]
      7. associate-/l*67.5%

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)} \]
    9. Step-by-step derivation
      1. div-sub56.7%

        \[\leadsto y \cdot \color{blue}{\frac{z - a}{t}} \]
    10. Simplified56.7%

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

    if -2.7e116 < y < -1.0600000000000001e-101

    1. Initial program 84.8%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified76.6%

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

    if -1.0600000000000001e-101 < y < 2.9e19

    1. Initial program 87.6%

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

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

    if 2.9e19 < y

    1. Initial program 59.7%

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

      \[\leadsto \color{blue}{\left(x + y\right) - \frac{y \cdot z}{a}} \]
    4. Step-by-step derivation
      1. +-commutative62.1%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{y \cdot z}{a} \]
      2. associate-/l*69.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+116}:\\ \;\;\;\;y \cdot \frac{z - a}{t}\\ \mathbf{elif}\;y \leq -1.06 \cdot 10^{-101}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+19}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 83.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.3 \cdot 10^{+14} \lor \neg \left(a \leq 4.5 \cdot 10^{-25}\right):\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= a -1.3e+14) (not (<= a 4.5e-25)))
   (- (+ x y) (* y (/ z a)))
   (- x (/ (* y (- a z)) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -1.3e+14) || !(a <= 4.5e-25)) {
		tmp = (x + y) - (y * (z / a));
	} else {
		tmp = x - ((y * (a - z)) / t);
	}
	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.3d+14)) .or. (.not. (a <= 4.5d-25))) then
        tmp = (x + y) - (y * (z / a))
    else
        tmp = x - ((y * (a - z)) / t)
    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.3e+14) || !(a <= 4.5e-25)) {
		tmp = (x + y) - (y * (z / a));
	} else {
		tmp = x - ((y * (a - z)) / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -1.3e+14) or not (a <= 4.5e-25):
		tmp = (x + y) - (y * (z / a))
	else:
		tmp = x - ((y * (a - z)) / t)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -1.3e+14) || !(a <= 4.5e-25))
		tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a)));
	else
		tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -1.3e+14) || ~((a <= 4.5e-25)))
		tmp = (x + y) - (y * (z / a));
	else
		tmp = x - ((y * (a - z)) / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.3e+14], N[Not[LessEqual[a, 4.5e-25]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.3 \cdot 10^{+14} \lor \neg \left(a \leq 4.5 \cdot 10^{-25}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.3e14 or 4.5000000000000001e-25 < a

    1. Initial program 77.2%

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

      \[\leadsto \color{blue}{\left(x + y\right) - \frac{y \cdot z}{a}} \]
    4. Step-by-step derivation
      1. +-commutative80.2%

        \[\leadsto \color{blue}{\left(y + x\right)} - \frac{y \cdot z}{a} \]
      2. associate-/l*84.3%

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

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

    if -1.3e14 < a < 4.5000000000000001e-25

    1. Initial program 71.6%

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

      \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{a \cdot y}{t}\right) - -1 \cdot \frac{y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. associate--l+82.8%

        \[\leadsto \color{blue}{x + \left(-1 \cdot \frac{a \cdot y}{t} - -1 \cdot \frac{y \cdot z}{t}\right)} \]
      2. distribute-lft-out--82.8%

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

        \[\leadsto x + -1 \cdot \color{blue}{\frac{a \cdot y - y \cdot z}{t}} \]
      4. mul-1-neg82.8%

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

        \[\leadsto \color{blue}{x - \frac{a \cdot y - y \cdot z}{t}} \]
      6. *-commutative82.8%

        \[\leadsto x - \frac{\color{blue}{y \cdot a} - y \cdot z}{t} \]
      7. distribute-lft-out--82.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.3 \cdot 10^{+14} \lor \neg \left(a \leq 4.5 \cdot 10^{-25}\right):\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 77.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -4.1 \cdot 10^{+14} \lor \neg \left(a \leq 1.48 \cdot 10^{+57}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= a -4.1e+14) (not (<= a 1.48e+57)))
   (+ x y)
   (- x (/ (* y (- a z)) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -4.1e+14) || !(a <= 1.48e+57)) {
		tmp = x + y;
	} else {
		tmp = x - ((y * (a - z)) / t);
	}
	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 <= (-4.1d+14)) .or. (.not. (a <= 1.48d+57))) then
        tmp = x + y
    else
        tmp = x - ((y * (a - z)) / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -4.1e+14) || !(a <= 1.48e+57)) {
		tmp = x + y;
	} else {
		tmp = x - ((y * (a - z)) / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -4.1e+14) or not (a <= 1.48e+57):
		tmp = x + y
	else:
		tmp = x - ((y * (a - z)) / t)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -4.1e+14) || !(a <= 1.48e+57))
		tmp = Float64(x + y);
	else
		tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -4.1e+14) || ~((a <= 1.48e+57)))
		tmp = x + y;
	else
		tmp = x - ((y * (a - z)) / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.1e+14], N[Not[LessEqual[a, 1.48e+57]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.1 \cdot 10^{+14} \lor \neg \left(a \leq 1.48 \cdot 10^{+57}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.1e14 or 1.47999999999999999e57 < a

    1. Initial program 78.4%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative77.8%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified77.8%

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

    if -4.1e14 < a < 1.47999999999999999e57

    1. Initial program 71.2%

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

      \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{a \cdot y}{t}\right) - -1 \cdot \frac{y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. associate--l+81.8%

        \[\leadsto \color{blue}{x + \left(-1 \cdot \frac{a \cdot y}{t} - -1 \cdot \frac{y \cdot z}{t}\right)} \]
      2. distribute-lft-out--81.8%

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

        \[\leadsto x + -1 \cdot \color{blue}{\frac{a \cdot y - y \cdot z}{t}} \]
      4. mul-1-neg81.8%

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

        \[\leadsto \color{blue}{x - \frac{a \cdot y - y \cdot z}{t}} \]
      6. *-commutative81.8%

        \[\leadsto x - \frac{\color{blue}{y \cdot a} - y \cdot z}{t} \]
      7. distribute-lft-out--81.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.1 \cdot 10^{+14} \lor \neg \left(a \leq 1.48 \cdot 10^{+57}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 76.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.3 \cdot 10^{+19} \lor \neg \left(a \leq 1.95 \cdot 10^{+26}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= a -3.3e+19) (not (<= a 1.95e+26))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -3.3e+19) || !(a <= 1.95e+26)) {
		tmp = x + y;
	} else {
		tmp = x + ((y * z) / t);
	}
	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.3d+19)) .or. (.not. (a <= 1.95d+26))) then
        tmp = x + y
    else
        tmp = x + ((y * z) / t)
    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.3e+19) || !(a <= 1.95e+26)) {
		tmp = x + y;
	} else {
		tmp = x + ((y * z) / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -3.3e+19) or not (a <= 1.95e+26):
		tmp = x + y
	else:
		tmp = x + ((y * z) / t)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -3.3e+19) || !(a <= 1.95e+26))
		tmp = Float64(x + y);
	else
		tmp = Float64(x + Float64(Float64(y * z) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -3.3e+19) || ~((a <= 1.95e+26)))
		tmp = x + y;
	else
		tmp = x + ((y * z) / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.3e+19], N[Not[LessEqual[a, 1.95e+26]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{+19} \lor \neg \left(a \leq 1.95 \cdot 10^{+26}\right):\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.3e19 or 1.95e26 < a

    1. Initial program 76.6%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative76.0%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified76.0%

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

    if -3.3e19 < a < 1.95e26

    1. Initial program 72.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg72.6%

        \[\leadsto \color{blue}{\left(x + y\right) + \left(-\frac{\left(z - t\right) \cdot y}{a - t}\right)} \]
      2. +-commutative72.6%

        \[\leadsto \color{blue}{\left(-\frac{\left(z - t\right) \cdot y}{a - t}\right) + \left(x + y\right)} \]
      3. distribute-frac-neg72.6%

        \[\leadsto \color{blue}{\frac{-\left(z - t\right) \cdot y}{a - t}} + \left(x + y\right) \]
      4. distribute-rgt-neg-out72.6%

        \[\leadsto \frac{\color{blue}{\left(z - t\right) \cdot \left(-y\right)}}{a - t} + \left(x + y\right) \]
      5. associate-/l*77.6%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{-y}{a - t}} + \left(x + y\right) \]
      6. fma-define77.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{-y}{a - t}, x + y\right)} \]
      7. distribute-frac-neg77.6%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac277.6%

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{y}{-\left(a - t\right)}}, x + y\right) \]
      9. sub-neg77.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in77.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg77.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\left(-a\right) + \color{blue}{t}}, x + y\right) \]
      12. +-commutative77.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t + \left(-a\right)}}, x + y\right) \]
      13. sub-neg77.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{t - a}}, x + y\right) \]
    3. Simplified77.6%

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

      \[\leadsto \color{blue}{\left(x + \left(y + \left(-1 \cdot y + \frac{y \cdot z}{t}\right)\right)\right) - \frac{a \cdot y}{t}} \]
    6. Step-by-step derivation
      1. associate-+r+81.5%

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

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

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

        \[\leadsto \left(x + \left(\color{blue}{0} + \frac{y \cdot z}{t}\right)\right) - \frac{a \cdot y}{t} \]
      5. associate-+r+81.5%

        \[\leadsto \color{blue}{\left(\left(x + 0\right) + \frac{y \cdot z}{t}\right)} - \frac{a \cdot y}{t} \]
      6. associate-/l*80.1%

        \[\leadsto \left(\left(x + 0\right) + \color{blue}{y \cdot \frac{z}{t}}\right) - \frac{a \cdot y}{t} \]
      7. associate-/l*75.3%

        \[\leadsto \left(\left(x + 0\right) + y \cdot \frac{z}{t}\right) - \color{blue}{a \cdot \frac{y}{t}} \]
    7. Simplified75.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.3 \cdot 10^{+19} \lor \neg \left(a \leq 1.95 \cdot 10^{+26}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 63.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{-13} \lor \neg \left(a \leq 1.75 \cdot 10^{-28}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= a -5.5e-13) (not (<= a 1.75e-28))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -5.5e-13) || !(a <= 1.75e-28)) {
		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 ((a <= (-5.5d-13)) .or. (.not. (a <= 1.75d-28))) 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 ((a <= -5.5e-13) || !(a <= 1.75e-28)) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -5.5e-13) or not (a <= 1.75e-28):
		tmp = x + y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -5.5e-13) || !(a <= 1.75e-28))
		tmp = Float64(x + y);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -5.5e-13) || ~((a <= 1.75e-28)))
		tmp = x + y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.5e-13], N[Not[LessEqual[a, 1.75e-28]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{-13} \lor \neg \left(a \leq 1.75 \cdot 10^{-28}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.49999999999999979e-13 or 1.75e-28 < a

    1. Initial program 77.2%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified74.7%

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

    if -5.49999999999999979e-13 < a < 1.75e-28

    1. Initial program 71.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{-13} \lor \neg \left(a \leq 1.75 \cdot 10^{-28}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 52.1% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.45 \cdot 10^{+100}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a) :precision binary64 (if (<= y 1.45e+100) x y))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= 1.45e+100) {
		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 <= 1.45d+100) 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 <= 1.45e+100) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= 1.45e+100:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= 1.45e+100)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= 1.45e+100)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.45e+100], x, y]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.45 \cdot 10^{+100}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.45e100

    1. Initial program 77.6%

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

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

    if 1.45e100 < y

    1. Initial program 58.5%

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

      \[\leadsto \color{blue}{y - \frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. sub-neg56.0%

        \[\leadsto \color{blue}{y + \left(-\frac{y \cdot \left(z - t\right)}{a - t}\right)} \]
      2. *-rgt-identity56.0%

        \[\leadsto \color{blue}{y \cdot 1} + \left(-\frac{y \cdot \left(z - t\right)}{a - t}\right) \]
      3. associate-*r/74.8%

        \[\leadsto y \cdot 1 + \left(-\color{blue}{y \cdot \frac{z - t}{a - t}}\right) \]
      4. distribute-rgt-neg-in74.8%

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

        \[\leadsto y \cdot 1 + y \cdot \color{blue}{\left(-1 \cdot \frac{z - t}{a - t}\right)} \]
      6. distribute-lft-in74.8%

        \[\leadsto \color{blue}{y \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
      7. mul-1-neg74.8%

        \[\leadsto y \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
      8. unsub-neg74.8%

        \[\leadsto y \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    5. Simplified74.8%

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

      \[\leadsto y \cdot \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.45 \cdot 10^{+100}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 51.4% 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 74.6%

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

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

Developer target: 87.7% 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 2024100 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
  :precision binary64

  :alt
  (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))

  (- (+ x y) (/ (* (- z t) y) (- a t))))