Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1

Percentage Accurate: 97.8% → 97.8%
Time: 6.7s
Alternatives: 10
Speedup: 1.0×

Specification

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

\\
\frac{x}{y} \cdot \left(z - t\right) + 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 10 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: 97.8% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 1.0× speedup?

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

\\
t + \frac{x}{y} \cdot \left(z - t\right)
\end{array}
Derivation
  1. Initial program 97.3%

    \[\frac{x}{y} \cdot \left(z - t\right) + t \]
  2. Final simplification97.3%

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

Alternative 2: 92.7% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 x y) < -9.9999999999999997e34 or 1.00000000000000006e-9 < (/.f64 x y)

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

    if -9.9999999999999997e34 < (/.f64 x y) < 1.00000000000000006e-9

    1. Initial program 97.2%

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

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

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

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

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

Alternative 3: 63.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -2 \cdot 10^{+29} \lor \neg \left(\frac{x}{y} \leq 10\right):\\
\;\;\;\;t \cdot \frac{-x}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 x y) < -1.99999999999999983e29 or 10 < (/.f64 x y)

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x}{y}} \]
      3. associate-/l*54.5%

        \[\leadsto t - \color{blue}{\frac{t}{\frac{y}{x}}} \]
      4. associate-/r/50.0%

        \[\leadsto t - \color{blue}{\frac{t}{y} \cdot x} \]
    6. Simplified50.0%

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

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

        \[\leadsto t - \color{blue}{t \cdot \frac{x}{y}} \]
    9. Simplified54.0%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{y}} \]
    11. Step-by-step derivation
      1. associate-*l/50.0%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{t}{y} \cdot x\right)} \]
      2. associate-*r*50.0%

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{t}{y}\right)} \]
      5. *-rgt-identity50.0%

        \[\leadsto x \cdot \left(-\color{blue}{\frac{t}{y} \cdot 1}\right) \]
      6. *-commutative50.0%

        \[\leadsto x \cdot \left(-\color{blue}{1 \cdot \frac{t}{y}}\right) \]
      7. metadata-eval50.0%

        \[\leadsto x \cdot \left(-\color{blue}{\frac{-1}{-1}} \cdot \frac{t}{y}\right) \]
      8. times-frac50.0%

        \[\leadsto x \cdot \left(-\color{blue}{\frac{-1 \cdot t}{-1 \cdot y}}\right) \]
      9. neg-mul-150.0%

        \[\leadsto x \cdot \left(-\frac{\color{blue}{-t}}{-1 \cdot y}\right) \]
      10. neg-mul-150.0%

        \[\leadsto x \cdot \left(-\frac{-t}{\color{blue}{-y}}\right) \]
      11. distribute-frac-neg50.0%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(-t\right)}{-y}} \]
      12. remove-double-neg50.0%

        \[\leadsto x \cdot \frac{\color{blue}{t}}{-y} \]
    12. Simplified50.0%

      \[\leadsto \color{blue}{x \cdot \frac{t}{-y}} \]
    13. Taylor expanded in x around 0 49.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{y}} \]
    14. Step-by-step derivation
      1. mul-1-neg49.9%

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

        \[\leadsto -\color{blue}{t \cdot \frac{x}{y}} \]
      3. distribute-rgt-neg-in54.0%

        \[\leadsto \color{blue}{t \cdot \left(-\frac{x}{y}\right)} \]
      4. distribute-neg-frac54.0%

        \[\leadsto t \cdot \color{blue}{\frac{-x}{y}} \]
    15. Simplified54.0%

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

    if -1.99999999999999983e29 < (/.f64 x y) < 10

    1. Initial program 97.2%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.2%

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

