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

Percentage Accurate: 98.2% → 98.6%
Time: 8.0s
Alternatives: 13
Speedup: 0.6×

Specification

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

\\
x + y \cdot \frac{z - t}{a - t}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 98.2% accurate, 1.0× speedup?

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

\\
x + y \cdot \frac{z - t}{a - t}
\end{array}

Alternative 1: 98.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
\mathbf{if}\;t_1 \leq 4 \cdot 10^{+269}:\\
\;\;\;\;x + t_1 \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 z t) (-.f64 a t)) < 4.0000000000000002e269

    1. Initial program 99.5%

      \[x + y \cdot \frac{z - t}{a - t} \]

    if 4.0000000000000002e269 < (/.f64 (-.f64 z t) (-.f64 a t))

    1. Initial program 37.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. associate-*r/99.5%

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
    3. Applied egg-rr99.5%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    5. Taylor expanded in x around 0 99.5%

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

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

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

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

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

Alternative 2: 75.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+137}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;t \leq -2.4 \cdot 10^{-84}:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\

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

\mathbf{elif}\;t \leq 1.15 \cdot 10^{-36}:\\
\;\;\;\;\left(t - z\right) \cdot \frac{y}{t - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.59999999999999999e137 or 1.14999999999999998e-36 < t

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative99.9%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
      2. *-commutative99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def94.7%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-94.7%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{0 - \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      16. sub0-neg94.7%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-194.7%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-1 \cdot \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      18. *-commutative94.7%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*94.7%

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

        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{1}}, \frac{y}{t - a}, x\right) \]
      21. /-rgt-identity94.7%

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

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

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

    if -4.59999999999999999e137 < t < -2.40000000000000017e-84

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. associate-*r/92.5%

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
    3. Applied egg-rr99.8%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    5. Taylor expanded in a around 0 73.9%

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

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

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

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

        \[\leadsto \color{blue}{x - y \cdot \frac{z}{t}} \]
    7. Simplified77.6%

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

    if -2.40000000000000017e-84 < t < 8.99999999999999994e-98

    1. Initial program 93.4%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative93.4%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
      2. *-commutative93.4%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def96.1%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-96.1%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-196.1%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*96.1%

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

        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{1}}, \frac{y}{t - a}, x\right) \]
      21. /-rgt-identity96.1%

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

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

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

    if 8.99999999999999994e-98 < t < 1.14999999999999998e-36

    1. Initial program 85.2%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative85.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def99.5%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-99.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{0 - \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      16. sub0-neg99.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-199.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-1 \cdot \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      18. *-commutative99.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*99.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - z}{\frac{-1}{-1}}}, \frac{y}{t - a}, x\right) \]
      20. metadata-eval99.5%

        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{1}}, \frac{y}{t - a}, x\right) \]
      21. /-rgt-identity99.5%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - z\right)}{t - a}} \]
    5. Step-by-step derivation
      1. *-commutative75.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{+137}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-84}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-98}:\\ \;\;\;\;x + \frac{z \cdot y}{a}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-36}:\\ \;\;\;\;\left(t - z\right) \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 3: 64.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.4 \cdot 10^{+257} \lor \neg \left(z \leq -6.5 \cdot 10^{+213}\right) \land \left(z \leq -6.8 \cdot 10^{+138} \lor \neg \left(z \leq 6.6 \cdot 10^{+205}\right)\right):\\
