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

Percentage Accurate: 85.6% → 99.1%
Time: 10.7s
Alternatives: 16
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 85.6% accurate, 1.0× speedup?

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

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

Alternative 1: 99.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 1.5 \cdot 10^{+229}:\\
\;\;\;\;x - \frac{t\_1}{a - z}\\

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


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

    1. Initial program 75.4%

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

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

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

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

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

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{z - a}{y}}{z - t}}} \]
    6. Simplified99.9%

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

    if -1.99999999999999991e271 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.49999999999999999e229

    1. Initial program 99.8%

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

    if 1.49999999999999999e229 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 46.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 96.8% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{-202}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.95e-202

    1. Initial program 92.1%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z - a}} + x \]
      3. fma-define98.0%

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

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

    if -1.95e-202 < y

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.95 \cdot 10^{-202}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 99.1% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x - \frac{t\_1}{a - z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -1.99999999999999991e271 or 1.49999999999999999e229 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 60.2%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z - a}} + x \]
      3. fma-define99.8%

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

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

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

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

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

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

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

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

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

    if -1.99999999999999991e271 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.49999999999999999e229

    1. Initial program 99.8%

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

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

Alternative 4: 79.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -2.05 \cdot 10^{-21} \lor \neg \left(a \leq 1.35 \cdot 10^{-9}\right):\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.9000000000000003e48

    1. Initial program 94.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    7. Simplified87.6%

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

    if -4.9000000000000003e48 < a < -2.04999999999999997e-21 or 1.3500000000000001e-9 < a

    1. Initial program 87.3%

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

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

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

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

    if -2.04999999999999997e-21 < a < 1.3500000000000001e-9

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -7.8 \cdot 10^{-22} \lor \neg \left(a \leq 8.5 \cdot 10^{-13}\right):\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.8e48

    1. Initial program 94.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    7. Simplified87.6%

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

    if -3.8e48 < a < -7.79999999999999996e-22 or 8.5000000000000001e-13 < a

    1. Initial program 87.3%

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

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

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

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

    if -7.79999999999999996e-22 < a < 8.5000000000000001e-13

    1. Initial program 91.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+48}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -7.8 \cdot 10^{-22} \lor \neg \left(a \leq 8.5 \cdot 10^{-13}\right):\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 88.7% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 97.0%

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

    if 5.00000000000000034e245 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 42.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 75.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -17:\\
\;\;\;\;y + x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -17 or 5.2000000000000001e215 < z

    1. Initial program 78.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified80.6%

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

    if -17 < z < 2.2e-85

    1. Initial program 97.4%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    7. Simplified75.7%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
    9. Applied egg-rr76.2%

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

    if 2.2e-85 < z < 5.2000000000000001e215

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    8. Simplified77.0%

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

        \[\leadsto x - t \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. un-div-inv77.1%

        \[\leadsto x - \color{blue}{\frac{t}{\frac{z}{y}}} \]
    10. Applied egg-rr77.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -17:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-85}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+215}:\\ \;\;\;\;x - \frac{t}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 75.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -145:\\
\;\;\;\;y + x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -145 or 5.2000000000000001e215 < z

    1. Initial program 78.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified80.6%

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

    if -145 < z < 2.20000000000000005e-88

    1. Initial program 97.4%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    7. Simplified75.7%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
    9. Applied egg-rr76.2%

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

    if 2.20000000000000005e-88 < z < 5.2000000000000001e215

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    8. Simplified77.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -145:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-88}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+215}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 87.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.42e57 or 9.5000000000000003e29 < t

    1. Initial program 88.7%

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

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

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

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

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

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

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

    if -1.42e57 < t < 9.5000000000000003e29

    1. Initial program 93.0%

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

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

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

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

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

Alternative 10: 82.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-59} \lor \neg \left(z \leq 1.95 \cdot 10^{-38}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.40000000000000018e-59 or 1.95e-38 < z

    1. Initial program 86.6%

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

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

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

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

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

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

    if -3.40000000000000018e-59 < z < 1.95e-38

    1. Initial program 97.2%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z - a}} + x \]
      3. fma-define92.6%

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    7. Simplified77.2%

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} + x \]
      2. un-div-inv77.7%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
    9. Applied egg-rr77.7%

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

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

Alternative 11: 81.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+47}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.2e47

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

    if -4.2e47 < a < 7.7999999999999999e-10

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.7999999999999999e-10 < a

    1. Initial program 83.2%

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

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

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

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

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

Alternative 12: 77.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -48 \lor \neg \left(z \leq 10^{+60}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -48 or 9.9999999999999995e59 < z

    1. Initial program 82.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified78.1%

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

    if -48 < z < 9.9999999999999995e59

    1. Initial program 97.3%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    7. Simplified73.5%

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} + x \]
      2. un-div-inv73.8%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
    9. Applied egg-rr73.8%

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

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

Alternative 13: 76.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \lor \neg \left(z \leq 5.2 \cdot 10^{+59}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.60000000000000009 or 5.19999999999999999e59 < z

    1. Initial program 82.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified78.1%

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

    if -3.60000000000000009 < z < 5.19999999999999999e59

    1. Initial program 97.3%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    7. Simplified73.5%

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

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

Alternative 14: 76.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \lor \neg \left(z \leq 5.2 \cdot 10^{+59}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.79999999999999982 or 5.19999999999999999e59 < z

    1. Initial program 82.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified78.1%

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

    if -6.79999999999999982 < z < 5.19999999999999999e59

    1. Initial program 97.3%

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

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

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

Alternative 15: 61.2% accurate, 1.4× speedup?

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

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

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


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

    1. Initial program 96.9%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z - a}} + x \]
      3. fma-define99.8%

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

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

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

    if -4.19999999999999989e154 < a

    1. Initial program 90.2%

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    6. Step-by-step derivation
      1. +-commutative57.8%

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified57.8%

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

Alternative 16: 50.6% 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 91.0%

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer Target 1: 98.2% accurate, 1.0× speedup?

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

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

Reproduce

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

  :alt
  (! :herbie-platform default (+ x (/ y (/ (- z a) (- z t)))))

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