Alternative 4: 41.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -4 \cdot 10^{+234} \lor \neg \left(\frac{x}{y} \leq 5 \cdot 10^{+30}\right):\\
\;\;\;\;\frac{x}{y} \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 x y) < -4.00000000000000007e234 or 4.9999999999999998e30 < (/.f64 x y)

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x}{y}} \]
      3. associate-/l*52.8%

        \[\leadsto t - \color{blue}{\frac{t}{\frac{y}{x}}} \]
      4. associate-/r/47.5%

        \[\leadsto t - \color{blue}{\frac{t}{y} \cdot x} \]
    6. Simplified47.5%

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

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

        \[\leadsto t - \color{blue}{t \cdot \frac{x}{y}} \]
    9. Simplified52.1%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{y}} \]
    11. Step-by-step derivation
      1. associate-*l/47.5%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{t}{y} \cdot x\right)} \]
      2. associate-*r*47.5%

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{t}{y}\right)} \]
      5. *-rgt-identity47.5%

        \[\leadsto x \cdot \left(-\color{blue}{\frac{t}{y} \cdot 1}\right) \]
      6. *-commutative47.5%

        \[\leadsto x \cdot \left(-\color{blue}{1 \cdot \frac{t}{y}}\right) \]
      7. metadata-eval47.5%

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

        \[\leadsto x \cdot \left(-\color{blue}{\frac{-1 \cdot t}{-1 \cdot y}}\right) \]
      9. neg-mul-147.5%

        \[\leadsto x \cdot \left(-\frac{\color{blue}{-t}}{-1 \cdot y}\right) \]
      10. neg-mul-147.5%

        \[\leadsto x \cdot \left(-\frac{-t}{\color{blue}{-y}}\right) \]
      11. distribute-frac-neg47.5%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(-t\right)}{-y}} \]
      12. remove-double-neg47.5%

        \[\leadsto x \cdot \frac{\color{blue}{t}}{-y} \]
    12. Simplified47.5%

      \[\leadsto \color{blue}{x \cdot \frac{t}{-y}} \]
    13. Step-by-step derivation
      1. expm1-log1p-u20.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \frac{t}{-y}\right)\right)} \]
      2. expm1-udef20.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x \cdot \frac{t}{-y}\right)} - 1} \]
      3. log1p-udef20.1%

        \[\leadsto e^{\color{blue}{\log \left(1 + x \cdot \frac{t}{-y}\right)}} - 1 \]
      4. add-exp-log47.5%

        \[\leadsto \color{blue}{\left(1 + x \cdot \frac{t}{-y}\right)} - 1 \]
      5. add-sqr-sqrt14.2%

        \[\leadsto \left(1 + x \cdot \frac{t}{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}\right) - 1 \]
      6. sqrt-unprod22.6%

        \[\leadsto \left(1 + x \cdot \frac{t}{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}\right) - 1 \]
      7. sqr-neg22.6%

        \[\leadsto \left(1 + x \cdot \frac{t}{\sqrt{\color{blue}{y \cdot y}}}\right) - 1 \]
      8. sqrt-unprod8.4%

        \[\leadsto \left(1 + x \cdot \frac{t}{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}\right) - 1 \]
      9. add-sqr-sqrt14.3%

        \[\leadsto \left(1 + x \cdot \frac{t}{\color{blue}{y}}\right) - 1 \]
    14. Applied egg-rr14.3%

      \[\leadsto \color{blue}{\left(1 + x \cdot \frac{t}{y}\right) - 1} \]
    15. Step-by-step derivation
      1. +-commutative14.3%

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

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

        \[\leadsto x \cdot \frac{t}{y} + \color{blue}{0} \]
      4. +-rgt-identity14.4%

        \[\leadsto \color{blue}{x \cdot \frac{t}{y}} \]
      5. *-commutative14.4%

        \[\leadsto \color{blue}{\frac{t}{y} \cdot x} \]
      6. associate-*l/16.5%

        \[\leadsto \color{blue}{\frac{t \cdot x}{y}} \]
      7. associate-*r/16.6%

        \[\leadsto \color{blue}{t \cdot \frac{x}{y}} \]
    16. Simplified16.6%

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

    if -4.00000000000000007e234 < (/.f64 x y) < 4.9999999999999998e30

    1. Initial program 97.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification43.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -4 \cdot 10^{+234} \lor \neg \left(\frac{x}{y} \leq 5 \cdot 10^{+30}\right):\\ \;\;\;\;\frac{x}{y} \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 5: 41.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;\frac{x}{y} \leq 10^{-9}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 x y) < -4.00000000000000007e234

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x}{y}} \]
      3. associate-/l*58.4%

        \[\leadsto t - \color{blue}{\frac{t}{\frac{y}{x}}} \]
      4. associate-/r/56.2%

        \[\leadsto t - \color{blue}{\frac{t}{y} \cdot x} \]
    6. Simplified56.2%

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

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

        \[\leadsto t - \color{blue}{t \cdot \frac{x}{y}} \]
    9. Simplified56.3%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{y}} \]
    11. Step-by-step derivation
      1. associate-*l/56.2%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{t}{y} \cdot x\right)} \]
      2. associate-*r*56.2%

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{t}{y}\right)} \]
      5. *-rgt-identity56.2%

        \[\leadsto x \cdot \left(-\color{blue}{\frac{t}{y} \cdot 1}\right) \]
      6. *-commutative56.2%

        \[\leadsto x \cdot \left(-\color{blue}{1 \cdot \frac{t}{y}}\right) \]
      7. metadata-eval56.2%

        \[\leadsto x \cdot \left(-\color{blue}{\frac{-1}{-1}} \cdot \frac{t}{y}\right) \]
      8. times-frac56.2%

        \[\leadsto x \cdot \left(-\color{blue}{\frac{-1 \cdot t}{-1 \cdot y}}\right) \]
      9. neg-mul-156.2%

        \[\leadsto x \cdot \left(-\frac{\color{blue}{-t}}{-1 \cdot y}\right) \]
      10. neg-mul-156.2%

        \[\leadsto x \cdot \left(-\frac{-t}{\color{blue}{-y}}\right) \]
      11. distribute-frac-neg56.2%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(-t\right)}{-y}} \]
      12. remove-double-neg56.2%

        \[\leadsto x \cdot \frac{\color{blue}{t}}{-y} \]
    12. Simplified56.2%

      \[\leadsto \color{blue}{x \cdot \frac{t}{-y}} \]
    13. Step-by-step derivation
      1. expm1-log1p-u35.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \frac{t}{-y}\right)\right)} \]
      2. expm1-udef35.9%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x \cdot \frac{t}{-y}\right)} - 1} \]
      3. log1p-udef35.9%

        \[\leadsto e^{\color{blue}{\log \left(1 + x \cdot \frac{t}{-y}\right)}} - 1 \]
      4. add-exp-log56.2%

        \[\leadsto \color{blue}{\left(1 + x \cdot \frac{t}{-y}\right)} - 1 \]
      5. add-sqr-sqrt19.1%

        \[\leadsto \left(1 + x \cdot \frac{t}{\color{blue}{\sqrt{-y} \cdot \sqrt{-y}}}\right) - 1 \]
      6. sqrt-unprod34.1%

        \[\leadsto \left(1 + x \cdot \frac{t}{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}}\right) - 1 \]
      7. sqr-neg34.1%

        \[\leadsto \left(1 + x \cdot \frac{t}{\sqrt{\color{blue}{y \cdot y}}}\right) - 1 \]
      8. sqrt-unprod8.5%

        \[\leadsto \left(1 + x \cdot \frac{t}{\color{blue}{\sqrt{y} \cdot \sqrt{y}}}\right) - 1 \]
      9. add-sqr-sqrt16.5%

        \[\leadsto \left(1 + x \cdot \frac{t}{\color{blue}{y}}\right) - 1 \]
    14. Applied egg-rr16.5%

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

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

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

        \[\leadsto x \cdot \frac{t}{y} + \color{blue}{0} \]
      4. +-rgt-identity16.5%

        \[\leadsto \color{blue}{x \cdot \frac{t}{y}} \]
      5. *-commutative16.5%

        \[\leadsto \color{blue}{\frac{t}{y} \cdot x} \]
      6. associate-*l/16.5%

        \[\leadsto \color{blue}{\frac{t \cdot x}{y}} \]
      7. associate-*r/23.1%

        \[\leadsto \color{blue}{t \cdot \frac{x}{y}} \]
    16. Simplified23.1%

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

    if -4.00000000000000007e234 < (/.f64 x y) < 1.00000000000000006e-9

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

    if 1.00000000000000006e-9 < (/.f64 x y)

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x}{y}} \]
      3. associate-/l*48.5%

        \[\leadsto t - \color{blue}{\frac{t}{\frac{y}{x}}} \]
      4. associate-/r/42.2%

        \[\leadsto t - \color{blue}{\frac{t}{y} \cdot x} \]
    6. Simplified42.2%

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

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

        \[\leadsto t - \color{blue}{t \cdot \frac{x}{y}} \]
    9. Simplified48.5%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{y}} \]
    11. Step-by-step derivation
      1. associate-*l/42.2%

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{t}{y} \cdot x\right)} \]
      2. associate-*r*42.2%

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

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

        \[\leadsto \color{blue}{x \cdot \left(-\frac{t}{y}\right)} \]
      5. *-rgt-identity42.2%

        \[\leadsto x \cdot \left(-\color{blue}{\frac{t}{y} \cdot 1}\right) \]
      6. *-commutative42.2%

        \[\leadsto x \cdot \left(-\color{blue}{1 \cdot \frac{t}{y}}\right) \]
      7. metadata-eval42.2%

        \[\leadsto x \cdot \left(-\color{blue}{\frac{-1}{-1}} \cdot \frac{t}{y}\right) \]
      8. times-frac42.2%

        \[\leadsto x \cdot \left(-\color{blue}{\frac{-1 \cdot t}{-1 \cdot y}}\right) \]
      9. neg-mul-142.2%

        \[\leadsto x \cdot \left(-\frac{\color{blue}{-t}}{-1 \cdot y}\right) \]
      10. neg-mul-142.2%

        \[\leadsto x \cdot \left(-\frac{-t}{\color{blue}{-y}}\right) \]
      11. distribute-frac-neg42.2%

        \[\leadsto x \cdot \color{blue}{\frac{-\left(-t\right)}{-y}} \]
      12. remove-double-neg42.2%

        \[\leadsto x \cdot \frac{\color{blue}{t}}{-y} \]
    12. Simplified42.2%

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

        \[\leadsto \color{blue}{\frac{x \cdot t}{-y}} \]
      2. add-sqr-sqrt9.1%

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

        \[\leadsto \frac{x \cdot t}{\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}}} \]
      4. sqr-neg13.7%

        \[\leadsto \frac{x \cdot t}{\sqrt{\color{blue}{y \cdot y}}} \]
      5. sqrt-unprod7.8%

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

        \[\leadsto \frac{x \cdot t}{\color{blue}{y}} \]
    14. Applied egg-rr15.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x}{y} \leq -4 \cdot 10^{+234}:\\ \;\;\;\;\frac{x}{y} \cdot t\\ \mathbf{elif}\;\frac{x}{y} \leq 10^{-9}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot t}{y}\\ \end{array} \]

