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

Percentage Accurate: 98.0% → 98.0%
Time: 12.1s
Alternatives: 16
Speedup: 1.0×

Specification

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

\\
x + y \cdot \frac{z - t}{z - a}
\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 16 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.0% accurate, 1.0× speedup?

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

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

Alternative 1: 98.0% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right) \end{array} \]
(FPCore (x y z t a) :precision binary64 (fma y (/ (- z t) (- z a)) x))
double code(double x, double y, double z, double t, double a) {
	return fma(y, ((z - t) / (z - a)), x);
}
function code(x, y, z, t, a)
	return fma(y, Float64(Float64(z - t) / Float64(z - a)), x)
end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)
\end{array}
Derivation
  1. Initial program 97.6%

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

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

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

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

    \[\leadsto \mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right) \]

Alternative 2: 73.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{if}\;z \leq -8.2 \cdot 10^{+178}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{+61}:\\ \;\;\;\;x - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{+32}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-133}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-64}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 26500000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+16}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- z t) (/ y (- z a)))))
   (if (<= z -8.2e+178)
     (+ y x)
     (if (<= z -1.65e+61)
       (- x (/ y (/ z t)))
       (if (<= z -3.3e+32)
         (+ y x)
         (if (<= z -4.5e-133)
           t_1
           (if (<= z 2.9e-64)
             (+ x (/ y (/ a t)))
             (if (<= z 26500000.0)
               t_1
               (if (<= z 1.1e+16) (+ x (* y (/ t a))) (+ y x))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z - t) * (y / (z - a));
	double tmp;
	if (z <= -8.2e+178) {
		tmp = y + x;
	} else if (z <= -1.65e+61) {
		tmp = x - (y / (z / t));
	} else if (z <= -3.3e+32) {
		tmp = y + x;
	} else if (z <= -4.5e-133) {
		tmp = t_1;
	} else if (z <= 2.9e-64) {
		tmp = x + (y / (a / t));
	} else if (z <= 26500000.0) {
		tmp = t_1;
	} else if (z <= 1.1e+16) {
		tmp = x + (y * (t / a));
	} else {
		tmp = y + x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z - t) * (y / (z - a))
    if (z <= (-8.2d+178)) then
        tmp = y + x
    else if (z <= (-1.65d+61)) then
        tmp = x - (y / (z / t))
    else if (z <= (-3.3d+32)) then
        tmp = y + x
    else if (z <= (-4.5d-133)) then
        tmp = t_1
    else if (z <= 2.9d-64) then
        tmp = x + (y / (a / t))
    else if (z <= 26500000.0d0) then
        tmp = t_1
    else if (z <= 1.1d+16) then
        tmp = x + (y * (t / a))
    else
        tmp = y + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (z - t) * (y / (z - a));
	double tmp;
	if (z <= -8.2e+178) {
		tmp = y + x;
	} else if (z <= -1.65e+61) {
		tmp = x - (y / (z / t));
	} else if (z <= -3.3e+32) {
		tmp = y + x;
	} else if (z <= -4.5e-133) {
		tmp = t_1;
	} else if (z <= 2.9e-64) {
		tmp = x + (y / (a / t));
	} else if (z <= 26500000.0) {
		tmp = t_1;
	} else if (z <= 1.1e+16) {
		tmp = x + (y * (t / a));
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (z - t) * (y / (z - a))
	tmp = 0
	if z <= -8.2e+178:
		tmp = y + x
	elif z <= -1.65e+61:
		tmp = x - (y / (z / t))
	elif z <= -3.3e+32:
		tmp = y + x
	elif z <= -4.5e-133:
		tmp = t_1
	elif z <= 2.9e-64:
		tmp = x + (y / (a / t))
	elif z <= 26500000.0:
		tmp = t_1
	elif z <= 1.1e+16:
		tmp = x + (y * (t / a))
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z - t) * Float64(y / Float64(z - a)))
	tmp = 0.0
	if (z <= -8.2e+178)
		tmp = Float64(y + x);
	elseif (z <= -1.65e+61)
		tmp = Float64(x - Float64(y / Float64(z / t)));
	elseif (z <= -3.3e+32)
		tmp = Float64(y + x);
	elseif (z <= -4.5e-133)
		tmp = t_1;
	elseif (z <= 2.9e-64)
		tmp = Float64(x + Float64(y / Float64(a / t)));
	elseif (z <= 26500000.0)
		tmp = t_1;
	elseif (z <= 1.1e+16)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (z - t) * (y / (z - a));
	tmp = 0.0;
	if (z <= -8.2e+178)
		tmp = y + x;
	elseif (z <= -1.65e+61)
		tmp = x - (y / (z / t));
	elseif (z <= -3.3e+32)
		tmp = y + x;
	elseif (z <= -4.5e-133)
		tmp = t_1;
	elseif (z <= 2.9e-64)
		tmp = x + (y / (a / t));
	elseif (z <= 26500000.0)
		tmp = t_1;
	elseif (z <= 1.1e+16)
		tmp = x + (y * (t / a));
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.2e+178], N[(y + x), $MachinePrecision], If[LessEqual[z, -1.65e+61], N[(x - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.3e+32], N[(y + x), $MachinePrecision], If[LessEqual[z, -4.5e-133], t$95$1, If[LessEqual[z, 2.9e-64], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 26500000.0], t$95$1, If[LessEqual[z, 1.1e+16], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -3.3 \cdot 10^{+32}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;z \leq -4.5 \cdot 10^{-133}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 26500000:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -8.19999999999999993e178 or -1.6499999999999999e61 < z < -3.3000000000000002e32 or 1.1e16 < z

    1. Initial program 100.0%

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

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

    if -8.19999999999999993e178 < z < -1.6499999999999999e61

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -3.3000000000000002e32 < z < -4.50000000000000009e-133 or 2.8999999999999999e-64 < z < 2.65e7

    1. Initial program 92.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{z - a}, x\right)} \]
    4. Step-by-step derivation
      1. clear-num97.4%

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{z - a} \cdot y}, x\right) \]
    5. Applied egg-rr97.6%

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

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

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

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

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

    if -4.50000000000000009e-133 < z < 2.8999999999999999e-64

    1. Initial program 96.9%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    4. Simplified85.5%

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

    if 2.65e7 < z < 1.1e16

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{+178}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{+61}:\\ \;\;\;\;x - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{+32}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-133}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-64}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 26500000:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+16}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 3: 76.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.28 \cdot 10^{+166}:\\
\;\;\;\;y + x\\

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

