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

Percentage Accurate: 98.1% → 98.1%
Time: 7.7s
Alternatives: 12
Speedup: 1.0×

Specification

?
\[\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}

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 12 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: 98.1% 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}

Alternative 1: 98.1% 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 98.7%

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Final simplification98.7%

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

Alternative 2: 82.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+40}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.86 \cdot 10^{-59}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\

\mathbf{elif}\;z \leq -6 \cdot 10^{-75} \lor \neg \left(z \leq 1.9 \cdot 10^{+37}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.50000000000000032e40 or -1.86000000000000004e-59 < z < -5.9999999999999997e-75 or 1.89999999999999995e37 < z

    1. Initial program 99.1%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.1%

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

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

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

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

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

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

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

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

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

    if -4.50000000000000032e40 < z < -1.86000000000000004e-59

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around 0 90.4%

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

    if -5.9999999999999997e-75 < z < 1.89999999999999995e37

    1. Initial program 97.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around inf 83.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+40}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq -1.86 \cdot 10^{-59}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-75} \lor \neg \left(z \leq 1.9 \cdot 10^{+37}\right):\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - z\right) \cdot \frac{y}{a}\\ \end{array} \]

Alternative 3: 82.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+39}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.86 \cdot 10^{-59}:\\
\;\;\;\;x + \frac{y \cdot z}{z - a}\\

\mathbf{elif}\;z \leq -6.2 \cdot 10^{-75} \lor \neg \left(z \leq 5.3 \cdot 10^{+34}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.99999999999999976e39 or -1.86000000000000004e-59 < z < -6.20000000000000013e-75 or 5.3000000000000005e34 < z

    1. Initial program 99.1%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.1%

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

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

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

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

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

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

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

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

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

    if -3.99999999999999976e39 < z < -1.86000000000000004e-59

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

    if -6.20000000000000013e-75 < z < 5.3000000000000005e34

    1. Initial program 97.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around inf 83.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+39}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq -1.86 \cdot 10^{-59}:\\ \;\;\;\;x + \frac{y \cdot z}{z - a}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-75} \lor \neg \left(z \leq 5.3 \cdot 10^{+34}\right):\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - z\right) \cdot \frac{y}{a}\\ \end{array} \]