Alternative 6: 86.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -15200:\\
\;\;\;\;t + \frac{z}{\frac{y}{x}}\\

\mathbf{elif}\;z \leq 1.1:\\
\;\;\;\;t - \frac{x}{y} \cdot t\\

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


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

    1. Initial program 96.1%

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{y}{x}}} + t \]
    4. Simplified88.1%

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

    if -15200 < z < 1.1000000000000001

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x}{y}} \]
      3. associate-/l*86.8%

        \[\leadsto t - \color{blue}{\frac{t}{\frac{y}{x}}} \]
      4. associate-/r/83.9%

        \[\leadsto t - \color{blue}{\frac{t}{y} \cdot x} \]
    6. Simplified83.9%

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

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

        \[\leadsto t - \color{blue}{t \cdot \frac{x}{y}} \]
    9. Simplified86.3%

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

    if 1.1000000000000001 < z

    1. Initial program 98.4%

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

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

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

      \[\leadsto \color{blue}{\frac{z}{\frac{y}{x}}} + t \]
    5. Step-by-step derivation
      1. clear-num94.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -15200:\\ \;\;\;\;t + \frac{z}{\frac{y}{x}}\\ \mathbf{elif}\;z \leq 1.1:\\ \;\;\;\;t - \frac{x}{y} \cdot t\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x}{y} \cdot z\\ \end{array} \]

