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

Percentage Accurate: 85.4% → 98.0%
Time: 12.6s
Alternatives: 15
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 15 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.4% 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.0% 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 82.3%

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

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

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

Alternative 2: 77.2% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.7e156 or 1.54999999999999992e-26 < t

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

    if -2.7e156 < t < -1.85000000000000007e-33

    1. Initial program 82.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z - t}{\color{blue}{-\frac{t}{y}}} + x \]
      2. distribute-neg-frac80.2%

        \[\leadsto \frac{z - t}{\color{blue}{\frac{-t}{y}}} + x \]
    9. Simplified80.2%

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

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

    if -1.85000000000000007e-33 < t < 1.54999999999999992e-26

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} + x \]
    11. Simplified78.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{+156}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-33}:\\ \;\;\;\;x - \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-26}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 77.8% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.65e68 or 2.34999999999999995e-26 < t

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

    if -1.65e68 < t < -1.45000000000000001e-33

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{t}} \]
      4. div-sub77.4%

        \[\leadsto x - y \cdot \color{blue}{\left(\frac{z}{t} - \frac{t}{t}\right)} \]
      5. sub-neg77.4%

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

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

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

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

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

    if -1.45000000000000001e-33 < t < 2.34999999999999995e-26

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} + x \]
    11. Simplified78.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{+68}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-33}:\\ \;\;\;\;x - \frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{-26}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.0% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.90000000000000019e34 or 2.0000000000000001e-26 < t

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

    if -3.90000000000000019e34 < t < -5.59999999999999994e-34

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{\frac{a}{y} - \frac{t}{y}}} \]
    10. Step-by-step derivation
      1. div-sub65.2%

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

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

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

    if -5.59999999999999994e-34 < t < 2.0000000000000001e-26

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} + x \]
    11. Simplified79.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.9 \cdot 10^{+34}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -5.6 \cdot 10^{-34}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-26}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.6% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.99999999999999978e34 or 2.2999999999999999e-49 < t

    1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

    if -3.99999999999999978e34 < t < -5.59999999999999994e-34

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{\frac{a}{y} - \frac{t}{y}}} \]
    10. Step-by-step derivation
      1. div-sub65.2%

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

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

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

    if -5.59999999999999994e-34 < t < 2.2999999999999999e-49

    1. Initial program 96.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+34}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -5.6 \cdot 10^{-34}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-49}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 87.0% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.34999999999999981e-9 or 7.50000000000000072e-21 < z

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

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

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

    if -3.34999999999999981e-9 < z < 7.50000000000000072e-21

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 84.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{+156} \lor \neg \left(t \leq 1.15 \cdot 10^{-13}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.7e156 or 1.1499999999999999e-13 < t

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

    if -2.7e156 < t < 1.1499999999999999e-13

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 82.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+67} \lor \neg \left(t \leq 1.3 \cdot 10^{-44}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.1999999999999998e67 or 1.2999999999999999e-44 < t

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

    if -7.1999999999999998e67 < t < 1.2999999999999999e-44

    1. Initial program 96.5%

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

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

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

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

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

Alternative 9: 84.7% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.20000000000000007e-90

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{t}} \]
      4. div-sub81.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{t}} \]
    10. Simplified81.4%

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

    if -3.20000000000000007e-90 < t < 1.84999999999999997e-83

    1. Initial program 97.2%

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

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

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

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

    if 1.84999999999999997e-83 < t

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{a - t}} \]
      3. *-commutative65.1%

        \[\leadsto x - \frac{\color{blue}{y \cdot t}}{a - t} \]
      4. *-lft-identity65.1%

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

        \[\leadsto x - \color{blue}{\frac{y}{1} \cdot \frac{t}{a - t}} \]
      6. /-rgt-identity90.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{-90}:\\ \;\;\;\;x + y \cdot \frac{t - z}{t}\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{-83}:\\ \;\;\;\;x + \frac{y \cdot z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{t}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 84.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-90}:\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.20000000000000007e-90

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{t}} \]
      4. div-sub81.3%

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

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

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

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

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

    if -3.20000000000000007e-90 < t < 1.1499999999999999e-84

    1. Initial program 97.2%

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

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

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

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

    if 1.1499999999999999e-84 < t

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{a - t}} \]
      3. *-commutative65.1%

        \[\leadsto x - \frac{\color{blue}{y \cdot t}}{a - t} \]
      4. *-lft-identity65.1%

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

        \[\leadsto x - \color{blue}{\frac{y}{1} \cdot \frac{t}{a - t}} \]
      6. /-rgt-identity90.3%

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

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

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

Alternative 11: 84.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-90}:\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.20000000000000007e-90

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{t}} \]
      4. div-sub81.3%

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

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

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

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

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

    if -3.20000000000000007e-90 < t < 2.29999999999999981e-84

    1. Initial program 97.2%

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

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

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

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

    if 2.29999999999999981e-84 < t

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 77.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.4999999999999997e58 or 2.09999999999999987e-46 < t

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

    if -3.4999999999999997e58 < t < 2.09999999999999987e-46

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 60.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{-219} \lor \neg \left(t \leq 2.7 \cdot 10^{-85}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.25e-219 or 2.7000000000000001e-85 < t

    1. Initial program 79.1%

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

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

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

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

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

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

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

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

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

    if -1.25e-219 < t < 2.7000000000000001e-85

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y}} + x} \]
    7. Step-by-step derivation
      1. div-sub94.0%

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

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

      \[\leadsto \color{blue}{\frac{z}{\frac{a}{y} - \frac{t}{y}}} \]
    10. Step-by-step derivation
      1. div-sub54.4%

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

        \[\leadsto \color{blue}{\frac{z}{a - t} \cdot y} \]
    11. Simplified60.1%

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

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

Alternative 14: 62.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq 3.6 \cdot 10^{+117}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.8000000000000001e232 or 3.60000000000000013e117 < a

    1. Initial program 75.8%

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

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

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

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

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

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

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

    if -3.8000000000000001e232 < a < 3.60000000000000013e117

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+232}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+117}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 51.1% 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 82.3%

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

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

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

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

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

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

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

Developer Target 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}

Reproduce

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

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

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