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

Percentage Accurate: 76.7% → 90.5%
Time: 9.8s
Alternatives: 13
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 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: 76.7% accurate, 1.0× speedup?

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

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

Alternative 1: 90.5% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{+63} \lor \neg \left(t \leq 1.55 \cdot 10^{+150}\right):\\
\;\;\;\;\left(x + y \cdot \frac{z}{t}\right) - a \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.99999999999999999e63 or 1.55000000000000007e150 < t

    1. Initial program 58.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac274.2%

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in74.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.99999999999999999e63 < t < 1.55000000000000007e150

    1. Initial program 89.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac294.9%

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in94.9%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg94.9%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)} \]
    4. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification92.5%

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

Alternative 2: 88.4% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -4.0000000000000003e-285 or 1.99999999999999997e-118 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t)))

    1. Initial program 81.0%

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

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

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

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

    if -4.0000000000000003e-285 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.99999999999999997e-118

    1. Initial program 33.7%

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

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{y \cdot a} - y \cdot z}{t} \]
      7. distribute-lft-out--89.5%

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

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

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

Alternative 3: 90.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{+61} \lor \neg \left(t \leq 1.55 \cdot 10^{+150}\right):\\
\;\;\;\;\left(x + y \cdot \frac{z}{t}\right) - a \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.9000000000000001e61 or 1.55000000000000007e150 < t

    1. Initial program 58.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac274.2%

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in74.2%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9000000000000001e61 < t < 1.55000000000000007e150

    1. Initial program 89.7%

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

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

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

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

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

Alternative 4: 76.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{+108} \lor \neg \left(a \leq 11000\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.1000000000000001e108 or 11000 < a

    1. Initial program 77.7%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified86.2%

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

    if -1.1000000000000001e108 < a < 11000

    1. Initial program 77.3%

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

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{y \cdot a} - y \cdot z}{t} \]
      7. distribute-lft-out--78.0%

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

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

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

Alternative 5: 78.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{+108} \lor \neg \left(a \leq 1.56 \cdot 10^{-161}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.1000000000000001e108 or 1.56e-161 < a

    1. Initial program 81.5%

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

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

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

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

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

    if -1.1000000000000001e108 < a < 1.56e-161

    1. Initial program 72.8%

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

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{y \cdot a} - y \cdot z}{t} \]
      7. distribute-lft-out--79.5%

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

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

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

Alternative 6: 62.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{-131} \lor \neg \left(x \leq 5.7 \cdot 10^{-149}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.9000000000000002e-131 or 5.6999999999999999e-149 < x

    1. Initial program 81.7%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified73.2%

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

    if -3.9000000000000002e-131 < x < 5.6999999999999999e-149

    1. Initial program 65.7%

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

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

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

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

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

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

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

Alternative 7: 64.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+184} \lor \neg \left(z \leq 8 \cdot 10^{+193}\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.2e184 or 8.00000000000000053e193 < z

    1. Initial program 74.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac295.9%

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in95.9%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg95.9%

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

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

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

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

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

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

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

    if -4.2e184 < z < 8.00000000000000053e193

    1. Initial program 78.0%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified70.4%

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

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

Alternative 8: 75.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{+136} \lor \neg \left(a \leq 215000\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.49999999999999989e136 or 215000 < a

    1. Initial program 77.8%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified86.1%

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

    if -1.49999999999999989e136 < a < 215000

    1. Initial program 77.2%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac280.9%

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in80.9%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg80.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
    10. Applied egg-rr78.3%

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

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

Alternative 9: 60.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+194} \lor \neg \left(z \leq 3 \cdot 10^{+195}\right):\\
\;\;\;\;y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.15000000000000003e194 or 3.0000000000000001e195 < z

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    9. Step-by-step derivation
      1. associate-*r/57.2%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    10. Simplified57.2%

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

    if -1.15000000000000003e194 < z < 3.0000000000000001e195

    1. Initial program 78.2%

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

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

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

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

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

Alternative 10: 61.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 2.25 \cdot 10^{+195}:\\
\;\;\;\;x + y\\

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


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

    1. Initial program 76.2%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac295.1%

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in95.1%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg95.1%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    9. Step-by-step derivation
      1. associate-*r/51.3%

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

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

    if -1.5e192 < z < 2.25000000000000005e195

    1. Initial program 78.2%

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

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

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

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

    if 2.25000000000000005e195 < z

    1. Initial program 70.3%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z - t, \color{blue}{-\frac{y}{a - t}}, x + y\right) \]
      8. distribute-neg-frac295.6%

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

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{-\color{blue}{\left(a + \left(-t\right)\right)}}, x + y\right) \]
      10. distribute-neg-in95.6%

        \[\leadsto \mathsf{fma}\left(z - t, \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}}, x + y\right) \]
      11. remove-double-neg95.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t}} \]
    9. Step-by-step derivation
      1. *-commutative54.3%

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

        \[\leadsto \color{blue}{z \cdot \frac{y}{t}} \]
    10. Applied egg-rr63.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+192}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+195}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 53.7% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{-144}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 5.7 \cdot 10^{-149}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.8500000000000001e-144 or 5.6999999999999999e-149 < x

    1. Initial program 81.4%

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

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

    if -1.8500000000000001e-144 < x < 5.6999999999999999e-149

    1. Initial program 66.1%

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

      \[\leadsto \color{blue}{y - \frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. sub-neg63.5%

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

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

        \[\leadsto y \cdot 1 + \left(-\color{blue}{y \cdot \frac{z - t}{a - t}}\right) \]
      4. distribute-rgt-neg-in73.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{-144}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 5.7 \cdot 10^{-149}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 60.3% accurate, 4.3× speedup?

\[\begin{array}{l} \\ x + y \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x y))
double code(double x, double y, double z, double t, double a) {
	return x + y;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + y;
}
def code(x, y, z, t, a):
	return x + y
function code(x, y, z, t, a)
	return Float64(x + y)
end
function tmp = code(x, y, z, t, a)
	tmp = x + y;
end
code[x_, y_, z_, t_, a_] := N[(x + y), $MachinePrecision]
\begin{array}{l}

\\
x + y
\end{array}
Derivation
  1. Initial program 77.5%

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

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

      \[\leadsto \color{blue}{y + x} \]
  5. Simplified62.9%

    \[\leadsto \color{blue}{y + x} \]
  6. Final simplification62.9%

    \[\leadsto x + y \]
  7. Add Preprocessing

Alternative 13: 49.9% accurate, 13.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 77.5%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification51.5%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 88.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\

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


\end{array}
\end{array}

Reproduce

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

  :alt
  (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))

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