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

Percentage Accurate: 84.9% → 98.3%
Time: 13.9s
Alternatives: 14
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 14 alternatives:

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

Initial Program: 84.9% 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: 98.3% 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}
Derivation
  1. Initial program 88.9%

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

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

    \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
  4. Add Preprocessing
  5. Final simplification97.7%

    \[\leadsto x + \frac{y}{\frac{a - t}{z - t}} \]
  6. Add Preprocessing

Alternative 2: 85.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq 1.7 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 3.8 \cdot 10^{-43}:\\
\;\;\;\;x - \frac{y \cdot t}{a - t}\\

\mathbf{elif}\;t \leq 6 \cdot 10^{+192}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.04999999999999996e-17 or 6e192 < t

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

    if -1.04999999999999996e-17 < t < 1.70000000000000006e-64 or 3.7999999999999997e-43 < t < 6e192

    1. Initial program 94.4%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 83.1%

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

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

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

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

    if 1.70000000000000006e-64 < t < 3.7999999999999997e-43

    1. Initial program 99.8%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{a - t}} \]
    9. Simplified99.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{-17}:\\ \;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-64}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-43}:\\ \;\;\;\;x - \frac{y \cdot t}{a - t}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+192}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 62.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -5.4 \cdot 10^{-8}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

\mathbf{elif}\;t \leq -1.5 \cdot 10^{-152} \lor \neg \left(t \leq 6.8 \cdot 10^{-106}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.02000000000000004e24 or -5.40000000000000005e-8 < t < -1.5e-152 or 6.79999999999999965e-106 < t

    1. Initial program 84.4%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 69.4%

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified69.4%

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

    if -1.02000000000000004e24 < t < -5.40000000000000005e-8

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    if -1.5e-152 < t < 6.79999999999999965e-106

    1. Initial program 97.4%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 60.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.02 \cdot 10^{+24}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{-8}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-152} \lor \neg \left(t \leq 6.8 \cdot 10^{-106}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 60.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -5.4 \cdot 10^{-22}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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

\mathbf{elif}\;t \leq 3.5 \cdot 10^{-102}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.10000000000000001e24 or 3.49999999999999986e-102 < t

    1. Initial program 82.5%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 74.0%

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified74.0%

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

    if -1.10000000000000001e24 < t < -5.4000000000000004e-22

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    if -5.4000000000000004e-22 < t < -2.05000000000000017e-120

    1. Initial program 89.3%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 73.2%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z - t}}} + x \]
    7. Simplified83.8%

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

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

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

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

    if -2.05000000000000017e-120 < t < 3.49999999999999986e-102

    1. Initial program 97.6%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 58.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{+24}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{-22}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{-120}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{-102}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 60.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -1.95 \cdot 10^{-19}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.0500000000000001e24 or 3.40000000000000013e-102 < t

    1. Initial program 82.5%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 74.0%

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified74.0%

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

    if -1.0500000000000001e24 < t < -1.94999999999999998e-19

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    if -1.94999999999999998e-19 < t < -1.8000000000000001e-120

    1. Initial program 89.3%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 73.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(z - t\right)} \]
      4. *-commutative50.9%

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

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

    if -1.8000000000000001e-120 < t < 3.40000000000000013e-102

    1. Initial program 97.6%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 58.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+24}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -1.95 \cdot 10^{-19}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-120}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-102}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 83.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{+50} \lor \neg \left(t \leq 3.6 \cdot 10^{+237}\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.85e+50) (not (<= t 3.6e+237)))
   (+ x y)
   (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -1.85e+50) || !(t <= 3.6e+237)) {
		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.85d+50)) .or. (.not. (t <= 3.6d+237))) 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.85e+50) || !(t <= 3.6e+237)) {
		tmp = x + y;
	} else {
		tmp = x + (z * (y / (a - t)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -1.85e+50) or not (t <= 3.6e+237):
		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.85e+50) || !(t <= 3.6e+237))
		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.85e+50) || ~((t <= 3.6e+237)))
		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.85e+50], N[Not[LessEqual[t, 3.6e+237]], $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.85 \cdot 10^{+50} \lor \neg \left(t \leq 3.6 \cdot 10^{+237}\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.85e50 or 3.60000000000000015e237 < t

    1. Initial program 70.3%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 85.3%

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified85.3%

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

    if -1.85e50 < t < 3.60000000000000015e237

    1. Initial program 95.4%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 80.4%

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

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

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

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

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

Alternative 7: 86.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-17} \lor \neg \left(t \leq 6 \cdot 10^{+192}\right):\\
\;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.49999999999999978e-17 or 6e192 < t

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

    if -4.49999999999999978e-17 < t < 6e192

    1. Initial program 94.7%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 81.0%

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

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

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

      \[\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 -4.5 \cdot 10^{-17} \lor \neg \left(t \leq 6 \cdot 10^{+192}\right):\\ \;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 82.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+50}:\\
\;\;\;\;x + \left(y + \frac{a}{\frac{t}{y}}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.5e50

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y + \color{blue}{\frac{a}{\frac{t}{y}}}\right) + x \]
    10. Simplified81.9%

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

    if -2.5e50 < t < 3.60000000000000015e237

    1. Initial program 95.4%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 80.4%

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

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

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

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

    if 3.60000000000000015e237 < t

    1. Initial program 62.5%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 97.1%

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

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

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

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

Alternative 9: 67.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.05 \cdot 10^{+21} \lor \neg \left(a \leq 1.2 \cdot 10^{-73}\right):\\
\;\;\;\;x + \frac{y \cdot z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.05e21 or 1.20000000000000003e-73 < a

    1. Initial program 88.8%

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

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

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

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

    if -2.05e21 < a < 1.20000000000000003e-73

    1. Initial program 89.0%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 65.6%

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

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

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

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

Alternative 10: 69.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{+21} \lor \neg \left(a \leq 1.25 \cdot 10^{-73}\right):\\
\;\;\;\;x + z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2e21 or 1.25e-73 < a

    1. Initial program 88.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}} + x} \]
    8. Step-by-step derivation
      1. associate-/r/77.9%

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

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

    if -2e21 < a < 1.25e-73

    1. Initial program 89.0%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 65.6%

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

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

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

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

Alternative 11: 69.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{+21} \lor \neg \left(a \leq 1.25 \cdot 10^{-73}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2e21 or 1.25e-73 < a

    1. Initial program 88.8%

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

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

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

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

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

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

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

    if -2e21 < a < 1.25e-73

    1. Initial program 89.0%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 65.6%

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

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

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

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

Alternative 12: 63.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{-153} \lor \neg \left(t \leq 6.4 \cdot 10^{-102}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.10000000000000004e-153 or 6.39999999999999973e-102 < t

    1. Initial program 85.3%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 66.3%

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified66.3%

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

    if -2.10000000000000004e-153 < t < 6.39999999999999973e-102

    1. Initial program 97.4%

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 60.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{-153} \lor \neg \left(t \leq 6.4 \cdot 10^{-102}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 98.1% accurate, 1.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. clear-num97.6%

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

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

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

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

    \[\leadsto x + y \cdot \frac{z - t}{a - t} \]
  8. Add Preprocessing

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

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

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

    \[\leadsto \color{blue}{x + \frac{y}{\frac{a - t}{z - t}}} \]
  4. Add Preprocessing
  5. Taylor expanded in x around inf 49.4%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification49.4%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 98.3% 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 2024031 
(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))))