Alternative 4: 82.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{if}\;z \leq -2.1 \cdot 10^{+42}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-59}:\\ \;\;\;\;x + \frac{y \cdot z}{z - a}\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-77}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 10^{+36}:\\ \;\;\;\;x + \left(t - z\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ y (/ z (- z t))))))
   (if (<= z -2.1e+42)
     t_1
     (if (<= z -4e-59)
       (+ x (/ (* y z) (- z a)))
       (if (<= z -7.2e-77)
         (+ x (/ (* y (- z t)) z))
         (if (<= z 1e+36) (+ x (* (- t z) (/ y a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (z / (z - t)));
	double tmp;
	if (z <= -2.1e+42) {
		tmp = t_1;
	} else if (z <= -4e-59) {
		tmp = x + ((y * z) / (z - a));
	} else if (z <= -7.2e-77) {
		tmp = x + ((y * (z - t)) / z);
	} else if (z <= 1e+36) {
		tmp = x + ((t - z) * (y / 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 - t)))
    if (z <= (-2.1d+42)) then
        tmp = t_1
    else if (z <= (-4d-59)) then
        tmp = x + ((y * z) / (z - a))
    else if (z <= (-7.2d-77)) then
        tmp = x + ((y * (z - t)) / z)
    else if (z <= 1d+36) then
        tmp = x + ((t - z) * (y / 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 - t)));
	double tmp;
	if (z <= -2.1e+42) {
		tmp = t_1;
	} else if (z <= -4e-59) {
		tmp = x + ((y * z) / (z - a));
	} else if (z <= -7.2e-77) {
		tmp = x + ((y * (z - t)) / z);
	} else if (z <= 1e+36) {
		tmp = x + ((t - z) * (y / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y / (z / (z - t)))
	tmp = 0
	if z <= -2.1e+42:
		tmp = t_1
	elif z <= -4e-59:
		tmp = x + ((y * z) / (z - a))
	elif z <= -7.2e-77:
		tmp = x + ((y * (z - t)) / z)
	elif z <= 1e+36:
		tmp = x + ((t - z) * (y / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y / Float64(z / Float64(z - t))))
	tmp = 0.0
	if (z <= -2.1e+42)
		tmp = t_1;
	elseif (z <= -4e-59)
		tmp = Float64(x + Float64(Float64(y * z) / Float64(z - a)));
	elseif (z <= -7.2e-77)
		tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z));
	elseif (z <= 1e+36)
		tmp = Float64(x + Float64(Float64(t - z) * Float64(y / a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y / (z / (z - t)));
	tmp = 0.0;
	if (z <= -2.1e+42)
		tmp = t_1;
	elseif (z <= -4e-59)
		tmp = x + ((y * z) / (z - a));
	elseif (z <= -7.2e-77)
		tmp = x + ((y * (z - t)) / z);
	elseif (z <= 1e+36)
		tmp = x + ((t - z) * (y / 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 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+42], t$95$1, If[LessEqual[z, -4e-59], N[(x + N[(N[(y * z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.2e-77], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+36], N[(x + N[(N[(t - z), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+42}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -4 \cdot 10^{-59}:\\
\;\;\;\;x + \frac{y \cdot z}{z - a}\\

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.09999999999999995e42 or 1.00000000000000004e36 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

    if -2.09999999999999995e42 < z < -4.0000000000000001e-59

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

    if -4.0000000000000001e-59 < z < -7.2e-77

    1. Initial program 89.3%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative89.3%

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

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

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

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

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

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

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

    if -7.2e-77 < z < 1.00000000000000004e36

    1. Initial program 97.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around inf 83.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+42}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-59}:\\ \;\;\;\;x + \frac{y \cdot z}{z - a}\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-77}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 10^{+36}:\\ \;\;\;\;x + \left(t - z\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \end{array} \]

Alternative 5: 82.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{if}\;z \leq -2.8 \cdot 10^{+40}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-59}:\\ \;\;\;\;x + \frac{y \cdot z}{z - a}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-80}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+39}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ y (/ z (- z t))))))
   (if (<= z -2.8e+40)
     t_1
     (if (<= z -3.7e-59)
       (+ x (/ (* y z) (- z a)))
       (if (<= z -1.65e-80)
         (+ x (/ (* y (- z t)) z))
         (if (<= z 1.7e+39) (- x (/ y (/ a (- z t)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (z / (z - t)));
	double tmp;
	if (z <= -2.8e+40) {
		tmp = t_1;
	} else if (z <= -3.7e-59) {
		tmp = x + ((y * z) / (z - a));
	} else if (z <= -1.65e-80) {
		tmp = x + ((y * (z - t)) / z);
	} else if (z <= 1.7e+39) {
		tmp = x - (y / (a / (z - t)));
	} 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 - t)))
    if (z <= (-2.8d+40)) then
        tmp = t_1
    else if (z <= (-3.7d-59)) then
        tmp = x + ((y * z) / (z - a))
    else if (z <= (-1.65d-80)) then
        tmp = x + ((y * (z - t)) / z)
    else if (z <= 1.7d+39) then
        tmp = x - (y / (a / (z - t)))
    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 - t)));
	double tmp;
	if (z <= -2.8e+40) {
		tmp = t_1;
	} else if (z <= -3.7e-59) {
		tmp = x + ((y * z) / (z - a));
	} else if (z <= -1.65e-80) {
		tmp = x + ((y * (z - t)) / z);
	} else if (z <= 1.7e+39) {
		tmp = x - (y / (a / (z - t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y / (z / (z - t)))
	tmp = 0
	if z <= -2.8e+40:
		tmp = t_1
	elif z <= -3.7e-59:
		tmp = x + ((y * z) / (z - a))
	elif z <= -1.65e-80:
		tmp = x + ((y * (z - t)) / z)
	elif z <= 1.7e+39:
		tmp = x - (y / (a / (z - t)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y / Float64(z / Float64(z - t))))
	tmp = 0.0
	if (z <= -2.8e+40)
		tmp = t_1;
	elseif (z <= -3.7e-59)
		tmp = Float64(x + Float64(Float64(y * z) / Float64(z - a)));
	elseif (z <= -1.65e-80)
		tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z));
	elseif (z <= 1.7e+39)
		tmp = Float64(x - Float64(y / Float64(a / Float64(z - t))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y / (z / (z - t)));
	tmp = 0.0;
	if (z <= -2.8e+40)
		tmp = t_1;
	elseif (z <= -3.7e-59)
		tmp = x + ((y * z) / (z - a));
	elseif (z <= -1.65e-80)
		tmp = x + ((y * (z - t)) / z);
	elseif (z <= 1.7e+39)
		tmp = x - (y / (a / (z - t)));
	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 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+40], t$95$1, If[LessEqual[z, -3.7e-59], N[(x + N[(N[(y * z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.65e-80], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e+39], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+40}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -3.7 \cdot 10^{-59}:\\
\;\;\;\;x + \frac{y \cdot z}{z - a}\\

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.8000000000000001e40 or 1.6999999999999999e39 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

    if -2.8000000000000001e40 < z < -3.6999999999999999e-59

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

    if -3.6999999999999999e-59 < z < -1.65e-80

    1. Initial program 89.3%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative89.3%

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

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

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

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

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

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

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

    if -1.65e-80 < z < 1.6999999999999999e39

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{z - t}}} \]
    6. Simplified82.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+40}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-59}:\\ \;\;\;\;x + \frac{y \cdot z}{z - a}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-80}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+39}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \end{array} \]

Alternative 6: 82.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{if}\;z \leq -4.6 \cdot 10^{+40}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-59}:\\ \;\;\;\;x + \frac{y \cdot z}{z - a}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-80}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+34}:\\ \;\;\;\;x - y \cdot \frac{z - 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 t))))))
   (if (<= z -4.6e+40)
     t_1
     (if (<= z -4.2e-59)
       (+ x (/ (* y z) (- z a)))
       (if (<= z -2.7e-80)
         (+ x (/ (* y (- z t)) z))
         (if (<= z 5e+34) (- x (* y (/ (- z t) a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (z / (z - t)));
	double tmp;
	if (z <= -4.6e+40) {
		tmp = t_1;
	} else if (z <= -4.2e-59) {
		tmp = x + ((y * z) / (z - a));
	} else if (z <= -2.7e-80) {
		tmp = x + ((y * (z - t)) / z);
	} else if (z <= 5e+34) {
		tmp = x - (y * ((z - 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 - t)))
    if (z <= (-4.6d+40)) then
        tmp = t_1
    else if (z <= (-4.2d-59)) then
        tmp = x + ((y * z) / (z - a))
    else if (z <= (-2.7d-80)) then
        tmp = x + ((y * (z - t)) / z)
    else if (z <= 5d+34) then
        tmp = x - (y * ((z - 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 - t)));
	double tmp;
	if (z <= -4.6e+40) {
		tmp = t_1;
	} else if (z <= -4.2e-59) {
		tmp = x + ((y * z) / (z - a));
	} else if (z <= -2.7e-80) {
		tmp = x + ((y * (z - t)) / z);
	} else if (z <= 5e+34) {
		tmp = x - (y * ((z - t) / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y / (z / (z - t)))
	tmp = 0
	if z <= -4.6e+40:
		tmp = t_1
	elif z <= -4.2e-59:
		tmp = x + ((y * z) / (z - a))
	elif z <= -2.7e-80:
		tmp = x + ((y * (z - t)) / z)
	elif z <= 5e+34:
		tmp = x - (y * ((z - 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 - t))))
	tmp = 0.0
	if (z <= -4.6e+40)
		tmp = t_1;
	elseif (z <= -4.2e-59)
		tmp = Float64(x + Float64(Float64(y * z) / Float64(z - a)));
	elseif (z <= -2.7e-80)
		tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z));
	elseif (z <= 5e+34)
		tmp = Float64(x - Float64(y * Float64(Float64(z - 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 - t)));
	tmp = 0.0;
	if (z <= -4.6e+40)
		tmp = t_1;
	elseif (z <= -4.2e-59)
		tmp = x + ((y * z) / (z - a));
	elseif (z <= -2.7e-80)
		tmp = x + ((y * (z - t)) / z);
	elseif (z <= 5e+34)
		tmp = x - (y * ((z - 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 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e+40], t$95$1, If[LessEqual[z, -4.2e-59], N[(x + N[(N[(y * z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.7e-80], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+34], N[(x - N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+40}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -4.2 \cdot 10^{-59}:\\
\;\;\;\;x + \frac{y \cdot z}{z - a}\\

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.59999999999999987e40 or 4.9999999999999998e34 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

    if -4.59999999999999987e40 < z < -4.19999999999999993e-59

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

    if -4.19999999999999993e-59 < z < -2.7000000000000002e-80

    1. Initial program 89.3%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative89.3%

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

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

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

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

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

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

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

    if -2.7000000000000002e-80 < z < 4.9999999999999998e34

    1. Initial program 97.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around inf 83.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+40}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-59}:\\ \;\;\;\;x + \frac{y \cdot z}{z - a}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-80}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+34}:\\ \;\;\;\;x - y \cdot \frac{z - t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \end{array} \]

Alternative 7: 81.0% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.45e-20 or 8.0000000000000003e-135 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around 0 80.4%

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

    if -1.45e-20 < z < 8.0000000000000003e-135

    1. Initial program 96.8%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 78.6%

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

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

Alternative 8: 82.6% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.45e-20 or 8.80000000000000031e-4 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around 0 81.4%

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

    if -1.45e-20 < z < 8.80000000000000031e-4

    1. Initial program 97.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around inf 82.1%

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

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

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

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

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

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

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

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

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

Alternative 9: 83.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.11999999999999996e142 or 2.1500000000000001e-40 < t

    1. Initial program 97.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around inf 81.5%

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

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

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

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

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

    if -1.11999999999999996e142 < t < 2.1500000000000001e-40

    1. Initial program 99.7%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around 0 87.5%

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

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

Alternative 10: 76.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5000000000000005e-20 or 3.04999999999999999e41 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

    if -8.5000000000000005e-20 < z < 3.04999999999999999e41

    1. Initial program 97.4%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 74.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{-20}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 3.05 \cdot 10^{+41}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 11: 61.0% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{-84}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.65 \cdot 10^{+189}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.0000000000000002e-84 or 1.6500000000000001e189 < a

    1. Initial program 99.6%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative99.6%

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

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

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

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

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

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

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

    if -5.0000000000000002e-84 < a < 1.6500000000000001e189

    1. Initial program 98.1%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. +-commutative98.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5 \cdot 10^{-84}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+189}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 12: 50.2% 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 98.7%

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Step-by-step derivation
    1. +-commutative98.7%

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification48.1%

    \[\leadsto x \]

Developer target: 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 2023181 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
  :precision binary64

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

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