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

Percentage Accurate: 97.2% → 97.3%
Time: 10.4s
Alternatives: 17
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 17 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.2% 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: 97.3% 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}
Derivation
  1. Initial program 97.5%

    \[\frac{x - y}{z - y} \cdot t \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. *-commutative97.5%

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

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

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

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

Alternative 2: 59.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\frac{z}{x}}\\ \mathbf{if}\;y \leq -3.9 \cdot 10^{+124}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.92 \cdot 10^{+74}:\\ \;\;\;\;t \cdot \frac{x}{-y}\\ \mathbf{elif}\;y \leq -6.6 \cdot 10^{+41}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.36:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{-38}:\\ \;\;\;\;x \cdot \frac{t}{-y}\\ \mathbf{elif}\;y \leq -1.25 \cdot 10^{-73}:\\ \;\;\;\;\frac{y}{\frac{z}{-t}}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-114}:\\ \;\;\;\;\frac{t \cdot \left(-x\right)}{y}\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{+94}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ t (/ z x))))
   (if (<= y -3.9e+124)
     t
     (if (<= y -1.92e+74)
       (* t (/ x (- y)))
       (if (<= y -6.6e+41)
         t
         (if (<= y -1.36)
           t_1
           (if (<= y -9.8e-38)
             (* x (/ t (- y)))
             (if (<= y -1.25e-73)
               (/ y (/ z (- t)))
               (if (<= y -7.5e-114)
                 (/ (* t (- x)) y)
                 (if (<= y 6.6e+94) t_1 t))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = t / (z / x);
	double tmp;
	if (y <= -3.9e+124) {
		tmp = t;
	} else if (y <= -1.92e+74) {
		tmp = t * (x / -y);
	} else if (y <= -6.6e+41) {
		tmp = t;
	} else if (y <= -1.36) {
		tmp = t_1;
	} else if (y <= -9.8e-38) {
		tmp = x * (t / -y);
	} else if (y <= -1.25e-73) {
		tmp = y / (z / -t);
	} else if (y <= -7.5e-114) {
		tmp = (t * -x) / y;
	} else if (y <= 6.6e+94) {
		tmp = t_1;
	} 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 / (z / x)
    if (y <= (-3.9d+124)) then
        tmp = t
    else if (y <= (-1.92d+74)) then
        tmp = t * (x / -y)
    else if (y <= (-6.6d+41)) then
        tmp = t
    else if (y <= (-1.36d0)) then
        tmp = t_1
    else if (y <= (-9.8d-38)) then
        tmp = x * (t / -y)
    else if (y <= (-1.25d-73)) then
        tmp = y / (z / -t)
    else if (y <= (-7.5d-114)) then
        tmp = (t * -x) / y
    else if (y <= 6.6d+94) then
        tmp = t_1
    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 / (z / x);
	double tmp;
	if (y <= -3.9e+124) {
		tmp = t;
	} else if (y <= -1.92e+74) {
		tmp = t * (x / -y);
	} else if (y <= -6.6e+41) {
		tmp = t;
	} else if (y <= -1.36) {
		tmp = t_1;
	} else if (y <= -9.8e-38) {
		tmp = x * (t / -y);
	} else if (y <= -1.25e-73) {
		tmp = y / (z / -t);
	} else if (y <= -7.5e-114) {
		tmp = (t * -x) / y;
	} else if (y <= 6.6e+94) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t / (z / x)
	tmp = 0
	if y <= -3.9e+124:
		tmp = t
	elif y <= -1.92e+74:
		tmp = t * (x / -y)
	elif y <= -6.6e+41:
		tmp = t
	elif y <= -1.36:
		tmp = t_1
	elif y <= -9.8e-38:
		tmp = x * (t / -y)
	elif y <= -1.25e-73:
		tmp = y / (z / -t)
	elif y <= -7.5e-114:
		tmp = (t * -x) / y
	elif y <= 6.6e+94:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t / Float64(z / x))
	tmp = 0.0
	if (y <= -3.9e+124)
		tmp = t;
	elseif (y <= -1.92e+74)
		tmp = Float64(t * Float64(x / Float64(-y)));
	elseif (y <= -6.6e+41)
		tmp = t;
	elseif (y <= -1.36)
		tmp = t_1;
	elseif (y <= -9.8e-38)
		tmp = Float64(x * Float64(t / Float64(-y)));
	elseif (y <= -1.25e-73)
		tmp = Float64(y / Float64(z / Float64(-t)));
	elseif (y <= -7.5e-114)
		tmp = Float64(Float64(t * Float64(-x)) / y);
	elseif (y <= 6.6e+94)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t / (z / x);
	tmp = 0.0;
	if (y <= -3.9e+124)
		tmp = t;
	elseif (y <= -1.92e+74)
		tmp = t * (x / -y);
	elseif (y <= -6.6e+41)
		tmp = t;
	elseif (y <= -1.36)
		tmp = t_1;
	elseif (y <= -9.8e-38)
		tmp = x * (t / -y);
	elseif (y <= -1.25e-73)
		tmp = y / (z / -t);
	elseif (y <= -7.5e-114)
		tmp = (t * -x) / y;
	elseif (y <= 6.6e+94)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.9e+124], t, If[LessEqual[y, -1.92e+74], N[(t * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.6e+41], t, If[LessEqual[y, -1.36], t$95$1, If[LessEqual[y, -9.8e-38], N[(x * N[(t / (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.25e-73], N[(y / N[(z / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.5e-114], N[(N[(t * (-x)), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 6.6e+94], t$95$1, t]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.92 \cdot 10^{+74}:\\
\;\;\;\;t \cdot \frac{x}{-y}\\

\mathbf{elif}\;y \leq -6.6 \cdot 10^{+41}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -1.36:\\
\;\;\;\;t\_1\\

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

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

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

\mathbf{elif}\;y \leq 6.6 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -3.9e124 or -1.92000000000000002e74 < y < -6.6000000000000001e41 or 6.6e94 < y

    1. Initial program 100.0%

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

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

    if -3.9e124 < y < -1.92000000000000002e74

    1. Initial program 99.6%

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

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

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

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

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

    if -6.6000000000000001e41 < y < -1.3600000000000001 or -7.5000000000000002e-114 < y < 6.6e94

    1. Initial program 95.1%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative95.1%

        \[\leadsto \color{blue}{t \cdot \frac{x - y}{z - y}} \]
      2. clear-num95.1%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \]
      3. un-div-inv95.4%

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

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

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

    if -1.3600000000000001 < y < -9.80000000000000078e-38

    1. Initial program 100.0%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot t}{y}} \]
      2. mul-1-neg57.4%

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

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

    if -9.80000000000000078e-38 < y < -1.25e-73

    1. Initial program 99.4%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative99.4%

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x - y}}} \]
    5. Taylor expanded in z around inf 99.4%

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

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

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

        \[\leadsto \frac{t}{\color{blue}{\frac{z}{-y}}} \]
    8. Simplified90.3%

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

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

        \[\leadsto \color{blue}{-\frac{t}{z} \cdot y} \]
      3. add-sqr-sqrt0.0%

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

        \[\leadsto -\frac{t}{z} \cdot \color{blue}{\sqrt{y \cdot y}} \]
      5. sqr-neg23.0%

        \[\leadsto -\frac{t}{z} \cdot \sqrt{\color{blue}{\left(-y\right) \cdot \left(-y\right)}} \]
      6. sqrt-unprod23.0%

        \[\leadsto -\frac{t}{z} \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)} \]
      7. add-sqr-sqrt23.0%

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

        \[\leadsto -\color{blue}{\left(-y\right) \cdot \frac{t}{z}} \]
      9. add-sqr-sqrt23.0%

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

        \[\leadsto -\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}} \cdot \frac{t}{z} \]
      11. sqr-neg23.0%

        \[\leadsto -\sqrt{\color{blue}{y \cdot y}} \cdot \frac{t}{z} \]
      12. sqrt-unprod0.0%

        \[\leadsto -\color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot \frac{t}{z} \]
      13. add-sqr-sqrt90.0%

        \[\leadsto -\color{blue}{y} \cdot \frac{t}{z} \]
      14. clear-num90.0%

        \[\leadsto -y \cdot \color{blue}{\frac{1}{\frac{z}{t}}} \]
      15. div-inv90.3%

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

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

    if -1.25e-73 < y < -7.5000000000000002e-114

    1. Initial program 100.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{+124}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.92 \cdot 10^{+74}:\\ \;\;\;\;t \cdot \frac{x}{-y}\\ \mathbf{elif}\;y \leq -6.6 \cdot 10^{+41}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.36:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq -9.8 \cdot 10^{-38}:\\ \;\;\;\;x \cdot \frac{t}{-y}\\ \mathbf{elif}\;y \leq -1.25 \cdot 10^{-73}:\\ \;\;\;\;\frac{y}{\frac{z}{-t}}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-114}:\\ \;\;\;\;\frac{t \cdot \left(-x\right)}{y}\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{+94}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 59.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\frac{z}{x}}\\ t_2 := t \cdot \frac{x}{-y}\\ \mathbf{if}\;y \leq -3.2 \cdot 10^{+126}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.92 \cdot 10^{+74}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -0.0175:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \frac{t}{-y}\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-70}:\\ \;\;\;\;\frac{y}{\frac{z}{-t}}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-114}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+95}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ t (/ z x))) (t_2 (* t (/ x (- y)))))
   (if (<= y -3.2e+126)
     t
     (if (<= y -1.92e+74)
       t_2
       (if (<= y -5.8e+38)
         t
         (if (<= y -0.0175)
           t_1
           (if (<= y -1.75e-36)
             (* x (/ t (- y)))
             (if (<= y -7e-70)
               (/ y (/ z (- t)))
               (if (<= y -7.5e-114) t_2 (if (<= y 7.8e+95) t_1 t))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = t / (z / x);
	double t_2 = t * (x / -y);
	double tmp;
	if (y <= -3.2e+126) {
		tmp = t;
	} else if (y <= -1.92e+74) {
		tmp = t_2;
	} else if (y <= -5.8e+38) {
		tmp = t;
	} else if (y <= -0.0175) {
		tmp = t_1;
	} else if (y <= -1.75e-36) {
		tmp = x * (t / -y);
	} else if (y <= -7e-70) {
		tmp = y / (z / -t);
	} else if (y <= -7.5e-114) {
		tmp = t_2;
	} else if (y <= 7.8e+95) {
		tmp = t_1;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = t / (z / x)
    t_2 = t * (x / -y)
    if (y <= (-3.2d+126)) then
        tmp = t
    else if (y <= (-1.92d+74)) then
        tmp = t_2
    else if (y <= (-5.8d+38)) then
        tmp = t
    else if (y <= (-0.0175d0)) then
        tmp = t_1
    else if (y <= (-1.75d-36)) then
        tmp = x * (t / -y)
    else if (y <= (-7d-70)) then
        tmp = y / (z / -t)
    else if (y <= (-7.5d-114)) then
        tmp = t_2
    else if (y <= 7.8d+95) then
        tmp = t_1
    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 / (z / x);
	double t_2 = t * (x / -y);
	double tmp;
	if (y <= -3.2e+126) {
		tmp = t;
	} else if (y <= -1.92e+74) {
		tmp = t_2;
	} else if (y <= -5.8e+38) {
		tmp = t;
	} else if (y <= -0.0175) {
		tmp = t_1;
	} else if (y <= -1.75e-36) {
		tmp = x * (t / -y);
	} else if (y <= -7e-70) {
		tmp = y / (z / -t);
	} else if (y <= -7.5e-114) {
		tmp = t_2;
	} else if (y <= 7.8e+95) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t / (z / x)
	t_2 = t * (x / -y)
	tmp = 0
	if y <= -3.2e+126:
		tmp = t
	elif y <= -1.92e+74:
		tmp = t_2
	elif y <= -5.8e+38:
		tmp = t
	elif y <= -0.0175:
		tmp = t_1
	elif y <= -1.75e-36:
		tmp = x * (t / -y)
	elif y <= -7e-70:
		tmp = y / (z / -t)
	elif y <= -7.5e-114:
		tmp = t_2
	elif y <= 7.8e+95:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t / Float64(z / x))
	t_2 = Float64(t * Float64(x / Float64(-y)))
	tmp = 0.0
	if (y <= -3.2e+126)
		tmp = t;
	elseif (y <= -1.92e+74)
		tmp = t_2;
	elseif (y <= -5.8e+38)
		tmp = t;
	elseif (y <= -0.0175)
		tmp = t_1;
	elseif (y <= -1.75e-36)
		tmp = Float64(x * Float64(t / Float64(-y)));
	elseif (y <= -7e-70)
		tmp = Float64(y / Float64(z / Float64(-t)));
	elseif (y <= -7.5e-114)
		tmp = t_2;
	elseif (y <= 7.8e+95)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t / (z / x);
	t_2 = t * (x / -y);
	tmp = 0.0;
	if (y <= -3.2e+126)
		tmp = t;
	elseif (y <= -1.92e+74)
		tmp = t_2;
	elseif (y <= -5.8e+38)
		tmp = t;
	elseif (y <= -0.0175)
		tmp = t_1;
	elseif (y <= -1.75e-36)
		tmp = x * (t / -y);
	elseif (y <= -7e-70)
		tmp = y / (z / -t);
	elseif (y <= -7.5e-114)
		tmp = t_2;
	elseif (y <= 7.8e+95)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x / (-y)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.2e+126], t, If[LessEqual[y, -1.92e+74], t$95$2, If[LessEqual[y, -5.8e+38], t, If[LessEqual[y, -0.0175], t$95$1, If[LessEqual[y, -1.75e-36], N[(x * N[(t / (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7e-70], N[(y / N[(z / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.5e-114], t$95$2, If[LessEqual[y, 7.8e+95], t$95$1, t]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.92 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq -0.0175:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;y \leq -7.5 \cdot 10^{-114}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 7.8 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.1999999999999998e126 or -1.92000000000000002e74 < y < -5.80000000000000013e38 or 7.7999999999999994e95 < y

    1. Initial program 100.0%

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

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

    if -3.1999999999999998e126 < y < -1.92000000000000002e74 or -6.99999999999999949e-70 < y < -7.5000000000000002e-114

    1. Initial program 99.8%

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

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

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

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

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

    if -5.80000000000000013e38 < y < -0.017500000000000002 or -7.5000000000000002e-114 < y < 7.7999999999999994e95

    1. Initial program 95.1%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative95.1%

        \[\leadsto \color{blue}{t \cdot \frac{x - y}{z - y}} \]
      2. clear-num95.1%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \]
      3. un-div-inv95.4%

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

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

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

    if -0.017500000000000002 < y < -1.75e-36

    1. Initial program 100.0%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot t}{y}} \]
      2. mul-1-neg57.4%

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

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

    if -1.75e-36 < y < -6.99999999999999949e-70

    1. Initial program 99.4%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative99.4%

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x - y}}} \]
    5. Taylor expanded in z around inf 99.4%

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

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

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

        \[\leadsto \frac{t}{\color{blue}{\frac{z}{-y}}} \]
    8. Simplified90.3%

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

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

        \[\leadsto \color{blue}{-\frac{t}{z} \cdot y} \]
      3. add-sqr-sqrt0.0%

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

        \[\leadsto -\frac{t}{z} \cdot \color{blue}{\sqrt{y \cdot y}} \]
      5. sqr-neg23.0%

        \[\leadsto -\frac{t}{z} \cdot \sqrt{\color{blue}{\left(-y\right) \cdot \left(-y\right)}} \]
      6. sqrt-unprod23.0%

        \[\leadsto -\frac{t}{z} \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)} \]
      7. add-sqr-sqrt23.0%

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

        \[\leadsto -\color{blue}{\left(-y\right) \cdot \frac{t}{z}} \]
      9. add-sqr-sqrt23.0%

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

        \[\leadsto -\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}} \cdot \frac{t}{z} \]
      11. sqr-neg23.0%

        \[\leadsto -\sqrt{\color{blue}{y \cdot y}} \cdot \frac{t}{z} \]
      12. sqrt-unprod0.0%

        \[\leadsto -\color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot \frac{t}{z} \]
      13. add-sqr-sqrt90.0%

        \[\leadsto -\color{blue}{y} \cdot \frac{t}{z} \]
      14. clear-num90.0%

        \[\leadsto -y \cdot \color{blue}{\frac{1}{\frac{z}{t}}} \]
      15. div-inv90.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+126}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.92 \cdot 10^{+74}:\\ \;\;\;\;t \cdot \frac{x}{-y}\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -0.0175:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \frac{t}{-y}\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-70}:\\ \;\;\;\;\frac{y}{\frac{z}{-t}}\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{-114}:\\ \;\;\;\;t \cdot \frac{x}{-y}\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+95}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 72.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -6.6 \cdot 10^{-40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-69}:\\ \;\;\;\;\frac{y}{\frac{z}{-t}}\\ \mathbf{elif}\;y \leq -3.95 \cdot 10^{-140} \lor \neg \left(y \leq 1.65 \cdot 10^{-60}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ x y)))))
   (if (<= y -6.6e-40)
     t_1
     (if (<= y -3e-69)
       (/ y (/ z (- t)))
       (if (or (<= y -3.95e-140) (not (<= y 1.65e-60)))
         t_1
         (* x (/ t (- z y))))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (1.0 - (x / y));
	double tmp;
	if (y <= -6.6e-40) {
		tmp = t_1;
	} else if (y <= -3e-69) {
		tmp = y / (z / -t);
	} else if ((y <= -3.95e-140) || !(y <= 1.65e-60)) {
		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 - (x / y))
    if (y <= (-6.6d-40)) then
        tmp = t_1
    else if (y <= (-3d-69)) then
        tmp = y / (z / -t)
    else if ((y <= (-3.95d-140)) .or. (.not. (y <= 1.65d-60))) 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 - (x / y));
	double tmp;
	if (y <= -6.6e-40) {
		tmp = t_1;
	} else if (y <= -3e-69) {
		tmp = y / (z / -t);
	} else if ((y <= -3.95e-140) || !(y <= 1.65e-60)) {
		tmp = t_1;
	} else {
		tmp = x * (t / (z - y));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (1.0 - (x / y))
	tmp = 0
	if y <= -6.6e-40:
		tmp = t_1
	elif y <= -3e-69:
		tmp = y / (z / -t)
	elif (y <= -3.95e-140) or not (y <= 1.65e-60):
		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(x / y)))
	tmp = 0.0
	if (y <= -6.6e-40)
		tmp = t_1;
	elseif (y <= -3e-69)
		tmp = Float64(y / Float64(z / Float64(-t)));
	elseif ((y <= -3.95e-140) || !(y <= 1.65e-60))
		tmp = t_1;
	else
		tmp = Float64(x * Float64(t / Float64(z - y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (1.0 - (x / y));
	tmp = 0.0;
	if (y <= -6.6e-40)
		tmp = t_1;
	elseif (y <= -3e-69)
		tmp = y / (z / -t);
	elseif ((y <= -3.95e-140) || ~((y <= 1.65e-60)))
		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[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.6e-40], t$95$1, If[LessEqual[y, -3e-69], N[(y / N[(z / (-t)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.95e-140], N[Not[LessEqual[y, 1.65e-60]], $MachinePrecision]], t$95$1, N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -6.6 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq -3.95 \cdot 10^{-140} \lor \neg \left(y \leq 1.65 \cdot 10^{-60}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.59999999999999986e-40 or -2.99999999999999989e-69 < y < -3.94999999999999983e-140 or 1.6499999999999999e-60 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-\left(\frac{x}{y} + -1\right)\right)} \cdot t \]
    6. Taylor expanded in t around 0 77.9%

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

    if -6.59999999999999986e-40 < y < -2.99999999999999989e-69

    1. Initial program 99.4%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative99.4%

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x - y}}} \]
    5. Taylor expanded in z around inf 99.4%

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

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

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

        \[\leadsto \frac{t}{\color{blue}{\frac{z}{-y}}} \]
    8. Simplified90.3%

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

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

        \[\leadsto \color{blue}{-\frac{t}{z} \cdot y} \]
      3. add-sqr-sqrt0.0%

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

        \[\leadsto -\frac{t}{z} \cdot \color{blue}{\sqrt{y \cdot y}} \]
      5. sqr-neg23.0%

        \[\leadsto -\frac{t}{z} \cdot \sqrt{\color{blue}{\left(-y\right) \cdot \left(-y\right)}} \]
      6. sqrt-unprod23.0%

        \[\leadsto -\frac{t}{z} \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)} \]
      7. add-sqr-sqrt23.0%

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

        \[\leadsto -\color{blue}{\left(-y\right) \cdot \frac{t}{z}} \]
      9. add-sqr-sqrt23.0%

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

        \[\leadsto -\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}} \cdot \frac{t}{z} \]
      11. sqr-neg23.0%

        \[\leadsto -\sqrt{\color{blue}{y \cdot y}} \cdot \frac{t}{z} \]
      12. sqrt-unprod0.0%

        \[\leadsto -\color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot \frac{t}{z} \]
      13. add-sqr-sqrt90.0%

        \[\leadsto -\color{blue}{y} \cdot \frac{t}{z} \]
      14. clear-num90.0%

        \[\leadsto -y \cdot \color{blue}{\frac{1}{\frac{z}{t}}} \]
      15. div-inv90.3%

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

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

    if -3.94999999999999983e-140 < y < 1.6499999999999999e-60

    1. Initial program 93.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.6 \cdot 10^{-40}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-69}:\\ \;\;\;\;\frac{y}{\frac{z}{-t}}\\ \mathbf{elif}\;y \leq -3.95 \cdot 10^{-140} \lor \neg \left(y \leq 1.65 \cdot 10^{-60}\right):\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 69.5% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.78 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq -8.2 \cdot 10^{-141} \lor \neg \left(y \leq 3.1 \cdot 10^{-59}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.78000000000000001e-40 or -6.5000000000000005e-70 < y < -8.20000000000000005e-141 or 3.09999999999999999e-59 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-\left(\frac{x}{y} + -1\right)\right)} \cdot t \]
    6. Taylor expanded in t around 0 77.9%

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

    if -1.78000000000000001e-40 < y < -6.5000000000000005e-70

    1. Initial program 99.4%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative99.4%

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x - y}}} \]
    5. Taylor expanded in z around inf 99.4%

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

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

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

        \[\leadsto \frac{t}{\color{blue}{\frac{z}{-y}}} \]
    8. Simplified90.3%

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

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

        \[\leadsto \color{blue}{-\frac{t}{z} \cdot y} \]
      3. add-sqr-sqrt0.0%

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

        \[\leadsto -\frac{t}{z} \cdot \color{blue}{\sqrt{y \cdot y}} \]
      5. sqr-neg23.0%

        \[\leadsto -\frac{t}{z} \cdot \sqrt{\color{blue}{\left(-y\right) \cdot \left(-y\right)}} \]
      6. sqrt-unprod23.0%

        \[\leadsto -\frac{t}{z} \cdot \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)} \]
      7. add-sqr-sqrt23.0%

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

        \[\leadsto -\color{blue}{\left(-y\right) \cdot \frac{t}{z}} \]
      9. add-sqr-sqrt23.0%

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

        \[\leadsto -\color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}} \cdot \frac{t}{z} \]
      11. sqr-neg23.0%

        \[\leadsto -\sqrt{\color{blue}{y \cdot y}} \cdot \frac{t}{z} \]
      12. sqrt-unprod0.0%

        \[\leadsto -\color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot \frac{t}{z} \]
      13. add-sqr-sqrt90.0%

        \[\leadsto -\color{blue}{y} \cdot \frac{t}{z} \]
      14. clear-num90.0%

        \[\leadsto -y \cdot \color{blue}{\frac{1}{\frac{z}{t}}} \]
      15. div-inv90.3%

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

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

    if -8.20000000000000005e-141 < y < 3.09999999999999999e-59

    1. Initial program 93.3%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative93.3%

        \[\leadsto \color{blue}{t \cdot \frac{x - y}{z - y}} \]
      2. clear-num93.2%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \]
      3. un-div-inv93.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.78 \cdot 10^{-40}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{-70}:\\ \;\;\;\;\frac{y}{\frac{z}{-t}}\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-141} \lor \neg \left(y \leq 3.1 \cdot 10^{-59}\right):\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 59.2% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.7499999999999999e128 or 9.39999999999999945e95 < y

    1. Initial program 99.9%

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

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

    if -2.7499999999999999e128 < y < -7.0000000000000002e-88

    1. Initial program 99.7%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot t}{y}} \]
      2. mul-1-neg41.5%

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

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

    if -7.0000000000000002e-88 < y < -2.75e-294

    1. Initial program 90.5%

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

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

    if -2.75e-294 < y < 9.39999999999999945e95

    1. Initial program 97.3%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative97.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.75 \cdot 10^{+128}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \frac{t}{-y}\\ \mathbf{elif}\;y \leq -2.75 \cdot 10^{-294}:\\ \;\;\;\;\frac{t \cdot x}{z}\\ \mathbf{elif}\;y \leq 9.4 \cdot 10^{+95}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 74.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -7.2 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.20000000000000014e-37 or 3.09999999999999999e-59 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-\left(\frac{x}{y} + -1\right)\right)} \cdot t \]
    6. Taylor expanded in t around 0 79.5%

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

    if -7.20000000000000014e-37 < y < 2.44999999999999988e-267

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.44999999999999988e-267 < y < 3.09999999999999999e-59

    1. Initial program 97.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{-37}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{-267}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-59}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 89.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+134} \lor \neg \left(y \leq 2.2 \cdot 10^{+96}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.3999999999999999e134 or 2.1999999999999999e96 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-\left(\frac{x}{y} + -1\right)\right)} \cdot t \]
    6. Taylor expanded in t around 0 89.2%

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

    if -1.3999999999999999e134 < y < 2.1999999999999999e96

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 76.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{+36} \lor \neg \left(x \leq 3.2 \cdot 10^{+31}\right):\\
\;\;\;\;t \cdot \frac{x}{z - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.30000000000000005e36 or 3.2000000000000001e31 < x

    1. Initial program 96.9%

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

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

    if -4.30000000000000005e36 < x < 3.2000000000000001e31

    1. Initial program 98.2%

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

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

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

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

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

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

Alternative 10: 74.0% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4e-35 or 3.09999999999999999e-59 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-\left(\frac{x}{y} + -1\right)\right)} \cdot t \]
    6. Taylor expanded in t around 0 79.5%

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

    if -1.4e-35 < y < 3.09999999999999999e-59

    1. Initial program 94.4%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative94.4%

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \]
      3. un-div-inv94.7%

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

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

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

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

