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

Percentage Accurate: 77.0% → 90.1%
Time: 11.9s
Alternatives: 13
Speedup: 0.7×

Specification

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

\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 77.0% accurate, 1.0× speedup?

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

\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}

Alternative 1: 90.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -2e-224

    1. Initial program 82.9%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num82.9%

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

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

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

        \[\leadsto \left(x + y\right) - {\color{blue}{\left(\frac{\frac{a - t}{y}}{z - t}\right)}}^{-1} \]
    4. Applied egg-rr90.1%

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

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

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

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

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

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

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

    if -2e-224 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0

    1. Initial program 8.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 99.9%

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{y \cdot a} - y \cdot z}{t} \]
      7. distribute-lft-out--99.9%

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

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

    if 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 81.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-inv81.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t} \leq -2 \cdot 10^{-224}:\\ \;\;\;\;\left(x + y\right) + \frac{z - t}{\frac{t - a}{y}}\\ \mathbf{elif}\;\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t} \leq 0:\\ \;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) - y \cdot \left(\left(z - t\right) \cdot \frac{-1}{t - a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 90.6% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -2e-224 or 2e303 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 72.1%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 72.1%

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

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

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

    if -2e-224 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0

    1. Initial program 8.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 99.9%

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{y \cdot a} - y \cdot z}{t} \]
      7. distribute-lft-out--99.9%

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

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

    if 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 2e303

    1. Initial program 96.9%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
  3. Recombined 3 regimes into one program.
  4. Final simplification92.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t} \leq -2 \cdot 10^{-224}:\\ \;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\ \mathbf{elif}\;\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t} \leq 0:\\ \;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t} \leq 2 \cdot 10^{+303}:\\ \;\;\;\;\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 89.7% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-224} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\left(x + y\right) + \frac{z - t}{\frac{t - a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -2e-224 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 82.1%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num82.0%

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

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

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

        \[\leadsto \left(x + y\right) - {\color{blue}{\left(\frac{\frac{a - t}{y}}{z - t}\right)}}^{-1} \]
    4. Applied egg-rr90.2%

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

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

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

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

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

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

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

    if -2e-224 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0

    1. Initial program 8.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 99.9%

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{y \cdot a} - y \cdot z}{t} \]
      7. distribute-lft-out--99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t} \leq -2 \cdot 10^{-224} \lor \neg \left(\left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t} \leq 0\right):\\ \;\;\;\;\left(x + y\right) + \frac{z - t}{\frac{t - a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 62.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq 9.5 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 3.1 \cdot 10^{-213}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 5 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.3e-195 or 4.9999999999999997e-113 < a

    1. Initial program 79.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 71.3%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative71.3%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified71.3%

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

    if -6.3e-195 < a < 9.50000000000000103e-271 or 3.0999999999999998e-213 < a < 4.9999999999999997e-113

    1. Initial program 66.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg66.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg75.4%

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

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

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

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

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

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

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

    if 9.50000000000000103e-271 < a < 3.0999999999999998e-213

    1. Initial program 66.0%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 70.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.3 \cdot 10^{-195}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-271}:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-213}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-113}:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 62.1% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;a \leq 8.5 \cdot 10^{-213}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.79999999999999991e-177 or 5.50000000000000053e-113 < a

    1. Initial program 79.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 71.3%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative71.3%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified71.3%

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

    if -1.79999999999999991e-177 < a < 8.6e-271

    1. Initial program 65.9%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.6e-271 < a < 8.49999999999999994e-213

    1. Initial program 66.0%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 70.3%

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

    if 8.49999999999999994e-213 < a < 5.50000000000000053e-113

    1. Initial program 67.5%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg67.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg75.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{-177}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{-271}:\\ \;\;\;\;y \cdot \frac{z}{t - a}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-213}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-113}:\\ \;\;\;\;y \cdot \frac{z - a}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 61.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{t}\\ \mathbf{if}\;a \leq -5 \cdot 10^{-187}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-271}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-212}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{-113}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ z t))))
   (if (<= a -5e-187)
     (+ x y)
     (if (<= a 7e-271)
       t_1
       (if (<= a 6e-212) x (if (<= a 4.9e-113) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / t);
	double tmp;
	if (a <= -5e-187) {
		tmp = x + y;
	} else if (a <= 7e-271) {
		tmp = t_1;
	} else if (a <= 6e-212) {
		tmp = x;
	} else if (a <= 4.9e-113) {
		tmp = t_1;
	} else {
		tmp = x + y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (z / t)
    if (a <= (-5d-187)) then
        tmp = x + y
    else if (a <= 7d-271) then
        tmp = t_1
    else if (a <= 6d-212) then
        tmp = x
    else if (a <= 4.9d-113) then
        tmp = t_1
    else
        tmp = x + y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / t);
	double tmp;
	if (a <= -5e-187) {
		tmp = x + y;
	} else if (a <= 7e-271) {
		tmp = t_1;
	} else if (a <= 6e-212) {
		tmp = x;
	} else if (a <= 4.9e-113) {
		tmp = t_1;
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z / t)
	tmp = 0
	if a <= -5e-187:
		tmp = x + y
	elif a <= 7e-271:
		tmp = t_1
	elif a <= 6e-212:
		tmp = x
	elif a <= 4.9e-113:
		tmp = t_1
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z / t))
	tmp = 0.0
	if (a <= -5e-187)
		tmp = Float64(x + y);
	elseif (a <= 7e-271)
		tmp = t_1;
	elseif (a <= 6e-212)
		tmp = x;
	elseif (a <= 4.9e-113)
		tmp = t_1;
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z / t);
	tmp = 0.0;
	if (a <= -5e-187)
		tmp = x + y;
	elseif (a <= 7e-271)
		tmp = t_1;
	elseif (a <= 6e-212)
		tmp = x;
	elseif (a <= 4.9e-113)
		tmp = t_1;
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5e-187], N[(x + y), $MachinePrecision], If[LessEqual[a, 7e-271], t$95$1, If[LessEqual[a, 6e-212], x, If[LessEqual[a, 4.9e-113], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 7 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 6 \cdot 10^{-212}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 4.9 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.9999999999999996e-187 or 4.9000000000000003e-113 < a

    1. Initial program 79.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 71.3%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative71.3%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified71.3%

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

    if -4.9999999999999996e-187 < a < 6.9999999999999999e-271 or 6.0000000000000005e-212 < a < 4.9000000000000003e-113

    1. Initial program 66.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg66.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg75.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    8. Simplified63.6%

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

    if 6.9999999999999999e-271 < a < 6.0000000000000005e-212

    1. Initial program 66.0%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 70.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5 \cdot 10^{-187}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-271}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-212}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{-113}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 86.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{-69} \lor \neg \left(a \leq 7.2 \cdot 10^{-124}\right):\\
\;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.3000000000000001e-69 or 7.20000000000000019e-124 < a

    1. Initial program 80.4%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 80.4%

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

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

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

    if -2.3000000000000001e-69 < a < 7.20000000000000019e-124

    1. Initial program 67.5%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 82.1%

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{y \cdot a} - y \cdot z}{t} \]
      7. distribute-lft-out--83.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{-69} \lor \neg \left(a \leq 7.2 \cdot 10^{-124}\right):\\ \;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 77.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{-56} \lor \neg \left(a \leq 1.75 \cdot 10^{+48}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.79999999999999989e-56 or 1.7499999999999999e48 < a

    1. Initial program 79.8%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 81.4%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative81.4%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified81.4%

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

    if -1.79999999999999989e-56 < a < 1.7499999999999999e48

    1. Initial program 72.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 76.1%

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{y \cdot a} - y \cdot z}{t} \]
      7. distribute-lft-out--77.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{-56} \lor \neg \left(a \leq 1.75 \cdot 10^{+48}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 83.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.56 \cdot 10^{-65} \lor \neg \left(a \leq 1.35 \cdot 10^{-65}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.55999999999999993e-65 or 1.3499999999999999e-65 < a

    1. Initial program 79.2%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 78.4%

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

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

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

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

    if -1.55999999999999993e-65 < a < 1.3499999999999999e-65

    1. Initial program 71.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 80.3%

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{y \cdot a} - y \cdot z}{t} \]
      7. distribute-lft-out--82.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.56 \cdot 10^{-65} \lor \neg \left(a \leq 1.35 \cdot 10^{-65}\right):\\ \;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 75.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{-55} \lor \neg \left(a \leq 3.65 \cdot 10^{-65}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.2e-55 or 3.6499999999999999e-65 < a

    1. Initial program 79.0%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 77.7%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative77.7%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified77.7%

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

    if -2.2e-55 < a < 3.6499999999999999e-65

    1. Initial program 71.6%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Step-by-step derivation
      1. sub-neg71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{-55} \lor \neg \left(a \leq 3.65 \cdot 10^{-65}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 63.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{-5} \lor \neg \left(a \leq 1.8 \cdot 10^{-199}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.4e-5 or 1.8000000000000001e-199 < a

    1. Initial program 79.0%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 71.5%

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative71.5%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified71.5%

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

    if -3.4e-5 < a < 1.8000000000000001e-199

    1. Initial program 69.3%

      \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 43.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{-5} \lor \neg \left(a \leq 1.8 \cdot 10^{-199}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 2.7% accurate, 13.0× speedup?

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

\\
0
\end{array}
Derivation
  1. Initial program 75.7%

    \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in x around 0 36.8%

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

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

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

    \[\leadsto \color{blue}{y - -1 \cdot \frac{t \cdot y}{a - t}} \]
  7. Step-by-step derivation
    1. sub-neg17.6%

      \[\leadsto \color{blue}{y + \left(--1 \cdot \frac{t \cdot y}{a - t}\right)} \]
    2. mul-1-neg17.6%

      \[\leadsto y + \left(-\color{blue}{\left(-\frac{t \cdot y}{a - t}\right)}\right) \]
    3. remove-double-neg17.6%

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

      \[\leadsto y + \color{blue}{t \cdot \frac{y}{a - t}} \]
  8. Simplified20.3%

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

    \[\leadsto \color{blue}{y + -1 \cdot y} \]
  10. Step-by-step derivation
    1. distribute-rgt1-in2.7%

      \[\leadsto \color{blue}{\left(-1 + 1\right) \cdot y} \]
    2. metadata-eval2.7%

      \[\leadsto \color{blue}{0} \cdot y \]
    3. mul0-lft2.7%

      \[\leadsto \color{blue}{0} \]
  11. Simplified2.7%

    \[\leadsto \color{blue}{0} \]
  12. Final simplification2.7%

    \[\leadsto 0 \]
  13. Add Preprocessing

Alternative 13: 50.9% accurate, 13.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 75.7%

    \[\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf 47.9%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification47.9%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 88.3% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

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

  :alt
  (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))

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