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

Percentage Accurate: 76.6% → 88.2%
Time: 11.5s
Alternatives: 11
Speedup: 0.7×

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 11 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.6% 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: 88.2% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.00000000000000004e95 or 3.19999999999999983e67 < t

    1. Initial program 52.5%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 78.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. sub-neg78.3%

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

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

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

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

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

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

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

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

    if -2.00000000000000004e95 < t < 3.19999999999999983e67

    1. Initial program 93.8%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification93.8%

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

Alternative 2: 63.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+54} \lor \neg \left(z \leq 3.8 \cdot 10^{+61}\right) \land \left(z \leq 1.2 \cdot 10^{+81} \lor \neg \left(z \leq 8.4 \cdot 10^{+175}\right)\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 -7.6e+54)
         (and (not (<= z 3.8e+61)) (or (<= z 1.2e+81) (not (<= z 8.4e+175)))))
   (* y (/ z (- t a)))
   (+ x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -7.6e+54) || (!(z <= 3.8e+61) && ((z <= 1.2e+81) || !(z <= 8.4e+175)))) {
		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 <= (-7.6d+54)) .or. (.not. (z <= 3.8d+61)) .and. (z <= 1.2d+81) .or. (.not. (z <= 8.4d+175))) 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 <= -7.6e+54) || (!(z <= 3.8e+61) && ((z <= 1.2e+81) || !(z <= 8.4e+175)))) {
		tmp = y * (z / (t - a));
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -7.6e+54) or (not (z <= 3.8e+61) and ((z <= 1.2e+81) or not (z <= 8.4e+175))):
		tmp = y * (z / (t - a))
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -7.6e+54) || (!(z <= 3.8e+61) && ((z <= 1.2e+81) || !(z <= 8.4e+175))))
		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 <= -7.6e+54) || (~((z <= 3.8e+61)) && ((z <= 1.2e+81) || ~((z <= 8.4e+175)))))
		tmp = y * (z / (t - a));
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.6e+54], And[N[Not[LessEqual[z, 3.8e+61]], $MachinePrecision], Or[LessEqual[z, 1.2e+81], N[Not[LessEqual[z, 8.4e+175]], $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 -7.6 \cdot 10^{+54} \lor \neg \left(z \leq 3.8 \cdot 10^{+61}\right) \land \left(z \leq 1.2 \cdot 10^{+81} \lor \neg \left(z \leq 8.4 \cdot 10^{+175}\right)\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 < -7.6000000000000005e54 or 3.79999999999999995e61 < z < 1.19999999999999995e81 or 8.3999999999999996e175 < z

    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 z around inf 67.4%

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

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a - t}} \]
      2. distribute-neg-frac267.4%

        \[\leadsto \color{blue}{\frac{y \cdot z}{-\left(a - t\right)}} \]
      3. sub-neg67.4%

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

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

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

        \[\leadsto \frac{y \cdot z}{\color{blue}{t + \left(-a\right)}} \]
      7. sub-neg67.4%

        \[\leadsto \frac{y \cdot z}{\color{blue}{t - a}} \]
      8. associate-/l*65.4%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t - a}} \]
    5. Simplified65.4%

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

    if -7.6000000000000005e54 < z < 3.79999999999999995e61 or 1.19999999999999995e81 < z < 8.3999999999999996e175

    1. Initial program 77.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+54} \lor \neg \left(z \leq 3.8 \cdot 10^{+61}\right) \land \left(z \leq 1.2 \cdot 10^{+81} \lor \neg \left(z \leq 8.4 \cdot 10^{+175}\right)\right):\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 57.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+55} \lor \neg \left(z \leq 1.25 \cdot 10^{+67} \lor \neg \left(z \leq 6.5 \cdot 10^{+80}\right) \land z \leq 2.65 \cdot 10^{+175}\right):\\