\mathbf{elif}\;z \leq -6 \cdot 10^{+42}:\\
\;\;\;\;y + x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.28e166 or -3.69999999999999998e68 < z < -6.00000000000000058e42 or 4.2e16 < z

    1. Initial program 100.0%

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

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

    if -1.28e166 < z < -3.69999999999999998e68

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - \frac{y \cdot t}{z - a}} \]
    8. Taylor expanded in z around inf 65.1%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{t}{z}} \]
    10. Simplified81.9%

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

    if -6.00000000000000058e42 < z < 4.2e16

    1. Initial program 95.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    4. Simplified74.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.28 \cdot 10^{+166}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{+68}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -6 \cdot 10^{+42}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+16}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 4: 76.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+169}:\\
\;\;\;\;y + x\\

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

\mathbf{elif}\;z \leq -2.3 \cdot 10^{+44}:\\
\;\;\;\;y + x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.85e169 or -1.7e60 < z < -2.30000000000000004e44 or 4.1e16 < z

    1. Initial program 100.0%

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

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

    if -1.85e169 < z < -1.7e60

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000004e44 < z < 4.1e16

    1. Initial program 95.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    4. Simplified74.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+169}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{+60}:\\ \;\;\;\;x - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+44}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+16}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 5: 80.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{if}\;z \leq -1.5 \cdot 10^{-31}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-133}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-43}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (- 1.0 (/ t z))))))
   (if (<= z -1.5e-31)
     t_1
     (if (<= z -3.8e-133)
       (* (- z t) (/ y (- z a)))
       (if (<= z 1.65e-43) (+ x (/ y (/ a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (1.0 - (t / z)));
	double tmp;
	if (z <= -1.5e-31) {
		tmp = t_1;
	} else if (z <= -3.8e-133) {
		tmp = (z - t) * (y / (z - a));
	} else if (z <= 1.65e-43) {
		tmp = x + (y / (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 * (1.0d0 - (t / z)))
    if (z <= (-1.5d-31)) then
        tmp = t_1
    else if (z <= (-3.8d-133)) then
        tmp = (z - t) * (y / (z - a))
    else if (z <= 1.65d-43) then
        tmp = x + (y / (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 * (1.0 - (t / z)));
	double tmp;
	if (z <= -1.5e-31) {
		tmp = t_1;
	} else if (z <= -3.8e-133) {
		tmp = (z - t) * (y / (z - a));
	} else if (z <= 1.65e-43) {
		tmp = x + (y / (a / t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (1.0 - (t / z)))
	tmp = 0
	if z <= -1.5e-31:
		tmp = t_1
	elif z <= -3.8e-133:
		tmp = (z - t) * (y / (z - a))
	elif z <= 1.65e-43:
		tmp = x + (y / (a / t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z))))
	tmp = 0.0
	if (z <= -1.5e-31)
		tmp = t_1;
	elseif (z <= -3.8e-133)
		tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a)));
	elseif (z <= 1.65e-43)
		tmp = Float64(x + Float64(y / Float64(a / t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * (1.0 - (t / z)));
	tmp = 0.0;
	if (z <= -1.5e-31)
		tmp = t_1;
	elseif (z <= -3.8e-133)
		tmp = (z - t) * (y / (z - a));
	elseif (z <= 1.65e-43)
		tmp = x + (y / (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[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e-31], t$95$1, If[LessEqual[z, -3.8e-133], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-43], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{-31}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.49999999999999991e-31 or 1.65000000000000008e-43 < z

    1. Initial program 99.9%

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

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

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

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

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

    if -1.49999999999999991e-31 < z < -3.8000000000000003e-133

    1. Initial program 84.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{z - a}, x\right)} \]
    4. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

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

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

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

    if -3.8000000000000003e-133 < z < 1.65000000000000008e-43

    1. Initial program 96.9%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    4. Simplified85.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{-31}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-133}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-43}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \end{array} \]

Alternative 6: 80.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-30}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.9999999999999999e-30

    1. Initial program 99.9%

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

      \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z}} \]
    3. Step-by-step derivation
      1. div-sub84.3%

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

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

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

    if -2.9999999999999999e-30 < z < -4.5000000000000005e-134

    1. Initial program 84.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{z - a}, x\right)} \]
    4. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

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

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

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

    if -4.5000000000000005e-134 < z < 1.25000000000000005e-43

    1. Initial program 96.9%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    4. Simplified85.0%

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

    if 1.25000000000000005e-43 < z

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    4. Simplified84.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{-30}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-134}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-43}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \end{array} \]