Alternative 7: 86.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8000:\\
\;\;\;\;t + \frac{z}{\frac{y}{x}}\\

\mathbf{elif}\;z \leq 61000:\\
\;\;\;\;t - \frac{t}{\frac{y}{x}}\\

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


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

    1. Initial program 96.1%

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{y}{x}}} + t \]
    4. Simplified88.1%

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

    if -8e3 < z < 61000

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot x}{y}} \]
      3. associate-/l*86.8%

        \[\leadsto t - \color{blue}{\frac{t}{\frac{y}{x}}} \]
      4. associate-/r/83.9%

        \[\leadsto t - \color{blue}{\frac{t}{y} \cdot x} \]
    6. Simplified83.9%

      \[\leadsto \color{blue}{t - \frac{t}{y} \cdot x} \]
    7. Step-by-step derivation
      1. associate-/r/86.8%

        \[\leadsto t - \color{blue}{\frac{t}{\frac{y}{x}}} \]
    8. Applied egg-rr86.8%

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

    if 61000 < z

    1. Initial program 98.4%

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

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

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

      \[\leadsto \color{blue}{\frac{z}{\frac{y}{x}}} + t \]
    5. Step-by-step derivation
      1. clear-num94.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8000:\\ \;\;\;\;t + \frac{z}{\frac{y}{x}}\\ \mathbf{elif}\;z \leq 61000:\\ \;\;\;\;t - \frac{t}{\frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x}{y} \cdot z\\ \end{array} \]