\;\;\;\;y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.19999999999999975e55 or 1.24999999999999994e67 < z < 6.4999999999999998e80 or 2.65000000000000006e175 < z

    1. Initial program 80.9%

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

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

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a - t}} \]
      2. distribute-neg-frac266.7%

        \[\leadsto \color{blue}{\frac{y \cdot z}{-\left(a - t\right)}} \]
      3. sub-neg66.7%

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

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

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

        \[\leadsto \frac{y \cdot z}{\color{blue}{t + \left(-a\right)}} \]
      7. sub-neg66.7%

        \[\leadsto \frac{y \cdot z}{\color{blue}{t - a}} \]
      8. associate-/l*64.7%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    8. Simplified51.4%

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

    if -7.19999999999999975e55 < z < 1.24999999999999994e67 or 6.4999999999999998e80 < z < 2.65000000000000006e175

    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 68.3%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified68.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+55} \lor \neg \left(z \leq 1.25 \cdot 10^{+67} \lor \neg \left(z \leq 6.5 \cdot 10^{+80}\right) \land z \leq 2.65 \cdot 10^{+175}\right):\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 56.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.25 \cdot 10^{+67}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+162}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.8000000000000001e57 or 1.24999999999999994e67 < z < 2.0999999999999999e81

    1. Initial program 74.4%

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

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

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a - t}} \]
      2. distribute-neg-frac258.7%

        \[\leadsto \color{blue}{\frac{y \cdot z}{-\left(a - t\right)}} \]
      3. sub-neg58.7%

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

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

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

        \[\leadsto \frac{y \cdot z}{\color{blue}{t + \left(-a\right)}} \]
      7. sub-neg58.7%

        \[\leadsto \frac{y \cdot z}{\color{blue}{t - a}} \]
      8. associate-/l*58.9%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t - a}} \]
    5. Simplified58.9%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    8. Simplified50.5%

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

    if -1.8000000000000001e57 < z < 1.24999999999999994e67 or 2.0999999999999999e81 < z < 1.45000000000000003e162

    1. Initial program 77.9%

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

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

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

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

    if 1.45000000000000003e162 < z

    1. Initial program 93.5%

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

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

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a - t}} \]
      2. distribute-neg-frac283.5%

        \[\leadsto \color{blue}{\frac{y \cdot z}{-\left(a - t\right)}} \]
      3. sub-neg83.5%

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

        \[\leadsto \frac{y \cdot z}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}} \]
      5. remove-double-neg83.5%

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

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

        \[\leadsto \frac{y \cdot z}{\color{blue}{t - a}} \]
      8. associate-/l*73.4%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t - a}} \]
    5. Simplified73.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+57}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+67}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+81}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+162}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 57.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.12 \cdot 10^{+67}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+152}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.69999999999999996e57 or 1.12e67 < z < 8.50000000000000007e80

    1. Initial program 74.4%

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

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

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a - t}} \]
      2. distribute-neg-frac258.7%

        \[\leadsto \color{blue}{\frac{y \cdot z}{-\left(a - t\right)}} \]
      3. sub-neg58.7%

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

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

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

        \[\leadsto \frac{y \cdot z}{\color{blue}{t + \left(-a\right)}} \]
      7. sub-neg58.7%

        \[\leadsto \frac{y \cdot z}{\color{blue}{t - a}} \]
      8. associate-/l*58.9%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t - a}} \]
    5. Simplified58.9%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    8. Simplified50.5%

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

    if -1.69999999999999996e57 < z < 1.12e67 or 8.50000000000000007e80 < z < 8.4999999999999993e152

    1. Initial program 77.9%

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

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

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

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

    if 8.4999999999999993e152 < z

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in90.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-neg90.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    8. Step-by-step derivation
      1. *-commutative63.6%

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

        \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
    9. Simplified57.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+57}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+67}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+80}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+152}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t} \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 89.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+96} \lor \neg \left(t \leq 9.2 \cdot 10^{+54}\right):\\ \;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{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.1e+96) (not (<= t 9.2e+54)))
   (+ (- x (* a (/ y t))) (* y (/ 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.1e+96) || !(t <= 9.2e+54)) {
		tmp = (x - (a * (y / t))) + (y * (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.1d+96)) .or. (.not. (t <= 9.2d+54))) then
        tmp = (x - (a * (y / t))) + (y * (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.1e+96) || !(t <= 9.2e+54)) {
		tmp = (x - (a * (y / t))) + (y * (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.1e+96) or not (t <= 9.2e+54):
		tmp = (x - (a * (y / t))) + (y * (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.1e+96) || !(t <= 9.2e+54))
		tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(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.1e+96) || ~((t <= 9.2e+54)))
		tmp = (x - (a * (y / t))) + (y * (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.1e+96], N[Not[LessEqual[t, 9.2e+54]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / 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 -2.1 \cdot 10^{+96} \lor \neg \left(t \leq 9.2 \cdot 10^{+54}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{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.1000000000000001e96 or 9.19999999999999977e54 < t

    1. Initial program 54.5%

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

      \[\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. sub-neg79.2%

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

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

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

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

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

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

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

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

    if -2.1000000000000001e96 < t < 9.19999999999999977e54

    1. Initial program 93.7%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*92.8%

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

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

      \[\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 simplification93.2%

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

Alternative 7: 82.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.3 \cdot 10^{-5} \lor \neg \left(a \leq 1.8 \cdot 10^{-86}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.3000000000000001e-5 or 1.79999999999999983e-86 < a

    1. Initial program 80.4%

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

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

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

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

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

    if -5.3000000000000001e-5 < a < 1.79999999999999983e-86

    1. Initial program 76.9%

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

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

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

Alternative 8: 81.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.15 \cdot 10^{-24} \lor \neg \left(a \leq 1.5 \cdot 10^{-87}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.1499999999999999e-24 or 1.50000000000000008e-87 < a

    1. Initial program 80.1%

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

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

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

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

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

    if -3.1499999999999999e-24 < a < 1.50000000000000008e-87

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in72.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-neg72.8%

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

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

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

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

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

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

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

Alternative 9: 73.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -9.6 \cdot 10^{+129} \lor \neg \left(a \leq 1.4 \cdot 10^{+49}\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 -9.6e+129) (not (<= a 1.4e+49))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -9.6e+129) || !(a <= 1.4e+49)) {
		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 <= (-9.6d+129)) .or. (.not. (a <= 1.4d+49))) 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 <= -9.6e+129) || !(a <= 1.4e+49)) {
		tmp = x + y;
	} else {
		tmp = x + ((y * z) / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -9.6e+129) or not (a <= 1.4e+49):
		tmp = x + y
	else:
		tmp = x + ((y * z) / t)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -9.6e+129) || !(a <= 1.4e+49))
		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 <= -9.6e+129) || ~((a <= 1.4e+49)))
		tmp = x + y;
	else
		tmp = x + ((y * z) / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -9.6e+129], N[Not[LessEqual[a, 1.4e+49]], $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 -9.6 \cdot 10^{+129} \lor \neg \left(a \leq 1.4 \cdot 10^{+49}\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 < -9.5999999999999995e129 or 1.3999999999999999e49 < a

    1. Initial program 84.1%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified87.9%

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

    if -9.5999999999999995e129 < a < 1.3999999999999999e49

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 62.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.15 \cdot 10^{-223} \lor \neg \left(a \leq 2.7 \cdot 10^{-23}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.15e-223 or 2.69999999999999985e-23 < a

    1. Initial program 82.6%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified64.3%

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

    if -2.15e-223 < a < 2.69999999999999985e-23

    1. Initial program 71.3%

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

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

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

Alternative 11: 49.9% 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 78.8%

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

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

Developer target: 88.3% 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 2024110 
(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))))