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

Percentage Accurate: 77.0% → 93.8%
Time: 11.1s
Alternatives: 11
Speedup: 1.2×

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: 77.0% 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: 93.8% accurate, 0.8× speedup?

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

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

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

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

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

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

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

      \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
    6. associate-/r/90.9%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 82.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{if}\;a \leq -210000:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;a \leq 3.8 \cdot 10^{+30}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.1e5 or 3.8000000000000001e30 < a

    1. Initial program 77.8%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1e5 < a < 7.5999999999999996e-190

    1. Initial program 75.6%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/89.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} + x \]
    7. Simplified89.5%

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

    if 7.5999999999999996e-190 < a < 2.7e26

    1. Initial program 83.7%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot a - y \cdot z}{t} + x} \]
    5. Step-by-step derivation
      1. +-commutative73.5%

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot a - y \cdot z}{t}} \]
      2. sub-neg73.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7e26 < a < 3.8000000000000001e30

    1. Initial program 50.1%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/100.0%

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) + \left(-z\right)}}{a - t}, y, y\right) \]
      11. unsub-neg100.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -210000:\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{-190}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+26}:\\ \;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+30}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \end{array} \]

Alternative 3: 85.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7200000000:\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.2e9

    1. Initial program 76.0%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.2e9 < a < 1.2e49

    1. Initial program 77.7%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/86.6%

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{y \cdot z}{a - t}} \]
    5. Step-by-step derivation
      1. associate-*r/87.5%

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

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

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

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

    if 1.2e49 < a

    1. Initial program 80.9%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/97.3%

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) + \left(-z\right)}}{a - t}, y, y\right) \]
      11. unsub-neg97.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7200000000:\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+49}:\\ \;\;\;\;x - \frac{y \cdot z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(\frac{t}{a - t} + 1\right)\\ \end{array} \]

Alternative 4: 89.2% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.80000000000000008e103

    1. Initial program 49.5%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/76.1%

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) + \left(-z\right)}}{a - t}, y, y\right) \]
      11. unsub-neg76.0%

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

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

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

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

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

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

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

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

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

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

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

    if -2.80000000000000008e103 < t < 1.05e55

    1. Initial program 88.2%

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

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

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

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

    if 1.05e55 < t

    1. Initial program 66.9%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/92.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+103}:\\ \;\;\;\;x + y \cdot \frac{z - a}{t}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+55}:\\ \;\;\;\;\left(y + x\right) - y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{t}{a - z}}\\ \end{array} \]

Alternative 5: 82.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3100000 \lor \neg \left(a \leq 2.3 \cdot 10^{+30}\right):\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.1e6 or 2.3e30 < a

    1. Initial program 77.8%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1e6 < a < 2.3e30

    1. Initial program 78.0%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/87.0%

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) + \left(-z\right)}}{a - t}, y, y\right) \]
      11. unsub-neg87.0%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} + x \]
    7. Simplified81.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3100000 \lor \neg \left(a \leq 2.3 \cdot 10^{+30}\right):\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \end{array} \]

Alternative 6: 86.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -15500000000 \lor \neg \left(a \leq 3.7 \cdot 10^{+38}\right):\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.55e10 or 3.7000000000000001e38 < a

    1. Initial program 78.5%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/97.0%

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) + \left(-z\right)}}{a - t}, y, y\right) \]
      11. unsub-neg97.0%

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

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

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

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

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

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

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

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

    if -1.55e10 < a < 3.7000000000000001e38

    1. Initial program 77.4%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/86.4%

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{\color{blue}{\left(-\left(-t\right)\right) + \left(-z\right)}}{a - t}, y, y\right) \]
      11. unsub-neg86.4%

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

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

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{y \cdot z}{a - t}} \]
    5. Step-by-step derivation
      1. associate-*r/87.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -15500000000 \lor \neg \left(a \leq 3.7 \cdot 10^{+38}\right):\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot z}{a - t}\\ \end{array} \]

Alternative 7: 89.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

      \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
    6. associate-/r/90.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 77.4% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -26000000:\\
\;\;\;\;y + x\\

\mathbf{elif}\;a \leq 1.05 \cdot 10^{+47}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.6e7 or 1.05e47 < a

    1. Initial program 77.4%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/96.1%

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

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

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

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

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

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

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

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

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

    if -2.6e7 < a < 1.05e47

    1. Initial program 78.3%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/87.1%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -26000000:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{+47}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 9: 77.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -720000:\\
\;\;\;\;y + x\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+45}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.2e5 or 6.19999999999999975e45 < a

    1. Initial program 77.4%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/96.1%

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

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

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

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

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

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

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

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

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

    if -7.2e5 < a < 6.19999999999999975e45

    1. Initial program 78.3%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/87.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} + x \]
    7. Simplified81.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -720000:\\ \;\;\;\;y + x\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+45}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 10: 62.8% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;t \leq 3.5 \cdot 10^{+59}:\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.9000000000000003e187 or 3.5e59 < t

    1. Initial program 63.0%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/89.2%

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

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

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

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

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

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

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

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

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

    if -4.9000000000000003e187 < t < 3.5e59

    1. Initial program 84.1%

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

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

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

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

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

        \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
      6. associate-/r/91.6%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.9 \cdot 10^{+187}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+59}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 50.8% accurate, 13.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 77.9%

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

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

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

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

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

      \[\leadsto x + \left(\color{blue}{\frac{-\left(z - t\right)}{\frac{a - t}{y}}} + y\right) \]
    6. associate-/r/90.9%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification50.2%

    \[\leadsto x \]

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

  :herbie-target
  (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))))