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

Percentage Accurate: 76.8% → 93.7%
Time: 11.3s
Alternatives: 10
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 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.8% 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.7% 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 75.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 80.6% 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 -3.1 \cdot 10^{+150}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{+104}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq -1.02 \cdot 10^{-79} \lor \neg \left(a \leq 0.049\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ y (- x (/ y (/ a z))))))
   (if (<= a -3.1e+150)
     t_1
     (if (<= a -4.8e+104)
       (+ x (/ y (/ t z)))
       (if (or (<= a -1.02e-79) (not (<= a 0.049)))
         t_1
         (+ x (* z (/ y t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y + (x - (y / (a / z)));
	double tmp;
	if (a <= -3.1e+150) {
		tmp = t_1;
	} else if (a <= -4.8e+104) {
		tmp = x + (y / (t / z));
	} else if ((a <= -1.02e-79) || !(a <= 0.049)) {
		tmp = t_1;
	} else {
		tmp = x + (z * (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) :: t_1
    real(8) :: tmp
    t_1 = y + (x - (y / (a / z)))
    if (a <= (-3.1d+150)) then
        tmp = t_1
    else if (a <= (-4.8d+104)) then
        tmp = x + (y / (t / z))
    else if ((a <= (-1.02d-79)) .or. (.not. (a <= 0.049d0))) then
        tmp = t_1
    else
        tmp = x + (z * (y / 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 + (x - (y / (a / z)));
	double tmp;
	if (a <= -3.1e+150) {
		tmp = t_1;
	} else if (a <= -4.8e+104) {
		tmp = x + (y / (t / z));
	} else if ((a <= -1.02e-79) || !(a <= 0.049)) {
		tmp = t_1;
	} else {
		tmp = x + (z * (y / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y + (x - (y / (a / z)))
	tmp = 0
	if a <= -3.1e+150:
		tmp = t_1
	elif a <= -4.8e+104:
		tmp = x + (y / (t / z))
	elif (a <= -1.02e-79) or not (a <= 0.049):
		tmp = t_1
	else:
		tmp = x + (z * (y / t))
	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 <= -3.1e+150)
		tmp = t_1;
	elseif (a <= -4.8e+104)
		tmp = Float64(x + Float64(y / Float64(t / z)));
	elseif ((a <= -1.02e-79) || !(a <= 0.049))
		tmp = t_1;
	else
		tmp = Float64(x + Float64(z * Float64(y / t)));
	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 <= -3.1e+150)
		tmp = t_1;
	elseif (a <= -4.8e+104)
		tmp = x + (y / (t / z));
	elseif ((a <= -1.02e-79) || ~((a <= 0.049)))
		tmp = t_1;
	else
		tmp = x + (z * (y / t));
	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, -3.1e+150], t$95$1, If[LessEqual[a, -4.8e+104], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -1.02e-79], N[Not[LessEqual[a, 0.049]], $MachinePrecision]], t$95$1, N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -1.02 \cdot 10^{-79} \lor \neg \left(a \leq 0.049\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.10000000000000014e150 or -4.8e104 < a < -1.02000000000000002e-79 or 0.049000000000000002 < a

    1. Initial program 79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.10000000000000014e150 < a < -4.8e104

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 83.9%

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

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

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

    if -1.02000000000000002e-79 < a < 0.049000000000000002

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} + x \]
    9. Applied egg-rr87.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.1 \cdot 10^{+150}:\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{+104}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq -1.02 \cdot 10^{-79} \lor \neg \left(a \leq 0.049\right):\\ \;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \end{array} \]

Alternative 3: 89.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{-165} \lor \neg \left(a \leq 8 \cdot 10^{-15}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{z - t}{a - t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1e-165 or 8.0000000000000006e-15 < a

    1. Initial program 78.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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+94.8%

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

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

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

    if -1e-165 < a < 8.0000000000000006e-15

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{y}{\frac{t}{a - z}}} \]
      5. associate-/r/93.2%

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

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

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

Alternative 4: 88.3% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 55.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)} \]
    4. Taylor expanded in y around 0 97.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 84.8%

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} + x \]
    8. Step-by-step derivation
      1. associate-/r/95.6%

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} + x \]
    9. Applied egg-rr95.6%

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

    if -4.5e150 < t < 3.2499999999999999e112

    1. Initial program 86.8%

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

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

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

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

    if 3.2499999999999999e112 < t

    1. Initial program 49.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{y}{\frac{t}{a - z}}} \]
      5. associate-/r/94.4%

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

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

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

Alternative 5: 82.9% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.7999999999999999e-90 or 0.28999999999999998 < a

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7999999999999999e-90 < a < 0.28999999999999998

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{y}{\frac{t}{a - z}}} \]
      5. associate-/r/90.8%

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

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

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

Alternative 6: 81.4% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 80.0%

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

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

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

        \[\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/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 y around 0 98.7%

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

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

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

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

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

    if -1.8999999999999999e-78 < a < 0.599999999999999978

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{y}{\frac{t}{a - z}}} \]
      5. associate-/r/90.8%

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

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

    if 0.599999999999999978 < a

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 76.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 0.135:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.5999999999999999e-77 or 0.13500000000000001 < a

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 -5.5999999999999999e-77 < a < 0.13500000000000001

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} + x \]
    9. Applied egg-rr87.3%

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

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

Alternative 8: 64.1% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;t \leq 2.8 \cdot 10^{+152}:\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.90000000000000011e150 or 2.8000000000000002e152 < t

    1. Initial program 52.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.90000000000000011e150 < t < 2.8000000000000002e152

    1. Initial program 85.7%

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

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

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

        \[\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/92.5%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+150}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+152}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 53.7% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.2 \cdot 10^{-265}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 5.2 \cdot 10^{-159}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.1999999999999996e-265 or 5.1999999999999997e-159 < x

    1. Initial program 76.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*87.7%

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

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

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

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

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

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

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

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

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

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

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

    if -9.1999999999999996e-265 < x < 5.1999999999999997e-159

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.2 \cdot 10^{-265}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-159}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 51.4% accurate, 13.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification54.1%

    \[\leadsto x \]

Developer target: 87.8% 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 2023199 
(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))))