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

Percentage Accurate: 76.5% → 92.8%
Time: 10.2s
Alternatives: 13
Speedup: 1.0×

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: 76.5% 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: 92.8% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{-271}:\\ \;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ (+ x y) (/ (* y (- t z)) (- a t)))))
   (if (<= t_1 -4e-271)
     (+ x (+ y (/ (- t z) (/ (- a t) y))))
     (if (<= t_1 0.0)
       (+ x (* y (- (/ z t) (/ a t))))
       (+ x (fma (/ (- t z) (- a t)) y y))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (x + y) + ((y * (t - z)) / (a - t));
	double tmp;
	if (t_1 <= -4e-271) {
		tmp = x + (y + ((t - z) / ((a - t) / y)));
	} else if (t_1 <= 0.0) {
		tmp = x + (y * ((z / t) - (a / t)));
	} else {
		tmp = x + fma(((t - z) / (a - t)), y, y);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(x + y) + Float64(Float64(y * Float64(t - z)) / Float64(a - t)))
	tmp = 0.0
	if (t_1 <= -4e-271)
		tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y))));
	elseif (t_1 <= 0.0)
		tmp = Float64(x + Float64(y * Float64(Float64(z / t) - Float64(a / t))));
	else
		tmp = Float64(x + fma(Float64(Float64(t - z) / Float64(a - t)), y, y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e-271], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(x + N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

\mathbf{else}:\\
\;\;\;\;x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\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))) < -3.99999999999999985e-271

    1. Initial program 84.5%

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

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

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

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

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

    1. Initial program 4.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 83.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification95.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t} \leq -4 \cdot 10^{-271}:\\ \;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\ \mathbf{elif}\;\left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t} \leq 0:\\ \;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)\\ \end{array} \]

Alternative 2: 92.0% accurate, 0.3× speedup?

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

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

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


\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))) < -3.99999999999999985e-271 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 84.1%

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

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

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

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

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

    1. Initial program 4.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 85.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{-56} \lor \neg \left(a \leq 8.6 \cdot 10^{-63}\right):\\
\;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.9999999999999996e-56 or 8.5999999999999997e-63 < a

    1. Initial program 78.9%

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

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

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

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

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

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

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

    if -6.9999999999999996e-56 < a < 8.5999999999999997e-63

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 89.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+90} \lor \neg \left(t \leq 3.1 \cdot 10^{+106}\right):\\
\;\;\;\;x + y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.09999999999999981e90 or 3.0999999999999999e106 < t

    1. Initial program 55.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.09999999999999981e90 < t < 3.0999999999999999e106

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

Alternative 5: 75.1% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;a \leq 52:\\
\;\;\;\;y - \frac{z}{\frac{a}{y}}\\

\mathbf{elif}\;a \leq 9 \cdot 10^{+107}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.3499999999999999e57 or 9e107 < a

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3499999999999999e57 < a < 1.48e-37

    1. Initial program 78.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t}{z}}} + x \]
    10. Simplified79.0%

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

    if 1.48e-37 < a < 52

    1. Initial program 99.6%

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

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

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

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

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

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{a}} \]
      2. *-commutative78.4%

        \[\leadsto y - \color{blue}{\frac{z}{a} \cdot y} \]
      3. associate-/r/78.6%

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

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

    if 52 < a < 9e107

    1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{+57}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 1.48 \cdot 10^{-37}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 52:\\ \;\;\;\;y - \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+107}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 6: 76.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq 1.48 \cdot 10^{-37}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\

\mathbf{elif}\;a \leq 52:\\
\;\;\;\;y - \frac{z}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.3499999999999999e57 or 52 < a

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3499999999999999e57 < a < 1.48e-37

    1. Initial program 78.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.48e-37 < a < 52

    1. Initial program 99.6%

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

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

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

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

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

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{a}} \]
      2. *-commutative78.4%

        \[\leadsto y - \color{blue}{\frac{z}{a} \cdot y} \]
      3. associate-/r/78.6%

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

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

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

Alternative 7: 82.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.12 \cdot 10^{-30} \lor \neg \left(a \leq 1.14 \cdot 10^{-57}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.12e-30 or 1.14000000000000006e-57 < a

    1. Initial program 79.2%

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

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

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

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

    if -1.12e-30 < a < 1.14000000000000006e-57

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 76.2% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.19999999999999991e60 or 1.1000000000000001e108 < a

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.19999999999999991e60 < a < 1.1000000000000001e108

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 60.2% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+259}:\\
\;\;\;\;y \cdot \frac{-z}{a}\\

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


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

    1. Initial program 87.6%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg63.4%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-z}{a}} \]
    7. Simplified57.5%

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

    if -1.8000000000000001e259 < z

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 60.3% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+255}:\\
\;\;\;\;z \cdot \frac{-y}{a}\\

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


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

    1. Initial program 87.6%

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

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

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

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

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

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

      \[\leadsto \left(x + y\right) - \frac{1}{\frac{\color{blue}{\frac{a}{y}}}{z - t}} \]
    7. Taylor expanded in z around inf 63.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
    8. Step-by-step derivation
      1. mul-1-neg63.4%

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

        \[\leadsto -\color{blue}{\frac{y}{a} \cdot z} \]
      3. *-commutative69.2%

        \[\leadsto -\color{blue}{z \cdot \frac{y}{a}} \]
      4. distribute-rgt-neg-in69.2%

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

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

    if -5.4999999999999998e255 < z

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 52.8% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+211}:\\
\;\;\;\;y\\

\mathbf{elif}\;y \leq 3.4 \cdot 10^{+119}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.02e211 or 3.40000000000000013e119 < y

    1. Initial program 56.3%

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

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

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

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

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

        \[\leadsto y - \color{blue}{y \cdot \frac{z}{a}} \]
      2. *-commutative63.1%

        \[\leadsto y - \color{blue}{\frac{z}{a} \cdot y} \]
      3. associate-/r/62.3%

        \[\leadsto y - \color{blue}{\frac{z}{\frac{a}{y}}} \]
    7. Simplified62.3%

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

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

    if -1.02e211 < y < 3.40000000000000013e119

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.02 \cdot 10^{+211}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{+119}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 12: 60.1% accurate, 4.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x + y \]

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 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification53.9%

    \[\leadsto x \]

Developer target: 87.6% 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 2023257 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
  :precision binary64

  :herbie-target
  (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))))