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

Percentage Accurate: 96.9% → 96.9%
Time: 10.3s
Alternatives: 14
Speedup: 1.0×

Specification

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

\\
\frac{x - y}{z - y} \cdot 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 14 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: 96.9% accurate, 1.0× speedup?

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

\\
\frac{x - y}{z - y} \cdot t
\end{array}

Alternative 1: 96.9% accurate, 1.0× speedup?

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

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

    \[\frac{x - y}{z - y} \cdot t \]
  2. Add Preprocessing
  3. Final simplification96.5%

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

Alternative 2: 67.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{x}{z - y}\\ \mathbf{if}\;y \leq -1.25 \cdot 10^{+174}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{+128}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+27}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+105}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (/ x (- z y)))))
   (if (<= y -1.25e+174)
     t
     (if (<= y -2.2e+128)
       t_1
       (if (<= y -2.8e+37)
         t
         (if (<= y 4.8e+27)
           t_1
           (if (<= y 1.6e+105) (* t (/ (- x y) z)) t)))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (x / (z - y));
	double tmp;
	if (y <= -1.25e+174) {
		tmp = t;
	} else if (y <= -2.2e+128) {
		tmp = t_1;
	} else if (y <= -2.8e+37) {
		tmp = t;
	} else if (y <= 4.8e+27) {
		tmp = t_1;
	} else if (y <= 1.6e+105) {
		tmp = t * ((x - y) / z);
	} 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) :: t_1
    real(8) :: tmp
    t_1 = t * (x / (z - y))
    if (y <= (-1.25d+174)) then
        tmp = t
    else if (y <= (-2.2d+128)) then
        tmp = t_1
    else if (y <= (-2.8d+37)) then
        tmp = t
    else if (y <= 4.8d+27) then
        tmp = t_1
    else if (y <= 1.6d+105) then
        tmp = t * ((x - y) / z)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t * (x / (z - y));
	double tmp;
	if (y <= -1.25e+174) {
		tmp = t;
	} else if (y <= -2.2e+128) {
		tmp = t_1;
	} else if (y <= -2.8e+37) {
		tmp = t;
	} else if (y <= 4.8e+27) {
		tmp = t_1;
	} else if (y <= 1.6e+105) {
		tmp = t * ((x - y) / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (x / (z - y))
	tmp = 0
	if y <= -1.25e+174:
		tmp = t
	elif y <= -2.2e+128:
		tmp = t_1
	elif y <= -2.8e+37:
		tmp = t
	elif y <= 4.8e+27:
		tmp = t_1
	elif y <= 1.6e+105:
		tmp = t * ((x - y) / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(x / Float64(z - y)))
	tmp = 0.0
	if (y <= -1.25e+174)
		tmp = t;
	elseif (y <= -2.2e+128)
		tmp = t_1;
	elseif (y <= -2.8e+37)
		tmp = t;
	elseif (y <= 4.8e+27)
		tmp = t_1;
	elseif (y <= 1.6e+105)
		tmp = Float64(t * Float64(Float64(x - y) / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (x / (z - y));
	tmp = 0.0;
	if (y <= -1.25e+174)
		tmp = t;
	elseif (y <= -2.2e+128)
		tmp = t_1;
	elseif (y <= -2.8e+37)
		tmp = t;
	elseif (y <= 4.8e+27)
		tmp = t_1;
	elseif (y <= 1.6e+105)
		tmp = t * ((x - y) / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.25e+174], t, If[LessEqual[y, -2.2e+128], t$95$1, If[LessEqual[y, -2.8e+37], t, If[LessEqual[y, 4.8e+27], t$95$1, If[LessEqual[y, 1.6e+105], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2.2 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.8 \cdot 10^{+37}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.6 \cdot 10^{+105}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.2499999999999999e174 or -2.20000000000000017e128 < y < -2.7999999999999998e37 or 1.6e105 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/70.2%

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

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

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

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

    if -1.2499999999999999e174 < y < -2.20000000000000017e128 or -2.7999999999999998e37 < y < 4.79999999999999995e27

    1. Initial program 94.5%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 69.1%

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

    if 4.79999999999999995e27 < y < 1.6e105

    1. Initial program 99.5%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 57.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+174}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{+128}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+27}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+105}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 67.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{x}{z - y}\\ \mathbf{if}\;y \leq -1.4 \cdot 10^{+174}:\\ \;\;\;\;t + t \cdot \frac{z}{y}\\ \mathbf{elif}\;y \leq -1.52 \cdot 10^{+128}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{+34}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+105}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (/ x (- z y)))))
   (if (<= y -1.4e+174)
     (+ t (* t (/ z y)))
     (if (<= y -1.52e+128)
       t_1
       (if (<= y -5.8e+34)
         t
         (if (<= y 1.7e+28)
           t_1
           (if (<= y 1.85e+105) (* t (/ (- x y) z)) t)))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (x / (z - y));
	double tmp;
	if (y <= -1.4e+174) {
		tmp = t + (t * (z / y));
	} else if (y <= -1.52e+128) {
		tmp = t_1;
	} else if (y <= -5.8e+34) {
		tmp = t;
	} else if (y <= 1.7e+28) {
		tmp = t_1;
	} else if (y <= 1.85e+105) {
		tmp = t * ((x - y) / z);
	} 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) :: t_1
    real(8) :: tmp
    t_1 = t * (x / (z - y))
    if (y <= (-1.4d+174)) then
        tmp = t + (t * (z / y))
    else if (y <= (-1.52d+128)) then
        tmp = t_1
    else if (y <= (-5.8d+34)) then
        tmp = t
    else if (y <= 1.7d+28) then
        tmp = t_1
    else if (y <= 1.85d+105) then
        tmp = t * ((x - y) / z)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t * (x / (z - y));
	double tmp;
	if (y <= -1.4e+174) {
		tmp = t + (t * (z / y));
	} else if (y <= -1.52e+128) {
		tmp = t_1;
	} else if (y <= -5.8e+34) {
		tmp = t;
	} else if (y <= 1.7e+28) {
		tmp = t_1;
	} else if (y <= 1.85e+105) {
		tmp = t * ((x - y) / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (x / (z - y))
	tmp = 0
	if y <= -1.4e+174:
		tmp = t + (t * (z / y))
	elif y <= -1.52e+128:
		tmp = t_1
	elif y <= -5.8e+34:
		tmp = t
	elif y <= 1.7e+28:
		tmp = t_1
	elif y <= 1.85e+105:
		tmp = t * ((x - y) / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(x / Float64(z - y)))
	tmp = 0.0
	if (y <= -1.4e+174)
		tmp = Float64(t + Float64(t * Float64(z / y)));
	elseif (y <= -1.52e+128)
		tmp = t_1;
	elseif (y <= -5.8e+34)
		tmp = t;
	elseif (y <= 1.7e+28)
		tmp = t_1;
	elseif (y <= 1.85e+105)
		tmp = Float64(t * Float64(Float64(x - y) / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (x / (z - y));
	tmp = 0.0;
	if (y <= -1.4e+174)
		tmp = t + (t * (z / y));
	elseif (y <= -1.52e+128)
		tmp = t_1;
	elseif (y <= -5.8e+34)
		tmp = t;
	elseif (y <= 1.7e+28)
		tmp = t_1;
	elseif (y <= 1.85e+105)
		tmp = t * ((x - y) / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.4e+174], N[(t + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.52e+128], t$95$1, If[LessEqual[y, -5.8e+34], t, If[LessEqual[y, 1.7e+28], t$95$1, If[LessEqual[y, 1.85e+105], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.52 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -5.8 \cdot 10^{+34}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 1.7 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.4e174

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/62.1%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/62.1%

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \]
      5. un-div-inv99.8%

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z - y}{y}}} \]
    8. Step-by-step derivation
      1. mul-1-neg95.3%

        \[\leadsto \frac{t}{\color{blue}{-\frac{z - y}{y}}} \]
      2. div-sub95.3%

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

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

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

        \[\leadsto \frac{t}{-\left(\frac{z}{y} + \color{blue}{-1}\right)} \]
    9. Simplified95.3%

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

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

        \[\leadsto t + \color{blue}{t \cdot \frac{z}{y}} \]
    12. Simplified75.2%

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

    if -1.4e174 < y < -1.51999999999999992e128 or -5.8000000000000003e34 < y < 1.7e28

    1. Initial program 94.5%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 69.1%

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

    if -1.51999999999999992e128 < y < -5.8000000000000003e34 or 1.84999999999999992e105 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/73.3%

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

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

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

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

    if 1.7e28 < y < 1.84999999999999992e105

    1. Initial program 99.5%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 57.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{+174}:\\ \;\;\;\;t + t \cdot \frac{z}{y}\\ \mathbf{elif}\;y \leq -1.52 \cdot 10^{+128}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{+34}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+28}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{+105}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 67.1% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.88 \cdot 10^{+174}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -2.45 \cdot 10^{+128} \lor \neg \left(y \leq -1.8 \cdot 10^{+38}\right) \land y \leq 3 \cdot 10^{+21}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.88000000000000006e174 or -2.45000000000000009e128 < y < -1.79999999999999985e38 or 3e21 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/74.4%

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

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

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

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

    if -1.88000000000000006e174 < y < -2.45000000000000009e128 or -1.79999999999999985e38 < y < 3e21

    1. Initial program 94.4%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 69.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.88 \cdot 10^{+174}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.45 \cdot 10^{+128} \lor \neg \left(y \leq -1.8 \cdot 10^{+38}\right) \land y \leq 3 \cdot 10^{+21}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.3% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{+189}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -9 \cdot 10^{+164}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\

\mathbf{elif}\;y \leq -1.85 \cdot 10^{-75} \lor \neg \left(y \leq 9.2 \cdot 10^{+20}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.90000000000000019e189 or -8.9999999999999995e164 < y < -1.85000000000000012e-75 or 9.2e20 < y

    1. Initial program 99.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/80.6%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/80.6%

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \]
      5. un-div-inv99.8%

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z - y}{y}}} \]
    8. Step-by-step derivation
      1. mul-1-neg82.6%

        \[\leadsto \frac{t}{\color{blue}{-\frac{z - y}{y}}} \]
      2. div-sub82.7%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{z}{y} - \frac{y}{y}\right)}} \]
      3. sub-neg82.7%

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

        \[\leadsto \frac{t}{-\left(\frac{z}{y} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval82.7%

        \[\leadsto \frac{t}{-\left(\frac{z}{y} + \color{blue}{-1}\right)} \]
    9. Simplified82.7%

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

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

    if -2.90000000000000019e189 < y < -8.9999999999999995e164

    1. Initial program 100.0%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 100.0%

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

        \[\leadsto \color{blue}{\left(-\frac{x - y}{y}\right)} \cdot t \]
      2. div-sub100.0%

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

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

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

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

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

    if -1.85000000000000012e-75 < y < 9.2e20

    1. Initial program 92.3%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/89.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{+189}:\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{+164}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{-75} \lor \neg \left(y \leq 9.2 \cdot 10^{+20}\right):\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot t}{z - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 74.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{1 - \frac{z}{y}}\\ \mathbf{if}\;y \leq -8.2 \cdot 10^{+186}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{+163}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{-75}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{+21}:\\ \;\;\;\;\frac{x \cdot t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ t (- 1.0 (/ z y)))))
   (if (<= y -8.2e+186)
     t_1
     (if (<= y -7.5e+163)
       (* t (- 1.0 (/ x y)))
       (if (<= y -1.85e-75)
         (* t (/ y (- y z)))
         (if (<= y 3.8e+21) (/ (* x t) (- z y)) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = t / (1.0 - (z / y));
	double tmp;
	if (y <= -8.2e+186) {
		tmp = t_1;
	} else if (y <= -7.5e+163) {
		tmp = t * (1.0 - (x / y));
	} else if (y <= -1.85e-75) {
		tmp = t * (y / (y - z));
	} else if (y <= 3.8e+21) {
		tmp = (x * t) / (z - y);
	} 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 = t / (1.0d0 - (z / y))
    if (y <= (-8.2d+186)) then
        tmp = t_1
    else if (y <= (-7.5d+163)) then
        tmp = t * (1.0d0 - (x / y))
    else if (y <= (-1.85d-75)) then
        tmp = t * (y / (y - z))
    else if (y <= 3.8d+21) then
        tmp = (x * t) / (z - y)
    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 = t / (1.0 - (z / y));
	double tmp;
	if (y <= -8.2e+186) {
		tmp = t_1;
	} else if (y <= -7.5e+163) {
		tmp = t * (1.0 - (x / y));
	} else if (y <= -1.85e-75) {
		tmp = t * (y / (y - z));
	} else if (y <= 3.8e+21) {
		tmp = (x * t) / (z - y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t / (1.0 - (z / y))
	tmp = 0
	if y <= -8.2e+186:
		tmp = t_1
	elif y <= -7.5e+163:
		tmp = t * (1.0 - (x / y))
	elif y <= -1.85e-75:
		tmp = t * (y / (y - z))
	elif y <= 3.8e+21:
		tmp = (x * t) / (z - y)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t / Float64(1.0 - Float64(z / y)))
	tmp = 0.0
	if (y <= -8.2e+186)
		tmp = t_1;
	elseif (y <= -7.5e+163)
		tmp = Float64(t * Float64(1.0 - Float64(x / y)));
	elseif (y <= -1.85e-75)
		tmp = Float64(t * Float64(y / Float64(y - z)));
	elseif (y <= 3.8e+21)
		tmp = Float64(Float64(x * t) / Float64(z - y));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t / (1.0 - (z / y));
	tmp = 0.0;
	if (y <= -8.2e+186)
		tmp = t_1;
	elseif (y <= -7.5e+163)
		tmp = t * (1.0 - (x / y));
	elseif (y <= -1.85e-75)
		tmp = t * (y / (y - z));
	elseif (y <= 3.8e+21)
		tmp = (x * t) / (z - y);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.2e+186], t$95$1, If[LessEqual[y, -7.5e+163], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.85e-75], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+21], N[(N[(x * t), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{+186}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -7.5 \cdot 10^{+163}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\

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

\mathbf{elif}\;y \leq 3.8 \cdot 10^{+21}:\\
\;\;\;\;\frac{x \cdot t}{z - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -8.2e186 or 3.8e21 < y

    1. Initial program 99.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/70.9%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/70.9%

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \]
      5. un-div-inv99.8%

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z - y}{y}}} \]
    8. Step-by-step derivation
      1. mul-1-neg89.5%

        \[\leadsto \frac{t}{\color{blue}{-\frac{z - y}{y}}} \]
      2. div-sub89.5%

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

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{z}{y} + \left(-\frac{y}{y}\right)\right)}} \]
      4. *-inverses89.5%

        \[\leadsto \frac{t}{-\left(\frac{z}{y} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval89.5%

        \[\leadsto \frac{t}{-\left(\frac{z}{y} + \color{blue}{-1}\right)} \]
    9. Simplified89.5%

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

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

    if -8.2e186 < y < -7.50000000000000001e163

    1. Initial program 100.0%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 100.0%

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

        \[\leadsto \color{blue}{\left(-\frac{x - y}{y}\right)} \cdot t \]
      2. div-sub100.0%

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

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

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

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

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

    if -7.50000000000000001e163 < y < -1.85000000000000012e-75

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 72.8%

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y}{z - y}\right)} \cdot t \]
    4. Step-by-step derivation
      1. neg-mul-172.8%

        \[\leadsto \color{blue}{\left(-\frac{y}{z - y}\right)} \cdot t \]
      2. distribute-neg-frac272.8%

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

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

    if -1.85000000000000012e-75 < y < 3.8e21

    1. Initial program 92.3%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/89.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{+186}:\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{+163}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{-75}:\\ \;\;\;\;t \cdot \frac{y}{y - z}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{+21}:\\ \;\;\;\;\frac{x \cdot t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 60.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{+32}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -4.2 \cdot 10^{-71}:\\
\;\;\;\;\frac{t}{z} \cdot \left(-y\right)\\

\mathbf{elif}\;y \leq -1.55 \cdot 10^{-91}:\\
\;\;\;\;\frac{x \cdot t}{-y}\\

\mathbf{elif}\;y \leq 9.2 \cdot 10^{+20}:\\
\;\;\;\;t \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -8.80000000000000004e32 or 9.2e20 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/75.9%

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

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

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

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

    if -8.80000000000000004e32 < y < -4.2000000000000002e-71

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t \cdot y}}{z} \]
      3. distribute-rgt-neg-out52.2%

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

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \left(-y\right)} \]
    10. Simplified52.4%

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

    if -4.2000000000000002e-71 < y < -1.5499999999999999e-91

    1. Initial program 87.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/91.4%

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

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

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

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

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

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

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

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

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

    if -1.5499999999999999e-91 < y < 9.2e20

    1. Initial program 92.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 65.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.8 \cdot 10^{+32}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-71}:\\ \;\;\;\;\frac{t}{z} \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{-91}:\\ \;\;\;\;\frac{x \cdot t}{-y}\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{+20}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 89.8% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+187}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -7.5 \cdot 10^{+163}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.35000000000000004e187 or 1.65000000000000004e103 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/64.6%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/64.6%

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-\frac{z - y}{y}}} \]
      2. div-sub97.2%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{z}{y} - \frac{y}{y}\right)}} \]
      3. sub-neg97.2%

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

        \[\leadsto \frac{t}{-\left(\frac{z}{y} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval97.2%

        \[\leadsto \frac{t}{-\left(\frac{z}{y} + \color{blue}{-1}\right)} \]
    9. Simplified97.2%

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

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

    if -1.35000000000000004e187 < y < -7.50000000000000001e163

    1. Initial program 100.0%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 100.0%

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

        \[\leadsto \color{blue}{\left(-\frac{x - y}{y}\right)} \cdot t \]
      2. div-sub100.0%

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

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

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

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

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

    if -7.50000000000000001e163 < y < 1.65000000000000004e103

    1. Initial program 95.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+187}:\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{+163}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+103}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{1 - \frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 74.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{-75} \lor \neg \left(y \leq 2.6 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.85000000000000012e-75 or 2.6e20 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/81.0%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/81.0%

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \]
      5. un-div-inv99.8%

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z - y}{y}}} \]
    8. Step-by-step derivation
      1. mul-1-neg80.2%

        \[\leadsto \frac{t}{\color{blue}{-\frac{z - y}{y}}} \]
      2. div-sub80.2%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{z}{y} - \frac{y}{y}\right)}} \]
      3. sub-neg80.2%

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

        \[\leadsto \frac{t}{-\left(\frac{z}{y} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval80.2%

        \[\leadsto \frac{t}{-\left(\frac{z}{y} + \color{blue}{-1}\right)} \]
    9. Simplified80.2%

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

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

    if -1.85000000000000012e-75 < y < 2.6e20

    1. Initial program 92.3%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 75.5%

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

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

Alternative 10: 74.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{-75} \lor \neg \left(y \leq 3.8 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.85000000000000012e-75 or 3.8e20 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/81.0%

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

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

      \[\leadsto \color{blue}{\left(x - y\right) \cdot \frac{t}{z - y}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-*r/81.0%

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \]
      5. un-div-inv99.8%

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

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

      \[\leadsto \frac{t}{\color{blue}{-1 \cdot \frac{z - y}{y}}} \]
    8. Step-by-step derivation
      1. mul-1-neg80.2%

        \[\leadsto \frac{t}{\color{blue}{-\frac{z - y}{y}}} \]
      2. div-sub80.2%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{z}{y} - \frac{y}{y}\right)}} \]
      3. sub-neg80.2%

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

        \[\leadsto \frac{t}{-\left(\frac{z}{y} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval80.2%

        \[\leadsto \frac{t}{-\left(\frac{z}{y} + \color{blue}{-1}\right)} \]
    9. Simplified80.2%

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

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

    if -1.85000000000000012e-75 < y < 3.8e20

    1. Initial program 92.3%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/89.9%

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

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

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

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

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

Alternative 11: 66.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+37}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.85e37 or 9.49999999999999922e103 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/72.8%

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

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

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

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

    if -1.85e37 < y < 9.49999999999999922e103

    1. Initial program 94.7%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/91.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.85 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+103}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 60.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+31}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 3.8 \cdot 10^{+20}:\\
\;\;\;\;x \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.49999999999999947e31 or 3.8e20 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/75.9%

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

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

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

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

    if -8.49999999999999947e31 < y < 3.8e20

    1. Initial program 93.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/92.0%

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{t}{z}} \]
    7. Simplified55.9%

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

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

Alternative 13: 61.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+36}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 6.5 \cdot 10^{+20}:\\
\;\;\;\;t \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.79999999999999985e36 or 6.5e20 < y

    1. Initial program 99.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Step-by-step derivation
      1. associate-*l/75.9%

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

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

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

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

    if -4.79999999999999985e36 < y < 6.5e20

    1. Initial program 93.9%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 58.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+36}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+20}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 35.0% 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 96.5%

    \[\frac{x - y}{z - y} \cdot t \]
  2. Step-by-step derivation
    1. associate-*l/85.1%

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

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

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

    \[\leadsto \color{blue}{t} \]
  6. Final simplification37.1%

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 96.9% accurate, 1.0× speedup?

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

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

Reproduce

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

  :alt
  (/ t (/ (- z y) (- x y)))

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