Alternative 11: 73.9% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.12e-35 or 3.2000000000000001e-60 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-\left(\frac{x}{y} + -1\right)\right)} \cdot t \]
    6. Taylor expanded in t around 0 79.5%

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

    if -1.12e-35 < y < 3.2000000000000001e-60

    1. Initial program 94.4%

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

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

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

Alternative 12: 73.3% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.7599999999999999e-35 or 1.6499999999999999e-60 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-\left(\frac{x}{y} + -1\right)\right)} \cdot t \]
    6. Taylor expanded in t around 0 79.5%

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

    if -1.7599999999999999e-35 < y < 1.6499999999999999e-60

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 61.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+46} \lor \neg \left(y \leq 6.2 \cdot 10^{+94}\right):\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.7999999999999999e46 or 6.19999999999999983e94 < y

    1. Initial program 99.9%

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

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

    if -1.7999999999999999e46 < y < 6.19999999999999983e94

    1. Initial program 95.8%

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

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

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

Alternative 14: 61.1% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.5999999999999999e44 or 2.00000000000000004e95 < y

    1. Initial program 99.9%

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

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

    if -2.5999999999999999e44 < y < 2.00000000000000004e95

    1. Initial program 95.8%

      \[\frac{x - y}{z - y} \cdot t \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative95.8%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\frac{z}{x}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 15: 59.7% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.79999999999999974e39 or 3.09999999999999999e-59 < y

    1. Initial program 99.9%

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

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

    if -9.79999999999999974e39 < y < 3.09999999999999999e-59

    1. Initial program 95.1%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{t}{z}} \]
    5. Applied egg-rr58.3%

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

Alternative 16: 97.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 17: 35.6% 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.5%

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

    \[\leadsto \color{blue}{t} \]
  4. Add Preprocessing

Developer target: 97.3% 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 2024097 
(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))