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

Percentage Accurate: 98.1% → 98.1%
Time: 9.4s
Alternatives: 13
Speedup: 1.0×

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.1% 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.1% 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}
Derivation
  1. Initial program 99.1%

    \[x + y \cdot \frac{z - t}{a - t} \]
  2. Final simplification99.1%

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

Alternative 2: 82.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -3.2 \cdot 10^{-38}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -2.1 \cdot 10^{-84}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\

\mathbf{elif}\;a \leq 3.1 \cdot 10^{-123}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -9.80000000000000029e55 or 5.99999999999999995e81 < a

    1. Initial program 99.8%

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

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

    if -9.80000000000000029e55 < a < -3.19999999999999977e-38 or -2.09999999999999998e-84 < a < 3.09999999999999998e-123

    1. Initial program 99.0%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot y} \]
      3. div-inv98.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{z - t}}} \]
    8. Simplified89.1%

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

    if -3.19999999999999977e-38 < a < -2.09999999999999998e-84

    1. Initial program 92.5%

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

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

    if 3.09999999999999998e-123 < a < 5.99999999999999995e81

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.8 \cdot 10^{+55}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-38}:\\ \;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-84}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-123}:\\ \;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+81}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \end{array} \]

Alternative 3: 81.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z - t}{a}\\ \mathbf{if}\;a \leq -5.5 \cdot 10^{+55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-38}:\\ \;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-85}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{-123}:\\ \;\;\;\;x + \frac{t - z}{\frac{t}{y}}\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{+82}:\\ \;\;\;\;x + y \cdot \frac{z}{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)))))
   (if (<= a -5.5e+55)
     t_1
     (if (<= a -5e-38)
       (- x (/ y (/ t (- z t))))
       (if (<= a -5e-85)
         (+ x (/ (* y z) a))
         (if (<= a 4.1e-123)
           (+ x (/ (- t z) (/ t y)))
           (if (<= a 2.45e+82) (+ x (* y (/ z (- a t)))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((z - t) / a));
	double tmp;
	if (a <= -5.5e+55) {
		tmp = t_1;
	} else if (a <= -5e-38) {
		tmp = x - (y / (t / (z - t)));
	} else if (a <= -5e-85) {
		tmp = x + ((y * z) / a);
	} else if (a <= 4.1e-123) {
		tmp = x + ((t - z) / (t / y));
	} else if (a <= 2.45e+82) {
		tmp = x + (y * (z / (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))
    if (a <= (-5.5d+55)) then
        tmp = t_1
    else if (a <= (-5d-38)) then
        tmp = x - (y / (t / (z - t)))
    else if (a <= (-5d-85)) then
        tmp = x + ((y * z) / a)
    else if (a <= 4.1d-123) then
        tmp = x + ((t - z) / (t / y))
    else if (a <= 2.45d+82) then
        tmp = x + (y * (z / (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));
	double tmp;
	if (a <= -5.5e+55) {
		tmp = t_1;
	} else if (a <= -5e-38) {
		tmp = x - (y / (t / (z - t)));
	} else if (a <= -5e-85) {
		tmp = x + ((y * z) / a);
	} else if (a <= 4.1e-123) {
		tmp = x + ((t - z) / (t / y));
	} else if (a <= 2.45e+82) {
		tmp = x + (y * (z / (a - t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * ((z - t) / a))
	tmp = 0
	if a <= -5.5e+55:
		tmp = t_1
	elif a <= -5e-38:
		tmp = x - (y / (t / (z - t)))
	elif a <= -5e-85:
		tmp = x + ((y * z) / a)
	elif a <= 4.1e-123:
		tmp = x + ((t - z) / (t / y))
	elif a <= 2.45e+82:
		tmp = x + (y * (z / (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) / a)))
	tmp = 0.0
	if (a <= -5.5e+55)
		tmp = t_1;
	elseif (a <= -5e-38)
		tmp = Float64(x - Float64(y / Float64(t / Float64(z - t))));
	elseif (a <= -5e-85)
		tmp = Float64(x + Float64(Float64(y * z) / a));
	elseif (a <= 4.1e-123)
		tmp = Float64(x + Float64(Float64(t - z) / Float64(t / y)));
	elseif (a <= 2.45e+82)
		tmp = Float64(x + Float64(y * Float64(z / 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));
	tmp = 0.0;
	if (a <= -5.5e+55)
		tmp = t_1;
	elseif (a <= -5e-38)
		tmp = x - (y / (t / (z - t)));
	elseif (a <= -5e-85)
		tmp = x + ((y * z) / a);
	elseif (a <= 4.1e-123)
		tmp = x + ((t - z) / (t / y));
	elseif (a <= 2.45e+82)
		tmp = x + (y * (z / (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] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.5e+55], t$95$1, If[LessEqual[a, -5e-38], N[(x - N[(y / N[(t / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5e-85], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.1e-123], N[(x + N[(N[(t - z), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.45e+82], N[(x + N[(y * N[(z / 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}\\
\mathbf{if}\;a \leq -5.5 \cdot 10^{+55}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq -5 \cdot 10^{-85}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -5.5000000000000004e55 or 2.45e82 < a

    1. Initial program 99.8%

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

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

    if -5.5000000000000004e55 < a < -5.00000000000000033e-38

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot y} \]
      3. div-inv99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{z - t}}} \]
    8. Simplified83.5%

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

    if -5.00000000000000033e-38 < a < -5.0000000000000002e-85

    1. Initial program 92.5%

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

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

    if -5.0000000000000002e-85 < a < 4.1e-123

    1. Initial program 98.7%

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

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

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

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

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

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

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

    if 4.1e-123 < a < 2.45e82

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{+55}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-38}:\\ \;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-85}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{-123}:\\ \;\;\;\;x + \frac{t - z}{\frac{t}{y}}\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{+82}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \end{array} \]

Alternative 4: 71.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{t - a} \cdot \left(t - z\right)\\ \mathbf{if}\;y \leq -6.5 \cdot 10^{+107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{-269}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{-57}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 115000:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (/ y (- t a)) (- t z))))
   (if (<= y -6.5e+107)
     t_1
     (if (<= y 8.8e-269)
       (+ x (/ (* y z) a))
       (if (<= y 1.6e-57)
         (+ x y)
         (if (<= y 115000.0) (+ x (* y (/ z a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y / (t - a)) * (t - z);
	double tmp;
	if (y <= -6.5e+107) {
		tmp = t_1;
	} else if (y <= 8.8e-269) {
		tmp = x + ((y * z) / a);
	} else if (y <= 1.6e-57) {
		tmp = x + y;
	} else if (y <= 115000.0) {
		tmp = x + (y * (z / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y / (t - a)) * (t - z)
    if (y <= (-6.5d+107)) then
        tmp = t_1
    else if (y <= 8.8d-269) then
        tmp = x + ((y * z) / a)
    else if (y <= 1.6d-57) then
        tmp = x + y
    else if (y <= 115000.0d0) then
        tmp = x + (y * (z / a))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y / (t - a)) * (t - z);
	double tmp;
	if (y <= -6.5e+107) {
		tmp = t_1;
	} else if (y <= 8.8e-269) {
		tmp = x + ((y * z) / a);
	} else if (y <= 1.6e-57) {
		tmp = x + y;
	} else if (y <= 115000.0) {
		tmp = x + (y * (z / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y / (t - a)) * (t - z)
	tmp = 0
	if y <= -6.5e+107:
		tmp = t_1
	elif y <= 8.8e-269:
		tmp = x + ((y * z) / a)
	elif y <= 1.6e-57:
		tmp = x + y
	elif y <= 115000.0:
		tmp = x + (y * (z / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y / Float64(t - a)) * Float64(t - z))
	tmp = 0.0
	if (y <= -6.5e+107)
		tmp = t_1;
	elseif (y <= 8.8e-269)
		tmp = Float64(x + Float64(Float64(y * z) / a));
	elseif (y <= 1.6e-57)
		tmp = Float64(x + y);
	elseif (y <= 115000.0)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y / (t - a)) * (t - z);
	tmp = 0.0;
	if (y <= -6.5e+107)
		tmp = t_1;
	elseif (y <= 8.8e-269)
		tmp = x + ((y * z) / a);
	elseif (y <= 1.6e-57)
		tmp = x + y;
	elseif (y <= 115000.0)
		tmp = x + (y * (z / a));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+107], t$95$1, If[LessEqual[y, 8.8e-269], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e-57], N[(x + y), $MachinePrecision], If[LessEqual[y, 115000.0], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 8.8 \cdot 10^{-269}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\

\mathbf{elif}\;y \leq 1.6 \cdot 10^{-57}:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.5000000000000006e107 or 115000 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t - a}{t - z}}} \]
    6. Simplified81.8%

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

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

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

    if -6.5000000000000006e107 < y < 8.79999999999999936e-269

    1. Initial program 98.8%

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

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

    if 8.79999999999999936e-269 < y < 1.6e-57

    1. Initial program 98.0%

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

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

    if 1.6e-57 < y < 115000

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+107}:\\ \;\;\;\;\frac{y}{t - a} \cdot \left(t - z\right)\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{-269}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{-57}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;y \leq 115000:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t - a} \cdot \left(t - z\right)\\ \end{array} \]

Alternative 5: 76.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq 1.8 \cdot 10^{-87} \lor \neg \left(t \leq 8.2 \cdot 10^{-23}\right) \land t \leq 1.26 \cdot 10^{+61}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.1999999999999998e38 or 1.79999999999999996e-87 < t < 8.20000000000000059e-23 or 1.2600000000000001e61 < t

    1. Initial program 99.9%

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

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

    if -5.1999999999999998e38 < t < 1.79999999999999996e-87 or 8.20000000000000059e-23 < t < 1.2600000000000001e61

    1. Initial program 98.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{+38}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-87} \lor \neg \left(t \leq 8.2 \cdot 10^{-23}\right) \land t \leq 1.26 \cdot 10^{+61}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 6: 76.4% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;t \leq 7.6 \cdot 10^{-23}:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.1999999999999998e38 or 1.8600000000000001e-87 < t < 7.60000000000000023e-23 or 1.9999999999999999e61 < t

    1. Initial program 99.9%

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

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

    if -5.1999999999999998e38 < t < 1.8600000000000001e-87

    1. Initial program 98.3%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} + x \]
    4. Simplified80.4%

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

    if 7.60000000000000023e-23 < t < 1.9999999999999999e61

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{+38}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 1.86 \cdot 10^{-87}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{-23}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+61}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 7: 75.8% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.35 \cdot 10^{-22}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;t \leq 1.26 \cdot 10^{+61}:\\
\;\;\;\;x - \frac{y}{\frac{a}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.00000000000000058e42 or 6.79999999999999949e-88 < t < 1.3500000000000001e-22 or 1.2600000000000001e61 < t

    1. Initial program 99.9%

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

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

    if -6.00000000000000058e42 < t < 6.79999999999999949e-88

    1. Initial program 98.3%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} + x \]
    4. Simplified80.4%

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

    if 1.3500000000000001e-22 < t < 1.2600000000000001e61

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{t}}} \]
    5. Simplified73.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{+42}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-88}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-22}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 1.26 \cdot 10^{+61}:\\ \;\;\;\;x - \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 8: 81.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+107} \lor \neg \left(y \leq 1.3 \cdot 10^{+157}\right):\\
\;\;\;\;\frac{y}{t - a} \cdot \left(t - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.50000000000000019e107 or 1.30000000000000005e157 < y

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(z - t\right) \cdot y}{\color{blue}{-\left(t - a\right)}} + x \]
      9. neg-mul-158.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 y around -inf 52.4%

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

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

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

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

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

    if -9.50000000000000019e107 < y < 1.30000000000000005e157

    1. Initial program 98.9%

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

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

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

Alternative 9: 57.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.1%

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

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

    if -4.7999999999999997e-288 < a < 4.19999999999999994e-131

    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/72.7%

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

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

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

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

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

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

        \[\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 y around -inf 64.2%

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{t - a}{t - z}}} \]
    7. Taylor expanded in a around 0 53.9%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - z\right)}{t}} \]
    8. Step-by-step derivation
      1. expm1-log1p-u33.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot \left(t - z\right)}{t}\right)\right)} \]
      2. expm1-udef24.7%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y \cdot \left(t - z\right)}{t}\right)} - 1} \]
    9. Applied egg-rr24.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y \cdot \left(t - z\right)}{t}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def33.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot \left(t - z\right)}{t}\right)\right)} \]
      2. expm1-log1p53.9%

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

        \[\leadsto \color{blue}{y \cdot \frac{t - z}{t}} \]
    11. Simplified75.5%

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

    if 4.19999999999999994e-131 < a

    1. Initial program 99.8%

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

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

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

