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

Percentage Accurate: 97.9% → 97.9%
Time: 8.3s
Alternatives: 14
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 14 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: 97.9% 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: 97.9% 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 97.7%

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

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

Alternative 2: 75.9% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;t \leq -2300:\\
\;\;\;\;t \cdot \frac{y}{t - a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.05000000000000006e97 or 5.30000000000000006e-27 < t

    1. Initial program 100.0%

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

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

    if -1.05000000000000006e97 < t < -5.2e14

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if -5.2e14 < t < -2300

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot t}{t - a}} \]
    8. Step-by-step derivation
      1. *-commutative67.9%

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

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

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

    if -2300 < t < 5.30000000000000006e-27

    1. Initial program 94.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+97}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{+14}:\\ \;\;\;\;x - \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;t \leq -2300:\\ \;\;\;\;t \cdot \frac{y}{t - a}\\ \mathbf{elif}\;t \leq 5.3 \cdot 10^{-27}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 3: 76.0% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;t \leq -3100000:\\
\;\;\;\;\frac{y}{\frac{t}{t - z}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -8.99999999999999952e97 or 4.99999999999999962e-25 < t

    1. Initial program 100.0%

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

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

    if -8.99999999999999952e97 < t < -5.2e14

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if -5.2e14 < t < -3.1e6

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{t - z}}} \]
    9. Simplified80.8%

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

    if -3.1e6 < t < 4.99999999999999962e-25

    1. Initial program 94.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{+97}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{+14}:\\ \;\;\;\;x - \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;t \leq -3100000:\\ \;\;\;\;\frac{y}{\frac{t}{t - z}}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-25}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 4: 84.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+96} \lor \neg \left(t \leq 1.9 \cdot 10^{+133}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.0000000000000001e96 or 1.9000000000000001e133 < t

    1. Initial program 100.0%

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

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

    if -6.0000000000000001e96 < t < 1.9000000000000001e133

    1. Initial program 96.6%

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

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

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

Alternative 5: 86.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+84} \lor \neg \left(z \leq 4.7 \cdot 10^{+27}\right):\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.50000000000000027e84 or 4.69999999999999976e27 < z

    1. Initial program 95.3%

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

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

    if -6.50000000000000027e84 < z < 4.69999999999999976e27

    1. Initial program 99.3%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a - t}{t}}} \]
      5. div-sub91.3%

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

        \[\leadsto x - \frac{y}{\frac{a}{t} - \color{blue}{1}} \]
    4. Simplified91.3%

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

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

Alternative 6: 76.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.19999999999999993e-17 or 2.0000000000000001e-26 < t

    1. Initial program 99.9%

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

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

    if -1.19999999999999993e-17 < t < 2.0000000000000001e-26

    1. Initial program 94.6%

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

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

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

Alternative 7: 76.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.6000000000000001e-21 or 1.85e-22 < t

    1. Initial program 99.9%

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

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

    if -1.6000000000000001e-21 < t < 1.85e-22

    1. Initial program 94.6%

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

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

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

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

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

Alternative 8: 76.0% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.2999999999999998e-22 or 1.19999999999999996e-29 < t

    1. Initial program 99.9%

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

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

    if -2.2999999999999998e-22 < t < 1.19999999999999996e-29

    1. Initial program 94.6%

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

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

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

Alternative 9: 59.9% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.8000000000000002e180

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{t - z}}} \]
    9. Simplified49.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{t - z}}} \]
      2. associate-/r/51.6%

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

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

    if -7.8000000000000002e180 < z

    1. Initial program 98.2%

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

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

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

Alternative 10: 59.3% accurate, 1.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.5999999999999999e182

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{t - z}}} \]
    9. Simplified49.8%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t}} \]
    11. Step-by-step derivation
      1. mul-1-neg43.7%

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

        \[\leadsto -\color{blue}{y \cdot \frac{z}{t}} \]
      3. distribute-lft-neg-out46.5%

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

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

    if -1.5999999999999999e182 < z

    1. Initial program 98.2%

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

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

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

Alternative 11: 59.3% accurate, 1.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.5e181

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{t - z}}} \]
    9. Simplified49.8%

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

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

        \[\leadsto \frac{y}{\color{blue}{\frac{-1 \cdot t}{z}}} \]
      2. neg-mul-146.6%

        \[\leadsto \frac{y}{\frac{\color{blue}{-t}}{z}} \]
    12. Simplified46.6%

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

    if -4.5e181 < z

    1. Initial program 98.2%

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

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

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

Alternative 12: 52.9% accurate, 2.1× speedup?

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

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

\mathbf{elif}\;x \leq 3.2 \cdot 10^{-201}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.3199999999999999e-141 or 3.2000000000000001e-201 < x

    1. Initial program 98.5%

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

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

    if -1.3199999999999999e-141 < x < 3.2000000000000001e-201

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.32 \cdot 10^{-141}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{-201}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 61.9% accurate, 2.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9 \cdot 10^{+128}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.0000000000000003e128

    1. Initial program 97.6%

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

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

    if -9.0000000000000003e128 < a

    1. Initial program 97.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{+128}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 14: 50.1% 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.7%

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

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

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