\;\;\;\;z \cdot \frac{y}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.40000000000000052e257 or -6.49999999999999982e213 < z < -6.80000000000000022e138 or 6.6000000000000004e205 < z

    1. Initial program 88.6%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. associate-*r/79.4%

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
    3. Applied egg-rr99.7%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    5. Taylor expanded in x around 0 58.3%

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

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

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

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

    if -8.40000000000000052e257 < z < -6.49999999999999982e213 or -6.80000000000000022e138 < z < 6.6000000000000004e205

    1. Initial program 99.4%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative99.4%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
      2. *-commutative99.4%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def95.5%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-95.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{0 - \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      16. sub0-neg95.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-195.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-1 \cdot \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      18. *-commutative95.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*95.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - z}{\frac{-1}{-1}}}, \frac{y}{t - a}, x\right) \]
      20. metadata-eval95.5%

        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{1}}, \frac{y}{t - a}, x\right) \]
      21. /-rgt-identity95.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.4 \cdot 10^{+257} \lor \neg \left(z \leq -6.5 \cdot 10^{+213}\right) \land \left(z \leq -6.8 \cdot 10^{+138} \lor \neg \left(z \leq 6.6 \cdot 10^{+205}\right)\right):\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 4: 77.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.42 \cdot 10^{+137}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;t \leq -7.5 \cdot 10^{-43}:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.42e137 or 4.39999999999999987e-35 < t

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative99.9%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
      2. *-commutative99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def94.7%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-94.7%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{0 - \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      16. sub0-neg94.7%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-194.7%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-1 \cdot \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      18. *-commutative94.7%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*94.7%

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

        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{1}}, \frac{y}{t - a}, x\right) \]
      21. /-rgt-identity94.7%

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

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

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

    if -1.42e137 < t < -7.50000000000000068e-43

    1. Initial program 99.8%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. associate-*r/93.1%

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
    3. Applied egg-rr99.8%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    5. Taylor expanded in a around 0 74.0%

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

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

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

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

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

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

    if -7.50000000000000068e-43 < t < 4.39999999999999987e-35

    1. Initial program 92.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative92.9%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
      2. *-commutative92.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def96.9%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-96.9%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-196.9%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*96.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} + x \]
    6. Simplified76.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.42 \cdot 10^{+137}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-43}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-35}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 5: 78.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{-28} \lor \neg \left(x \leq 1.6 \cdot 10^{-99}\right):\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.45000000000000006e-28 or 1.6e-99 < x

    1. Initial program 97.0%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in z around inf 87.5%

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

    if -1.45000000000000006e-28 < x < 1.6e-99

    1. Initial program 97.8%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative97.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def92.5%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-92.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{0 - \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      16. sub0-neg92.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-192.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-1 \cdot \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      18. *-commutative92.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*92.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - z}{\frac{-1}{-1}}}, \frac{y}{t - a}, x\right) \]
      20. metadata-eval92.5%

        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{1}}, \frac{y}{t - a}, x\right) \]
      21. /-rgt-identity92.5%

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

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

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

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

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

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

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

Alternative 6: 87.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.42 \cdot 10^{+20} \lor \neg \left(z \leq 7.6 \cdot 10^{-56}\right):\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.42e20 or 7.6000000000000004e-56 < z

    1. Initial program 95.0%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in z around inf 85.2%

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

    if -1.42e20 < z < 7.6000000000000004e-56

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative99.9%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
      2. *-commutative99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def94.6%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-94.6%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{0 - \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      16. sub0-neg94.6%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-194.6%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-1 \cdot \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      18. *-commutative94.6%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*94.6%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - z}{\frac{-1}{-1}}}, \frac{y}{t - a}, x\right) \]
      20. metadata-eval94.6%

        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{1}}, \frac{y}{t - a}, x\right) \]
      21. /-rgt-identity94.6%

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

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

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

        \[\leadsto \color{blue}{x + \frac{y \cdot t}{t - a}} \]
      2. associate-/l*92.3%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t - a}{t}}} \]
    6. Simplified92.3%

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

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

Alternative 7: 77.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+39}:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.50000000000000011e39 or 3.10000000000000012e-35 < t

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative99.9%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
      2. *-commutative99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def95.4%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-95.4%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{0 - \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      16. sub0-neg95.4%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-195.4%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-1 \cdot \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      18. *-commutative95.4%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*95.4%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - z}{\frac{-1}{-1}}}, \frac{y}{t - a}, x\right) \]
      20. metadata-eval95.4%

        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{1}}, \frac{y}{t - a}, x\right) \]
      21. /-rgt-identity95.4%

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

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

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

    if -9.50000000000000011e39 < t < 3.10000000000000012e-35

    1. Initial program 94.1%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in t around 0 74.9%

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

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

Alternative 8: 77.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+40}:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.14999999999999997e40 or 1.75e-34 < t

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative99.9%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
      2. *-commutative99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def95.4%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-95.4%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{0 - \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      16. sub0-neg95.4%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-195.4%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-1 \cdot \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      18. *-commutative95.4%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*95.4%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - z}{\frac{-1}{-1}}}, \frac{y}{t - a}, x\right) \]
      20. metadata-eval95.4%

        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{1}}, \frac{y}{t - a}, x\right) \]
      21. /-rgt-identity95.4%

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

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

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

    if -1.14999999999999997e40 < t < 1.75e-34

    1. Initial program 94.1%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative94.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def97.4%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-97.4%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{0 - \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      16. sub0-neg97.4%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-197.4%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*97.4%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - z}{\frac{-1}{-1}}}, \frac{y}{t - a}, x\right) \]
      20. metadata-eval97.4%

        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{1}}, \frac{y}{t - a}, x\right) \]
      21. /-rgt-identity97.4%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} + x \]
    6. Simplified74.9%

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

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

