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

Percentage Accurate: 85.1% → 98.3%
Time: 11.8s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 85.1% accurate, 1.0× speedup?

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

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

Alternative 1: 98.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

Alternative 2: 77.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z - a}{z}}\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3e31 or 1.6499999999999999e42 < z

    1. Initial program 66.1%

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

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

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

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

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

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

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

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

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

    if -1.3e31 < z < -5.39999999999999963e-196

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.39999999999999963e-196 < z < 1.6499999999999999e42

    1. Initial program 97.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+31}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-196}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+42}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 77.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.54999999999999997e32 or 8.49999999999999938e41 < z

    1. Initial program 66.1%

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

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

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

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

    if -1.54999999999999997e32 < z < -9.5000000000000003e-197

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.5000000000000003e-197 < z < 8.49999999999999938e41

    1. Initial program 97.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+32}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-197}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+41}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 73.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.06 \cdot 10^{+78}:\\
\;\;\;\;x + y\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.06e78 or 8.80000000000000056e117 < z

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

    if -1.06e78 < z < -6e-196

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6e-196 < z < 8.80000000000000056e117

    1. Initial program 93.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.06 \cdot 10^{+78}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-196}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+117}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 73.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+50}:\\
\;\;\;\;x + y\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.1e50 or 8.80000000000000056e117 < z

    1. Initial program 63.3%

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

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

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

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

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

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

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

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

    if -2.1e50 < z < -6e-196

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{z}} \]
      3. *-commutative63.3%

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

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

    if -6e-196 < z < 8.80000000000000056e117

    1. Initial program 93.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+50}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-196}:\\ \;\;\;\;x - \frac{y \cdot t}{z}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+117}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 72.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+146}:\\
\;\;\;\;x + y\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.79999999999999981e146 or 8.80000000000000056e117 < z

    1. Initial program 55.7%

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

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

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

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

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

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

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

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

    if -6.79999999999999981e146 < z < -6e-196

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - \frac{y \cdot t}{z}} \]
    11. Step-by-step derivation
      1. add-cube-cbrt65.5%

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

        \[\leadsto x - \frac{\color{blue}{t \cdot y}}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}} \]
      3. times-frac66.9%

        \[\leadsto x - \color{blue}{\frac{t}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{y}{\sqrt[3]{z}}} \]
      4. add-sqr-sqrt31.8%

        \[\leadsto x - \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{y}{\sqrt[3]{z}} \]
      5. sqrt-unprod44.2%

        \[\leadsto x - \frac{\color{blue}{\sqrt{t \cdot t}}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{y}{\sqrt[3]{z}} \]
      6. sqr-neg44.2%

        \[\leadsto x - \frac{\sqrt{\color{blue}{\left(-t\right) \cdot \left(-t\right)}}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{y}{\sqrt[3]{z}} \]
      7. sqrt-unprod20.2%

        \[\leadsto x - \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{y}{\sqrt[3]{z}} \]
      8. add-sqr-sqrt36.8%

        \[\leadsto x - \frac{\color{blue}{-t}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{y}{\sqrt[3]{z}} \]
      9. times-frac38.2%

        \[\leadsto x - \color{blue}{\frac{\left(-t\right) \cdot y}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}} \]
      10. add-cube-cbrt38.2%

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

        \[\leadsto x - \color{blue}{\frac{-t}{z} \cdot y} \]
      12. add-sqr-sqrt20.2%

        \[\leadsto x - \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z} \cdot y \]
      13. sqrt-unprod44.3%

        \[\leadsto x - \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{z} \cdot y \]
      14. sqr-neg44.3%

        \[\leadsto x - \frac{\sqrt{\color{blue}{t \cdot t}}}{z} \cdot y \]
      15. sqrt-unprod31.9%

        \[\leadsto x - \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z} \cdot y \]
      16. add-sqr-sqrt67.2%

        \[\leadsto x - \frac{\color{blue}{t}}{z} \cdot y \]
    12. Applied egg-rr67.2%

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

    if -6e-196 < z < 8.80000000000000056e117

    1. Initial program 93.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+146}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-196}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+117}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 87.6% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.69999999999999993e35

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

    if -5.69999999999999993e35 < z < 5.2e52

    1. Initial program 96.6%

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

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

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

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

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

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

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

    if 5.2e52 < z

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 87.0% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.44999999999999997e35

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

    if -1.44999999999999997e35 < z < 3.59999999999999998e56

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - y \cdot \frac{t}{z - a}} \]
    10. Simplified89.6%

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

    if 3.59999999999999998e56 < z

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 78.6% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6e-196

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

    if -6e-196 < z < 1.1999999999999999e42

    1. Initial program 97.8%

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

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

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

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

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

    if 1.1999999999999999e42 < z

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 77.8% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6e-196

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

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

    if -6e-196 < z < 8.49999999999999938e41

    1. Initial program 97.8%

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

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

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

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

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

    if 8.49999999999999938e41 < z

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 75.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{+23} \lor \neg \left(z \leq 8.8 \cdot 10^{+117}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.12e23 or 8.80000000000000056e117 < z

    1. Initial program 66.1%

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

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

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

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

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

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

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

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

    if -1.12e23 < z < 8.80000000000000056e117

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 75.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.12e23 or 1.0000000000000001e50 < z

    1. Initial program 66.3%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 78.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 -1.12e23 < z < 1.0000000000000001e50

    1. Initial program 97.2%

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

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

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

Alternative 13: 75.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+23} \lor \neg \left(z \leq 1.12 \cdot 10^{+118}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.49999999999999979e23 or 1.11999999999999999e118 < z

    1. Initial program 66.1%

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

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

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

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

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

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

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

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

    if -4.49999999999999979e23 < z < 1.11999999999999999e118

    1. Initial program 94.3%

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

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

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

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

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

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

Alternative 14: 98.2% accurate, 1.0× speedup?

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

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

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

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

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

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

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

Alternative 15: 61.8% accurate, 1.4× speedup?

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

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

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


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

    1. Initial program 70.8%

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

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

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

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

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

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

    if -3.5000000000000002e154 < a

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

Alternative 16: 49.8% 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.7%

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

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

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

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

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

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

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

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

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

Reproduce

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

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

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