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

Percentage Accurate: 85.1% → 96.0%
Time: 12.6s
Alternatives: 13
Speedup: 1.0×

Specification

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

\\
x + \frac{y \cdot \left(z - t\right)}{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: 85.1% accurate, 1.0× speedup?

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

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

Alternative 1: 96.0% accurate, 1.0× speedup?

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
  3. Simplified98.2%

    \[\leadsto \color{blue}{x + \frac{z - t}{\frac{a - t}{y}}} \]
  4. Final simplification98.2%

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

Alternative 2: 94.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(z - t\right) \cdot y}{a - t}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\ \mathbf{elif}\;t_1 \leq 10^{+298}:\\ \;\;\;\;x + t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* (- z t) y) (- a t))))
   (if (<= t_1 (- INFINITY))
     (- x (/ y (/ t (- z t))))
     (if (<= t_1 1e+298) (+ x t_1) (* y (/ (- z t) (- a t)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = ((z - t) * y) / (a - t);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = x - (y / (t / (z - t)));
	} else if (t_1 <= 1e+298) {
		tmp = x + t_1;
	} else {
		tmp = y * ((z - t) / (a - t));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = ((z - t) * y) / (a - t);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = x - (y / (t / (z - t)));
	} else if (t_1 <= 1e+298) {
		tmp = x + t_1;
	} else {
		tmp = y * ((z - t) / (a - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = ((z - t) * y) / (a - t)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = x - (y / (t / (z - t)))
	elif t_1 <= 1e+298:
		tmp = x + t_1
	else:
		tmp = y * ((z - t) / (a - t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(Float64(z - t) * y) / Float64(a - t))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(x - Float64(y / Float64(t / Float64(z - t))));
	elseif (t_1 <= 1e+298)
		tmp = Float64(x + t_1);
	else
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = ((z - t) * y) / (a - t);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = x - (y / (t / (z - t)));
	elseif (t_1 <= 1e+298)
		tmp = x + t_1;
	else
		tmp = y * ((z - t) / (a - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x - N[(y / N[(t / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+298], N[(x + t$95$1), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_1 \leq 10^{+298}:\\
\;\;\;\;x + t_1\\

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


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

    1. Initial program 33.6%

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

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

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

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

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

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

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < 9.9999999999999996e297

    1. Initial program 99.8%

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

    if 9.9999999999999996e297 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t))

    1. Initial program 24.3%

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

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

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

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

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

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

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

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

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

Alternative 3: 77.2% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;t \leq -8.2 \cdot 10^{-50}:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.6e22 or -4.5999999999999999e-27 < t < -8.19999999999999971e-50 or 6.49999999999999971e29 < t

    1. Initial program 74.9%

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

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

    if -2.6e22 < t < -4.5999999999999999e-27

    1. Initial program 100.0%

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y}}} + x \]
      3. associate-/r/96.2%

        \[\leadsto \color{blue}{\frac{z}{a} \cdot y} + x \]
    4. Applied egg-rr96.2%

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

    if -8.19999999999999971e-50 < t < 6.49999999999999971e29

    1. Initial program 95.2%

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y}}} + x \]
      3. add-cube-cbrt84.4%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}}{\frac{a}{y}} + x \]
      4. *-un-lft-identity84.4%

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

        \[\leadsto \color{blue}{\frac{\sqrt[3]{z} \cdot \sqrt[3]{z}}{1} \cdot \frac{\sqrt[3]{z}}{\frac{a}{y}}} + x \]
      6. pow284.4%

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

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{z}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{z}}{\frac{a}{y}}} + x \]
    5. Step-by-step derivation
      1. /-rgt-identity84.4%

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

        \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{z}\right)}^{2} \cdot \sqrt[3]{z}}{\frac{a}{y}}} + x \]
      3. unpow284.4%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right)} \cdot \sqrt[3]{z}}{\frac{a}{y}} + x \]
      4. rem-3cbrt-lft84.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+22}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-27}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-50}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{+29}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 4: 77.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -2.3 \cdot 10^{-39}:\\
\;\;\;\;x - z \cdot \frac{y}{t}\\