Alternative 9: 62.0% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.38 \cdot 10^{+281} \lor \neg \left(z \leq 2.5 \cdot 10^{+218}\right):\\
\;\;\;\;z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.38000000000000008e281 or 2.49999999999999991e218 < z

    1. Initial program 96.7%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative96.7%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
      2. *-commutative96.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def99.9%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-99.9%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-199.9%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*99.9%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{a} + x} \]
    5. Taylor expanded in y around inf 50.5%

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
      2. *-commutative61.6%

        \[\leadsto \color{blue}{z \cdot \frac{y}{a}} \]
    7. Simplified61.6%

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

    if -1.38000000000000008e281 < z < 2.49999999999999991e218

    1. Initial program 97.4%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative97.4%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
      2. *-commutative97.4%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def95.9%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-95.9%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-195.9%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*95.9%

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

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

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

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

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

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

Alternative 10: 61.8% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.7 \cdot 10^{+218}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 2.70000000000000013e218

    1. Initial program 97.1%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative97.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def96.0%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-96.0%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-196.0%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*96.0%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - z}{\frac{-1}{-1}}}, \frac{y}{t - a}, x\right) \]
      20. metadata-eval96.0%

        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{1}}, \frac{y}{t - a}, x\right) \]
      21. /-rgt-identity96.0%

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

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

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

    if 2.70000000000000013e218 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative99.9%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
      2. *-commutative99.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def99.9%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-99.9%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-199.9%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*99.9%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{a} + x} \]
    5. Taylor expanded in y around inf 51.8%

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified53.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 2.7 \cdot 10^{+218}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \end{array} \]

Alternative 11: 53.8% accurate, 2.1× speedup?

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

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

\mathbf{elif}\;x \leq 2.9 \cdot 10^{-98}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.6000000000000004e-76 or 2.9e-98 < x

    1. Initial program 97.1%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative97.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def98.5%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-98.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{0 - \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      16. sub0-neg98.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-198.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-1 \cdot \left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      18. *-commutative98.5%

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*98.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - z}{\frac{-1}{-1}}}, \frac{y}{t - a}, x\right) \]
      20. metadata-eval98.5%

        \[\leadsto \mathsf{fma}\left(\frac{t - z}{\color{blue}{1}}, \frac{y}{t - a}, x\right) \]
      21. /-rgt-identity98.5%

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

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

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

    if -7.6000000000000004e-76 < x < 2.9e-98

    1. Initial program 97.7%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative97.7%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t} + x} \]
      2. *-commutative97.7%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
      11. fma-def91.9%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
      15. associate-+l-91.9%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
      17. neg-mul-191.9%

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

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
      19. associate-/l*91.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t - a} \cdot t} \]
      2. *-commutative43.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.6 \cdot 10^{-76}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{-98}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 12: 61.8% accurate, 3.7× speedup?

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

\\
x + y
\end{array}
Derivation
  1. Initial program 97.3%

    \[x + y \cdot \frac{z - t}{a - t} \]
  2. Step-by-step derivation
    1. +-commutative97.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
    11. fma-def96.3%

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
    15. associate-+l-96.3%

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

      \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
    17. neg-mul-196.3%

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

      \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
    19. associate-/l*96.3%

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

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

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

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

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

    \[\leadsto x + y \]

Alternative 13: 51.9% accurate, 11.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 97.3%

    \[x + y \cdot \frac{z - t}{a - t} \]
  2. Step-by-step derivation
    1. +-commutative97.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - t}{-1} \cdot \frac{y}{t - a}} + x \]
    11. fma-def96.3%

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(0 - t\right)} + z}{-1}, \frac{y}{t - a}, x\right) \]
    15. associate-+l-96.3%

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

      \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-\left(t - z\right)}}{-1}, \frac{y}{t - a}, x\right) \]
    17. neg-mul-196.3%

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

      \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\left(t - z\right) \cdot -1}}{-1}, \frac{y}{t - a}, x\right) \]
    19. associate-/l*96.3%

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

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

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

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

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

    \[\leadsto x \]

Developer target: 99.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023224 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
  :precision binary64

  :herbie-target
  (if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))

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