Alternative 7: 86.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-47}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.5000000000000002e-47

    1. Initial program 99.9%

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

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

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

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

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

    if -5.5000000000000002e-47 < z < 7.5e16

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.5e16 < z

    1. Initial program 100.0%

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

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

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

Alternative 8: 87.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+45}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.34999999999999992e45

    1. Initial program 99.9%

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

      \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z}} \]
    3. Step-by-step derivation
      1. div-sub87.7%

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

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

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

    if -1.34999999999999992e45 < z < 9.8e16

    1. Initial program 95.8%

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

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

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

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

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

    if 9.8e16 < z

    1. Initial program 100.0%

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

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

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

Alternative 9: 77.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+39} \lor \neg \left(z \leq 3.2 \cdot 10^{+16}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.99999999999999988e39 or 3.2e16 < z

    1. Initial program 99.9%

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

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

    if -1.99999999999999988e39 < z < 3.2e16

    1. Initial program 95.8%

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

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

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

Alternative 10: 77.5% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.60000000000000001e42 or 5.5e16 < z

    1. Initial program 99.9%

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

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

    if -1.60000000000000001e42 < z < 5.5e16

    1. Initial program 95.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    4. Simplified74.8%

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

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

Alternative 11: 98.0% accurate, 1.0× speedup?

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

\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Derivation
  1. Initial program 97.6%

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

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

Alternative 12: 61.3% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.45 \cdot 10^{+216} \lor \neg \left(t \leq 7 \cdot 10^{+200}\right):\\
\;\;\;\;y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.45000000000000007e216 or 7.00000000000000013e200 < t

    1. Initial program 91.2%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    6. Step-by-step derivation
      1. clear-num56.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a}{t}}{y}}} \]
      2. inv-pow56.0%

        \[\leadsto \color{blue}{{\left(\frac{\frac{a}{t}}{y}\right)}^{-1}} \]
    7. Applied egg-rr56.0%

      \[\leadsto \color{blue}{{\left(\frac{\frac{a}{t}}{y}\right)}^{-1}} \]
    8. Step-by-step derivation
      1. unpow-156.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a}{t}}{y}}} \]
      2. associate-/l/47.6%

        \[\leadsto \frac{1}{\color{blue}{\frac{a}{y \cdot t}}} \]
    9. Simplified47.6%

      \[\leadsto \color{blue}{\frac{1}{\frac{a}{y \cdot t}}} \]
    10. Taylor expanded in a around 0 47.5%

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
    12. Simplified56.1%

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

    if -2.45000000000000007e216 < t < 7.00000000000000013e200

    1. Initial program 99.0%

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

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

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

