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

Percentage Accurate: 98.4% → 98.4%
Time: 7.1s
Alternatives: 10
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 10 alternatives:

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

Initial Program: 98.4% 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.4% 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 98.8%

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

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

Alternative 2: 82.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 2.8 \cdot 10^{+53}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 9.2 \cdot 10^{+174}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.85000000000000012e120 or 9.1999999999999991e174 < t

    1. Initial program 100.0%

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

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

    if -1.85000000000000012e120 < t < 2.8e53 or 1.2e95 < t < 9.1999999999999991e174

    1. Initial program 98.3%

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

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

    if 2.8e53 < t < 1.2e95

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{+120}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+53}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+95}:\\ \;\;\;\;\frac{y \cdot t}{t - a}\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+174}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 3: 75.7% accurate, 0.7× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 1.55 \cdot 10^{+150}:\\
\;\;\;\;x - z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.6000000000000002e-22 or 1.55000000000000007e150 < t

    1. Initial program 100.0%

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

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

    if -6.6000000000000002e-22 < t < 2.8e53

    1. Initial program 97.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
    6. Applied egg-rr73.1%

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

    if 2.8e53 < t < 1.2e95

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2e95 < t < 1.55000000000000007e150

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{-22}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+53}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+95}:\\ \;\;\;\;\frac{y \cdot t}{t - a}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+150}:\\ \;\;\;\;x - z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 4: 87.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-22} \lor \neg \left(t \leq 6.8 \cdot 10^{+52}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{t - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.80000000000000005e-22 or 6.8e52 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.80000000000000005e-22 < t < 6.8e52

    1. Initial program 97.7%

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

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

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

Alternative 5: 87.8% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.79999999999999996e-22

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{t - z}}} \]
    6. Simplified87.0%

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

    if -7.79999999999999996e-22 < t < 7.5999999999999999e52

    1. Initial program 97.7%

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

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

    if 7.5999999999999999e52 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

Alternative 6: 64.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-270}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 1.35 \cdot 10^{-84}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.4500000000000001e-22 or 1.35e-84 < t

    1. Initial program 99.9%

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

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

    if -1.4500000000000001e-22 < t < 2.1999999999999998e-270 or 9.0000000000000003e-240 < t < 1.35e-84

    1. Initial program 96.4%

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

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

    if 2.1999999999999998e-270 < t < 9.0000000000000003e-240

    1. Initial program 99.5%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
    9. Applied egg-rr75.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-22}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-270}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-240}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-84}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 7: 77.4% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.99999999999999968e-23 or 1.85e9 < t

    1. Initial program 100.0%

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

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

    if -7.99999999999999968e-23 < t < 1.85e9

    1. Initial program 97.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
    6. Applied egg-rr74.7%

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

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

Alternative 8: 64.6% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;t \leq 1.8 \cdot 10^{-97}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.05000000000000015e-23 or 1.79999999999999999e-97 < t

    1. Initial program 99.9%

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

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

    if -2.05000000000000015e-23 < t < 1.79999999999999999e-97

    1. Initial program 96.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.05 \cdot 10^{-23}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-97}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 9: 53.1% accurate, 3.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 4.6000000000000003e132

    1. Initial program 98.6%

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

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

    if 4.6000000000000003e132 < y

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

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

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

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

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

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

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

        \[\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 a around 0 36.1%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{t - z}}} \]
    6. Simplified64.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 4.6 \cdot 10^{+132}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 10: 51.5% 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 98.8%

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

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

    \[\leadsto x \]

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