Alternative 8: 77.0% accurate, 1.3× speedup?

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{\frac{y}{x}}} + t \]
  4. Simplified80.5%

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

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

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

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

    \[\leadsto \color{blue}{\frac{x}{y} \cdot z} + t \]
  7. Final simplification80.5%

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

Alternative 9: 76.7% accurate, 1.3× speedup?

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{\frac{y}{x}}} + t \]
  4. Simplified80.5%

    \[\leadsto \color{blue}{\frac{z}{\frac{y}{x}}} + t \]
  5. Final simplification80.5%

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

Alternative 10: 38.8% accurate, 9.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
	return t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = t
end function
public static double code(double x, double y, double z, double t) {
	return t;
}
def code(x, y, z, t):
	return t
function code(x, y, z, t)
	return t
end
function tmp = code(x, y, z, t)
	tmp = t;
end
code[x_, y_, z_, t_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 97.3%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{t} \]
  5. Final simplification38.9%

    \[\leadsto t \]

Developer target: 97.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{y} \cdot \left(z - t\right) + t\\ \mathbf{if}\;z < 2.759456554562692 \cdot 10^{-282}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z < 2.326994450874436 \cdot 10^{-110}:\\ \;\;\;\;x \cdot \frac{z - t}{y} + t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ (* (/ x y) (- z t)) t)))
   (if (< z 2.759456554562692e-282)
     t_1
     (if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = ((x / y) * (z - t)) + t;
	double tmp;
	if (z < 2.759456554562692e-282) {
		tmp = t_1;
	} else if (z < 2.326994450874436e-110) {
		tmp = (x * ((z - t) / y)) + t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((x / y) * (z - t)) + t
    if (z < 2.759456554562692d-282) then
        tmp = t_1
    else if (z < 2.326994450874436d-110) then
        tmp = (x * ((z - t) / y)) + t
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = ((x / y) * (z - t)) + t;
	double tmp;
	if (z < 2.759456554562692e-282) {
		tmp = t_1;
	} else if (z < 2.326994450874436e-110) {
		tmp = (x * ((z - t) / y)) + t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = ((x / y) * (z - t)) + t
	tmp = 0
	if z < 2.759456554562692e-282:
		tmp = t_1
	elif z < 2.326994450874436e-110:
		tmp = (x * ((z - t) / y)) + t
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(Float64(x / y) * Float64(z - t)) + t)
	tmp = 0.0
	if (z < 2.759456554562692e-282)
		tmp = t_1;
	elseif (z < 2.326994450874436e-110)
		tmp = Float64(Float64(x * Float64(Float64(z - t) / y)) + t);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = ((x / y) * (z - t)) + t;
	tmp = 0.0;
	if (z < 2.759456554562692e-282)
		tmp = t_1;
	elseif (z < 2.326994450874436e-110)
		tmp = (x * ((z - t) / y)) + t;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(x / y), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, If[Less[z, 2.759456554562692e-282], t$95$1, If[Less[z, 2.326994450874436e-110], N[(N[(x * N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x}{y} \cdot \left(z - t\right) + t\\
\mathbf{if}\;z < 2.759456554562692 \cdot 10^{-282}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z < 2.326994450874436 \cdot 10^{-110}:\\
\;\;\;\;x \cdot \frac{z - t}{y} + t\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023230 
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
  :precision binary64

  :herbie-target
  (if (< z 2.759456554562692e-282) (+ (* (/ x y) (- z t)) t) (if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) (+ (* (/ x y) (- z t)) t)))

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