Alternative 13: 61.3% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.4 \cdot 10^{+215}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\

\mathbf{elif}\;t \leq 1.38 \cdot 10^{+200}:\\
\;\;\;\;y + x\\

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


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

    1. Initial program 85.7%

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

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

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

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

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

    if -6.3999999999999997e215 < t < 1.38000000000000005e200

    1. Initial program 99.0%

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

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

    if 1.38000000000000005e200 < t

    1. Initial program 99.9%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    6. Step-by-step derivation
      1. clear-num61.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a}{t}}{y}}} \]
      2. inv-pow61.0%

        \[\leadsto \color{blue}{{\left(\frac{\frac{a}{t}}{y}\right)}^{-1}} \]
    7. Applied egg-rr61.0%

      \[\leadsto \color{blue}{{\left(\frac{\frac{a}{t}}{y}\right)}^{-1}} \]
    8. Step-by-step derivation
      1. unpow-161.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a}{t}}{y}}} \]
      2. associate-/l/55.5%

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

      \[\leadsto \color{blue}{\frac{1}{\frac{a}{y \cdot t}}} \]
    10. Taylor expanded in a around 0 55.6%

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
    12. Simplified61.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.4 \cdot 10^{+215}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;t \leq 1.38 \cdot 10^{+200}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \end{array} \]

Alternative 14: 60.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq 1.45 \cdot 10^{+201}:\\
\;\;\;\;y + x\\

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


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

    1. Initial program 88.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{z - a}, x\right)} \]
    4. Step-by-step derivation
      1. clear-num91.3%

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{\frac{1}{z - a} \cdot y}, x\right) \]
    5. Applied egg-rr91.4%

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

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

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

        \[\leadsto \frac{\color{blue}{-y \cdot t}}{z - a} \]
      3. distribute-rgt-neg-in53.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{z} \cdot t} \]
      3. distribute-rgt-neg-in49.4%

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

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

    if -1.15000000000000007e193 < t < 1.4500000000000001e201

    1. Initial program 99.0%

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

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

    if 1.4500000000000001e201 < t

    1. Initial program 99.9%

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    6. Step-by-step derivation
      1. clear-num61.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a}{t}}{y}}} \]
      2. inv-pow61.0%

        \[\leadsto \color{blue}{{\left(\frac{\frac{a}{t}}{y}\right)}^{-1}} \]
    7. Applied egg-rr61.0%

      \[\leadsto \color{blue}{{\left(\frac{\frac{a}{t}}{y}\right)}^{-1}} \]
    8. Step-by-step derivation
      1. unpow-161.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a}{t}}{y}}} \]
      2. associate-/l/55.5%

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

      \[\leadsto \color{blue}{\frac{1}{\frac{a}{y \cdot t}}} \]
    10. Taylor expanded in a around 0 55.6%

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
    12. Simplified61.2%

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

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

Alternative 15: 60.9% accurate, 3.7× speedup?

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

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

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

    \[\leadsto \color{blue}{y + x} \]
  3. Final simplification56.0%

    \[\leadsto y + x \]

Alternative 16: 50.7% accurate, 11.0× speedup?

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

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

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification47.1%

    \[\leadsto x \]

Developer target: 98.2% accurate, 1.0× speedup?

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

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

Reproduce

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

  :herbie-target
  (+ x (/ y (/ (- z a) (- z t))))

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