Alternative 10: 57.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.1%

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

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

    if -4.50000000000000005e-286 < a < 7.0000000000000004e-131

    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/72.7%

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

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

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

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

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

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

        \[\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 y around -inf 64.2%

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{t - a}{t - z}}} \]
    7. Taylor expanded in a around 0 53.9%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - z\right)}{t}} \]
    8. Step-by-step derivation
      1. expm1-log1p-u33.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot \left(t - z\right)}{t}\right)\right)} \]
      2. expm1-udef24.7%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y \cdot \left(t - z\right)}{t}\right)} - 1} \]
    9. Applied egg-rr24.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y \cdot \left(t - z\right)}{t}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def33.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot \left(t - z\right)}{t}\right)\right)} \]
      2. expm1-log1p53.9%

        \[\leadsto \color{blue}{\frac{y \cdot \left(t - z\right)}{t}} \]
      3. *-commutative53.9%

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

        \[\leadsto \color{blue}{\left(t - z\right) \cdot \frac{y}{t}} \]
      5. *-commutative78.0%

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

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

    if 7.0000000000000004e-131 < a

    1. Initial program 99.8%

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

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

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

Alternative 11: 59.5% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;a \leq 1550000000:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 8.79999999999999979e-308 or 3.0000000000000002e-245 < a < 1.55e9

    1. Initial program 98.8%

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

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

    if 8.79999999999999979e-308 < a < 3.0000000000000002e-245

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t - a}{t - z}}} \]
    6. Simplified89.1%

      \[\leadsto \color{blue}{\frac{y}{\frac{t - a}{t - z}}} \]
    7. Taylor expanded in a around 0 69.6%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - z\right)}{t}} \]
    8. Step-by-step derivation
      1. expm1-log1p-u45.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot \left(t - z\right)}{t}\right)\right)} \]
      2. expm1-udef45.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y \cdot \left(t - z\right)}{t}\right)} - 1} \]
    9. Applied egg-rr45.5%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y \cdot \left(t - z\right)}{t}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def45.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot \left(t - z\right)}{t}\right)\right)} \]
      2. expm1-log1p69.6%

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

        \[\leadsto \color{blue}{y \cdot \frac{t - z}{t}} \]
    11. Simplified79.5%

      \[\leadsto \color{blue}{y \cdot \frac{t - z}{t}} \]
    12. Taylor expanded in t around 0 69.0%

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{z}{t}\right)} \]
    13. Step-by-step derivation
      1. mul-1-neg69.0%

        \[\leadsto y \cdot \color{blue}{\left(-\frac{z}{t}\right)} \]
      2. distribute-neg-frac69.0%

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

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

    if 1.55e9 < a

    1. Initial program 99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 8.8 \cdot 10^{-308}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-245}:\\ \;\;\;\;y \cdot \frac{-z}{t}\\ \mathbf{elif}\;a \leq 1550000000:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 12: 61.6% accurate, 2.2× speedup?

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

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

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


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

    1. Initial program 98.9%

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

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

    if 1.55e9 < a

    1. Initial program 99.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 1550000000:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 51.2% 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 99.1%

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification49.9%

    \[\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 2023238 
(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)))))