\mathbf{elif}\;t \leq -3.5 \cdot 10^{-49}:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.5e94 or -2.30000000000000008e-39 < t < -3.50000000000000006e-49 or 4.6000000000000002e29 < t

    1. Initial program 68.5%

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

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

    if -1.5e94 < t < -2.30000000000000008e-39

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{y \cdot z}{t}} \]
      4. *-commutative70.0%

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

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

      \[\leadsto \color{blue}{x - \frac{z}{\frac{t}{y}}} \]
    8. Step-by-step derivation
      1. clear-num69.9%

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

        \[\leadsto x - \color{blue}{\frac{1}{\frac{t}{y}} \cdot z} \]
      3. clear-num70.0%

        \[\leadsto x - \color{blue}{\frac{y}{t}} \cdot z \]
    9. Applied egg-rr70.0%

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

    if -3.50000000000000006e-49 < t < 4.6000000000000002e29

    1. Initial program 95.2%

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y}}} + x \]
      3. add-cube-cbrt84.4%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}}{\frac{a}{y}} + x \]
      4. *-un-lft-identity84.4%

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

        \[\leadsto \color{blue}{\frac{\sqrt[3]{z} \cdot \sqrt[3]{z}}{1} \cdot \frac{\sqrt[3]{z}}{\frac{a}{y}}} + x \]
      6. pow284.4%

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

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{z}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{z}}{\frac{a}{y}}} + x \]
    5. Step-by-step derivation
      1. /-rgt-identity84.4%

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

        \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{z}\right)}^{2} \cdot \sqrt[3]{z}}{\frac{a}{y}}} + x \]
      3. unpow284.4%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right)} \cdot \sqrt[3]{z}}{\frac{a}{y}} + x \]
      4. rem-3cbrt-lft84.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+94}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{-39}:\\ \;\;\;\;x - z \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-49}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+29}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 5: 62.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq 3.4 \cdot 10^{-190}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 7.2 \cdot 10^{+22}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.4999999999999994e-84 or 7.2e22 < t

    1. Initial program 78.2%

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

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

    if -8.4999999999999994e-84 < t < 3.39999999999999981e-190 or 4.00000000000000024e-122 < t < 7.2e22

    1. Initial program 96.3%

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

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

    if 3.39999999999999981e-190 < t < 4.00000000000000024e-122

    1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.5 \cdot 10^{-84}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-190}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-122}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+22}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 6: 84.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+94} \lor \neg \left(t \leq 8 \cdot 10^{+30}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.79999999999999996e94 or 8.0000000000000002e30 < t

    1. Initial program 66.4%

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

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

    if -1.79999999999999996e94 < t < 8.0000000000000002e30

    1. Initial program 96.4%

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

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

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

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

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

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

Alternative 7: 88.5% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.6e20 or 185 < z

    1. Initial program 82.4%

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

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

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

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

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

    if -2.6e20 < z < 185

    1. Initial program 88.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - t}{z - t}}} + x \]
      4. div-inv99.3%

        \[\leadsto \color{blue}{y \cdot \frac{1}{\frac{a - t}{z - t}}} + x \]
      5. clear-num99.3%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} + x \]
    5. Applied egg-rr99.3%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a - t}{t}}} \]
    8. Simplified91.2%

      \[\leadsto \color{blue}{x - \frac{y}{\frac{a - t}{t}}} \]
    9. Taylor expanded in a around 0 91.2%

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

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

Alternative 8: 62.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 7.8 \cdot 10^{-191}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 1.7 \cdot 10^{+23}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.7e-84 or 1.69999999999999996e23 < t

    1. Initial program 78.2%

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

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

    if -6.7e-84 < t < 7.7999999999999999e-191 or 4.00000000000000024e-122 < t < 1.69999999999999996e23

    1. Initial program 96.3%

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

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

    if 7.7999999999999999e-191 < t < 4.00000000000000024e-122

    1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.7 \cdot 10^{-84}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-191}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-122}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 9: 77.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+25} \lor \neg \left(t \leq 3.8 \cdot 10^{+30}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.80000000000000008e25 or 3.8000000000000001e30 < t

    1. Initial program 73.1%

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

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

    if -1.80000000000000008e25 < t < 3.8000000000000001e30

    1. Initial program 95.9%

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y}}} + x \]
      3. associate-/r/81.4%

        \[\leadsto \color{blue}{\frac{z}{a} \cdot y} + x \]
    4. Applied egg-rr81.4%

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

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

Alternative 10: 77.6% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.5e21 or 1.6999999999999999e31 < t

    1. Initial program 73.1%

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

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

    if -4.5e21 < t < 1.6999999999999999e31

    1. Initial program 95.9%

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

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

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

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

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

Alternative 11: 63.4% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;t \leq 2.9 \cdot 10^{+23}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.2e-84 or 2.90000000000000013e23 < t

    1. Initial program 78.2%

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

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

    if -5.2e-84 < t < 2.90000000000000013e23

    1. Initial program 94.9%

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

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

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

Alternative 12: 52.2% accurate, 2.1× speedup?

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

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

\mathbf{elif}\;x \leq 4.2 \cdot 10^{-288}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.12000000000000007e-251 or 4.19999999999999991e-288 < x

    1. Initial program 87.1%

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

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

    if -1.12000000000000007e-251 < x < 4.19999999999999991e-288

    1. Initial program 73.3%

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{-1 \cdot \left(y \cdot t\right)}}{a - t} \]
    6. Step-by-step derivation
      1. mul-1-neg31.4%

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

        \[\leadsto \frac{\color{blue}{y \cdot \left(-t\right)}}{a - t} \]
    7. Simplified31.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.12 \cdot 10^{-251}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-288}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 50.9% accurate, 11.0× speedup?

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

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

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification57.8%

    \[\leadsto x \]

Developer target: 98.4% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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