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

Percentage Accurate: 97.0% → 97.0%
Time: 8.9s
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.0% 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.0% 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. Step-by-step derivation
    1. associate-*l/86.3%

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

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

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

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

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

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

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

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

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

Alternative 2: 73.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -2.3 \cdot 10^{+42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-42}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-235}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-56} \lor \neg \left(y \leq 3.8 \cdot 10^{-25}\right) \land y \leq 9.2 \cdot 10^{+53}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \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 -2.3e+42)
     t_1
     (if (<= y -2.7e-42)
       (/ t (/ z (- x y)))
       (if (<= y 2.5e-235)
         (* x (/ t (- z y)))
         (if (or (<= y 3.2e-56) (and (not (<= y 3.8e-25)) (<= y 9.2e+53)))
           (* t (/ (- x y) z))
           t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (1.0 - (x / y));
	double tmp;
	if (y <= -2.3e+42) {
		tmp = t_1;
	} else if (y <= -2.7e-42) {
		tmp = t / (z / (x - y));
	} else if (y <= 2.5e-235) {
		tmp = x * (t / (z - y));
	} else if ((y <= 3.2e-56) || (!(y <= 3.8e-25) && (y <= 9.2e+53))) {
		tmp = t * ((x - y) / z);
	} 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 <= (-2.3d+42)) then
        tmp = t_1
    else if (y <= (-2.7d-42)) then
        tmp = t / (z / (x - y))
    else if (y <= 2.5d-235) then
        tmp = x * (t / (z - y))
    else if ((y <= 3.2d-56) .or. (.not. (y <= 3.8d-25)) .and. (y <= 9.2d+53)) then
        tmp = t * ((x - y) / z)
    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 <= -2.3e+42) {
		tmp = t_1;
	} else if (y <= -2.7e-42) {
		tmp = t / (z / (x - y));
	} else if (y <= 2.5e-235) {
		tmp = x * (t / (z - y));
	} else if ((y <= 3.2e-56) || (!(y <= 3.8e-25) && (y <= 9.2e+53))) {
		tmp = t * ((x - y) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (1.0 - (x / y))
	tmp = 0
	if y <= -2.3e+42:
		tmp = t_1
	elif y <= -2.7e-42:
		tmp = t / (z / (x - y))
	elif y <= 2.5e-235:
		tmp = x * (t / (z - y))
	elif (y <= 3.2e-56) or (not (y <= 3.8e-25) and (y <= 9.2e+53)):
		tmp = t * ((x - y) / z)
	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 <= -2.3e+42)
		tmp = t_1;
	elseif (y <= -2.7e-42)
		tmp = Float64(t / Float64(z / Float64(x - y)));
	elseif (y <= 2.5e-235)
		tmp = Float64(x * Float64(t / Float64(z - y)));
	elseif ((y <= 3.2e-56) || (!(y <= 3.8e-25) && (y <= 9.2e+53)))
		tmp = Float64(t * Float64(Float64(x - y) / z));
	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 <= -2.3e+42)
		tmp = t_1;
	elseif (y <= -2.7e-42)
		tmp = t / (z / (x - y));
	elseif (y <= 2.5e-235)
		tmp = x * (t / (z - y));
	elseif ((y <= 3.2e-56) || (~((y <= 3.8e-25)) && (y <= 9.2e+53)))
		tmp = t * ((x - y) / z);
	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, -2.3e+42], t$95$1, If[LessEqual[y, -2.7e-42], N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e-235], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 3.2e-56], And[N[Not[LessEqual[y, 3.8e-25]], $MachinePrecision], LessEqual[y, 9.2e+53]]], N[(t * N[(N[(x - y), $MachinePrecision] / z), $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 -2.3 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;y \leq 3.2 \cdot 10^{-56} \lor \neg \left(y \leq 3.8 \cdot 10^{-25}\right) \land y \leq 9.2 \cdot 10^{+53}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.3e42 or 3.19999999999999986e-56 < y < 3.7999999999999998e-25 or 9.20000000000000079e53 < y

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-lft-identity75.5%

        \[\leadsto \color{blue}{1 \cdot t} + -1 \cdot \frac{t \cdot x}{y} \]
      2. *-commutative75.5%

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

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

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

        \[\leadsto t \cdot 1 + \color{blue}{t \cdot \left(-\frac{x}{y}\right)} \]
      6. distribute-lft-in81.0%

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

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

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

    if -2.3e42 < y < -2.69999999999999999e-42

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

    if -2.69999999999999999e-42 < y < 2.4999999999999999e-235

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{z - y} \cdot x} \]
    9. Applied egg-rr85.8%

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

    if 2.4999999999999999e-235 < y < 3.19999999999999986e-56 or 3.7999999999999998e-25 < y < 9.20000000000000079e53

    1. Initial program 98.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.3 \cdot 10^{+42}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-42}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-235}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-56} \lor \neg \left(y \leq 3.8 \cdot 10^{-25}\right) \land y \leq 9.2 \cdot 10^{+53}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 73.7% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\ t_2 := t \cdot \frac{x}{z - y}\\ \mathbf{if}\;y \leq -2.6 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{-38}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-73}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-58}:\\ \;\;\;\;t \cdot \frac{y}{-z}\\ \mathbf{elif}\;y \leq 0.21 \lor \neg \left(y \leq 7.6 \cdot 10^{+53}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ x y)))) (t_2 (* t (/ x (- z y)))))
   (if (<= y -2.6e+40)
     t_1
     (if (<= y -3.7e-38)
       (* (- x y) (/ t z))
       (if (<= y 3.4e-73)
         t_2
         (if (<= y 2.7e-58)
           (* t (/ y (- z)))
           (if (or (<= y 0.21) (not (<= y 7.6e+53))) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (1.0 - (x / y));
	double t_2 = t * (x / (z - y));
	double tmp;
	if (y <= -2.6e+40) {
		tmp = t_1;
	} else if (y <= -3.7e-38) {
		tmp = (x - y) * (t / z);
	} else if (y <= 3.4e-73) {
		tmp = t_2;
	} else if (y <= 2.7e-58) {
		tmp = t * (y / -z);
	} else if ((y <= 0.21) || !(y <= 7.6e+53)) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 * (1.0d0 - (x / y))
    t_2 = t * (x / (z - y))
    if (y <= (-2.6d+40)) then
        tmp = t_1
    else if (y <= (-3.7d-38)) then
        tmp = (x - y) * (t / z)
    else if (y <= 3.4d-73) then
        tmp = t_2
    else if (y <= 2.7d-58) then
        tmp = t * (y / -z)
    else if ((y <= 0.21d0) .or. (.not. (y <= 7.6d+53))) then
        tmp = t_1
    else
        tmp = t_2
    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 t_2 = t * (x / (z - y));
	double tmp;
	if (y <= -2.6e+40) {
		tmp = t_1;
	} else if (y <= -3.7e-38) {
		tmp = (x - y) * (t / z);
	} else if (y <= 3.4e-73) {
		tmp = t_2;
	} else if (y <= 2.7e-58) {
		tmp = t * (y / -z);
	} else if ((y <= 0.21) || !(y <= 7.6e+53)) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (1.0 - (x / y))
	t_2 = t * (x / (z - y))
	tmp = 0
	if y <= -2.6e+40:
		tmp = t_1
	elif y <= -3.7e-38:
		tmp = (x - y) * (t / z)
	elif y <= 3.4e-73:
		tmp = t_2
	elif y <= 2.7e-58:
		tmp = t * (y / -z)
	elif (y <= 0.21) or not (y <= 7.6e+53):
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(1.0 - Float64(x / y)))
	t_2 = Float64(t * Float64(x / Float64(z - y)))
	tmp = 0.0
	if (y <= -2.6e+40)
		tmp = t_1;
	elseif (y <= -3.7e-38)
		tmp = Float64(Float64(x - y) * Float64(t / z));
	elseif (y <= 3.4e-73)
		tmp = t_2;
	elseif (y <= 2.7e-58)
		tmp = Float64(t * Float64(y / Float64(-z)));
	elseif ((y <= 0.21) || !(y <= 7.6e+53))
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (1.0 - (x / y));
	t_2 = t * (x / (z - y));
	tmp = 0.0;
	if (y <= -2.6e+40)
		tmp = t_1;
	elseif (y <= -3.7e-38)
		tmp = (x - y) * (t / z);
	elseif (y <= 3.4e-73)
		tmp = t_2;
	elseif (y <= 2.7e-58)
		tmp = t * (y / -z);
	elseif ((y <= 0.21) || ~((y <= 7.6e+53)))
		tmp = t_1;
	else
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e+40], t$95$1, If[LessEqual[y, -3.7e-38], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e-73], t$95$2, If[LessEqual[y, 2.7e-58], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 0.21], N[Not[LessEqual[y, 7.6e+53]], $MachinePrecision]], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 3.4 \cdot 10^{-73}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 0.21 \lor \neg \left(y \leq 7.6 \cdot 10^{+53}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.6000000000000001e40 or 2.6999999999999999e-58 < y < 0.209999999999999992 or 7.59999999999999995e53 < y

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-lft-identity73.8%

        \[\leadsto \color{blue}{1 \cdot t} + -1 \cdot \frac{t \cdot x}{y} \]
      2. *-commutative73.8%

        \[\leadsto \color{blue}{t \cdot 1} + -1 \cdot \frac{t \cdot x}{y} \]
      3. mul-1-neg73.8%

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

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

        \[\leadsto t \cdot 1 + \color{blue}{t \cdot \left(-\frac{x}{y}\right)} \]
      6. distribute-lft-in79.0%

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

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

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

    if -2.6000000000000001e40 < y < -3.7e-38

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

    if -3.7e-38 < y < 3.40000000000000021e-73 or 0.209999999999999992 < y < 7.59999999999999995e53

    1. Initial program 94.6%

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

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

    if 3.40000000000000021e-73 < y < 2.6999999999999999e-58

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{+40}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{-38}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-73}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-58}:\\ \;\;\;\;t \cdot \frac{y}{-z}\\ \mathbf{elif}\;y \leq 0.21 \lor \neg \left(y \leq 7.6 \cdot 10^{+53}\right):\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x}{z - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 73.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\ t_2 := x \cdot \frac{t}{z - y}\\ \mathbf{if}\;y \leq -5.2 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -7.8 \cdot 10^{-32}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-71}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-57}:\\ \;\;\;\;t \cdot \frac{y}{-z}\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+15} \lor \neg \left(y \leq 9.2 \cdot 10^{+53}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ x y)))) (t_2 (* x (/ t (- z y)))))
   (if (<= y -5.2e+40)
     t_1
     (if (<= y -7.8e-32)
       (* (- x y) (/ t z))
       (if (<= y 1.1e-71)
         t_2
         (if (<= y 5e-57)
           (* t (/ y (- z)))
           (if (or (<= y 7.5e+15) (not (<= y 9.2e+53))) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (1.0 - (x / y));
	double t_2 = x * (t / (z - y));
	double tmp;
	if (y <= -5.2e+40) {
		tmp = t_1;
	} else if (y <= -7.8e-32) {
		tmp = (x - y) * (t / z);
	} else if (y <= 1.1e-71) {
		tmp = t_2;
	} else if (y <= 5e-57) {
		tmp = t * (y / -z);
	} else if ((y <= 7.5e+15) || !(y <= 9.2e+53)) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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 * (1.0d0 - (x / y))
    t_2 = x * (t / (z - y))
    if (y <= (-5.2d+40)) then
        tmp = t_1
    else if (y <= (-7.8d-32)) then
        tmp = (x - y) * (t / z)
    else if (y <= 1.1d-71) then
        tmp = t_2
    else if (y <= 5d-57) then
        tmp = t * (y / -z)
    else if ((y <= 7.5d+15) .or. (.not. (y <= 9.2d+53))) then
        tmp = t_1
    else
        tmp = t_2
    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 t_2 = x * (t / (z - y));
	double tmp;
	if (y <= -5.2e+40) {
		tmp = t_1;
	} else if (y <= -7.8e-32) {
		tmp = (x - y) * (t / z);
	} else if (y <= 1.1e-71) {
		tmp = t_2;
	} else if (y <= 5e-57) {
		tmp = t * (y / -z);
	} else if ((y <= 7.5e+15) || !(y <= 9.2e+53)) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (1.0 - (x / y))
	t_2 = x * (t / (z - y))
	tmp = 0
	if y <= -5.2e+40:
		tmp = t_1
	elif y <= -7.8e-32:
		tmp = (x - y) * (t / z)
	elif y <= 1.1e-71:
		tmp = t_2
	elif y <= 5e-57:
		tmp = t * (y / -z)
	elif (y <= 7.5e+15) or not (y <= 9.2e+53):
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(1.0 - Float64(x / y)))
	t_2 = Float64(x * Float64(t / Float64(z - y)))
	tmp = 0.0
	if (y <= -5.2e+40)
		tmp = t_1;
	elseif (y <= -7.8e-32)
		tmp = Float64(Float64(x - y) * Float64(t / z));
	elseif (y <= 1.1e-71)
		tmp = t_2;
	elseif (y <= 5e-57)
		tmp = Float64(t * Float64(y / Float64(-z)));
	elseif ((y <= 7.5e+15) || !(y <= 9.2e+53))
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (1.0 - (x / y));
	t_2 = x * (t / (z - y));
	tmp = 0.0;
	if (y <= -5.2e+40)
		tmp = t_1;
	elseif (y <= -7.8e-32)
		tmp = (x - y) * (t / z);
	elseif (y <= 1.1e-71)
		tmp = t_2;
	elseif (y <= 5e-57)
		tmp = t * (y / -z);
	elseif ((y <= 7.5e+15) || ~((y <= 9.2e+53)))
		tmp = t_1;
	else
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.2e+40], t$95$1, If[LessEqual[y, -7.8e-32], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e-71], t$95$2, If[LessEqual[y, 5e-57], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 7.5e+15], N[Not[LessEqual[y, 9.2e+53]], $MachinePrecision]], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 1.1 \cdot 10^{-71}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 7.5 \cdot 10^{+15} \lor \neg \left(y \leq 9.2 \cdot 10^{+53}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.2000000000000001e40 or 5.0000000000000002e-57 < y < 7.5e15 or 9.20000000000000079e53 < y

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-lft-identity72.1%

        \[\leadsto \color{blue}{1 \cdot t} + -1 \cdot \frac{t \cdot x}{y} \]
      2. *-commutative72.1%

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

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

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

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

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

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

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

    if -5.2000000000000001e40 < y < -7.8000000000000003e-32

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if -7.8000000000000003e-32 < y < 1.09999999999999999e-71 or 7.5e15 < y < 9.20000000000000079e53

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.09999999999999999e-71 < y < 5.0000000000000002e-57

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+40}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -7.8 \cdot 10^{-32}:\\ \;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-71}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-57}:\\ \;\;\;\;t \cdot \frac{y}{-z}\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+15} \lor \neg \left(y \leq 9.2 \cdot 10^{+53}\right):\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 72.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+40} \lor \neg \left(y \leq 3.5 \cdot 10^{-56} \lor \neg \left(y \leq 1.1 \cdot 10^{+17}\right) \land y \leq 9 \cdot 10^{+53}\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 -3.4e+40)
         (not (or (<= y 3.5e-56) (and (not (<= y 1.1e+17)) (<= y 9e+53)))))
   (* t (- 1.0 (/ x y)))
   (* (- x y) (/ t z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -3.4e+40) || !((y <= 3.5e-56) || (!(y <= 1.1e+17) && (y <= 9e+53)))) {
		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 <= (-3.4d+40)) .or. (.not. (y <= 3.5d-56) .or. (.not. (y <= 1.1d+17)) .and. (y <= 9d+53))) 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 <= -3.4e+40) || !((y <= 3.5e-56) || (!(y <= 1.1e+17) && (y <= 9e+53)))) {
		tmp = t * (1.0 - (x / y));
	} else {
		tmp = (x - y) * (t / z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (y <= -3.4e+40) or not ((y <= 3.5e-56) or (not (y <= 1.1e+17) and (y <= 9e+53))):
		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 <= -3.4e+40) || !((y <= 3.5e-56) || (!(y <= 1.1e+17) && (y <= 9e+53))))
		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 <= -3.4e+40) || ~(((y <= 3.5e-56) || (~((y <= 1.1e+17)) && (y <= 9e+53)))))
		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, -3.4e+40], N[Not[Or[LessEqual[y, 3.5e-56], And[N[Not[LessEqual[y, 1.1e+17]], $MachinePrecision], LessEqual[y, 9e+53]]]], $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 -3.4 \cdot 10^{+40} \lor \neg \left(y \leq 3.5 \cdot 10^{-56} \lor \neg \left(y \leq 1.1 \cdot 10^{+17}\right) \land y \leq 9 \cdot 10^{+53}\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 < -3.39999999999999989e40 or 3.4999999999999998e-56 < y < 1.1e17 or 9.0000000000000004e53 < y

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-lft-identity72.3%

        \[\leadsto \color{blue}{1 \cdot t} + -1 \cdot \frac{t \cdot x}{y} \]
      2. *-commutative72.3%

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

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

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

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

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

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

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

    if -3.39999999999999989e40 < y < 3.4999999999999998e-56 or 1.1e17 < y < 9.0000000000000004e53

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+40} \lor \neg \left(y \leq 3.5 \cdot 10^{-56} \lor \neg \left(y \leq 1.1 \cdot 10^{+17}\right) \land y \leq 9 \cdot 10^{+53}\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 6: 73.7% 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.7 \cdot 10^{+42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.22 \cdot 10^{-33}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-236}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+53}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \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 -1.7e+42)
     t_1
     (if (<= y -1.22e-33)
       (/ t (/ z (- x y)))
       (if (<= y 5e-236)
         (/ (* t x) (- z y))
         (if (<= y 7.6e+53) (* t (/ (- x y) z)) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (1.0 - (x / y));
	double tmp;
	if (y <= -1.7e+42) {
		tmp = t_1;
	} else if (y <= -1.22e-33) {
		tmp = t / (z / (x - y));
	} else if (y <= 5e-236) {
		tmp = (t * x) / (z - y);
	} else if (y <= 7.6e+53) {
		tmp = t * ((x - y) / z);
	} 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 <= (-1.7d+42)) then
        tmp = t_1
    else if (y <= (-1.22d-33)) then
        tmp = t / (z / (x - y))
    else if (y <= 5d-236) then
        tmp = (t * x) / (z - y)
    else if (y <= 7.6d+53) then
        tmp = t * ((x - y) / z)
    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 <= -1.7e+42) {
		tmp = t_1;
	} else if (y <= -1.22e-33) {
		tmp = t / (z / (x - y));
	} else if (y <= 5e-236) {
		tmp = (t * x) / (z - y);
	} else if (y <= 7.6e+53) {
		tmp = t * ((x - y) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (1.0 - (x / y))
	tmp = 0
	if y <= -1.7e+42:
		tmp = t_1
	elif y <= -1.22e-33:
		tmp = t / (z / (x - y))
	elif y <= 5e-236:
		tmp = (t * x) / (z - y)
	elif y <= 7.6e+53:
		tmp = t * ((x - y) / z)
	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 <= -1.7e+42)
		tmp = t_1;
	elseif (y <= -1.22e-33)
		tmp = Float64(t / Float64(z / Float64(x - y)));
	elseif (y <= 5e-236)
		tmp = Float64(Float64(t * x) / Float64(z - y));
	elseif (y <= 7.6e+53)
		tmp = Float64(t * Float64(Float64(x - y) / z));
	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 <= -1.7e+42)
		tmp = t_1;
	elseif (y <= -1.22e-33)
		tmp = t / (z / (x - y));
	elseif (y <= 5e-236)
		tmp = (t * x) / (z - y);
	elseif (y <= 7.6e+53)
		tmp = t * ((x - y) / z);
	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, -1.7e+42], t$95$1, If[LessEqual[y, -1.22e-33], N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e-236], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.6e+53], N[(t * N[(N[(x - y), $MachinePrecision] / z), $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 -1.7 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.69999999999999988e42 or 7.59999999999999995e53 < y

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-lft-identity75.3%

        \[\leadsto \color{blue}{1 \cdot t} + -1 \cdot \frac{t \cdot x}{y} \]
      2. *-commutative75.3%

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

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

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

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

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

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

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

    if -1.69999999999999988e42 < y < -1.22e-33

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -1.22e-33 < y < 4.9999999999999998e-236

    1. Initial program 92.8%

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

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

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

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

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

    if 4.9999999999999998e-236 < y < 7.59999999999999995e53

    1. Initial program 98.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+42}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -1.22 \cdot 10^{-33}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-236}:\\ \;\;\;\;\frac{t \cdot x}{z - y}\\ \mathbf{elif}\;y \leq 7.6 \cdot 10^{+53}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 73.8% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
t_2 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{+41}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;y \leq 1.3 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.89999999999999988e41 or 1.30000000000000003e54 < y

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-lft-identity75.3%

        \[\leadsto \color{blue}{1 \cdot t} + -1 \cdot \frac{t \cdot x}{y} \]
      2. *-commutative75.3%

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

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

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

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

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

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

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

    if -2.89999999999999988e41 < y < -6.99999999999999949e-70 or 3.9000000000000001e-233 < y < 1.30000000000000003e54

    1. Initial program 98.5%

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

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

    if -6.99999999999999949e-70 < y < 3.9000000000000001e-233

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{+41}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-70}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{-233}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 68.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 -2.6 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-30}:\\ \;\;\;\;\frac{t}{\frac{z}{-y}}\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-238}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-86}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \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 -2.6e+40)
     t_1
     (if (<= y -9.5e-30)
       (/ t (/ z (- y)))
       (if (<= y -9.5e-238)
         (/ x (/ z t))
         (if (<= y 1.5e-86) (/ t (/ z x)) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (1.0 - (x / y));
	double tmp;
	if (y <= -2.6e+40) {
		tmp = t_1;
	} else if (y <= -9.5e-30) {
		tmp = t / (z / -y);
	} else if (y <= -9.5e-238) {
		tmp = x / (z / t);
	} else if (y <= 1.5e-86) {
		tmp = t / (z / x);
	} 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 <= (-2.6d+40)) then
        tmp = t_1
    else if (y <= (-9.5d-30)) then
        tmp = t / (z / -y)
    else if (y <= (-9.5d-238)) then
        tmp = x / (z / t)
    else if (y <= 1.5d-86) then
        tmp = t / (z / x)
    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 <= -2.6e+40) {
		tmp = t_1;
	} else if (y <= -9.5e-30) {
		tmp = t / (z / -y);
	} else if (y <= -9.5e-238) {
		tmp = x / (z / t);
	} else if (y <= 1.5e-86) {
		tmp = t / (z / x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (1.0 - (x / y))
	tmp = 0
	if y <= -2.6e+40:
		tmp = t_1
	elif y <= -9.5e-30:
		tmp = t / (z / -y)
	elif y <= -9.5e-238:
		tmp = x / (z / t)
	elif y <= 1.5e-86:
		tmp = t / (z / x)
	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 <= -2.6e+40)
		tmp = t_1;
	elseif (y <= -9.5e-30)
		tmp = Float64(t / Float64(z / Float64(-y)));
	elseif (y <= -9.5e-238)
		tmp = Float64(x / Float64(z / t));
	elseif (y <= 1.5e-86)
		tmp = Float64(t / Float64(z / x));
	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 <= -2.6e+40)
		tmp = t_1;
	elseif (y <= -9.5e-30)
		tmp = t / (z / -y);
	elseif (y <= -9.5e-238)
		tmp = x / (z / t);
	elseif (y <= 1.5e-86)
		tmp = t / (z / x);
	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, -2.6e+40], t$95$1, If[LessEqual[y, -9.5e-30], N[(t / N[(z / (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.5e-238], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-86], N[(t / N[(z / x), $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 -2.6 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.6000000000000001e40 or 1.5e-86 < y

    1. Initial program 99.2%

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-lft-identity68.3%

        \[\leadsto \color{blue}{1 \cdot t} + -1 \cdot \frac{t \cdot x}{y} \]
      2. *-commutative68.3%

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

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

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

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

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

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

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

    if -2.6000000000000001e40 < y < -9.49999999999999939e-30

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{\frac{-1 \cdot z}{y}}} \]
      2. neg-mul-168.5%

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

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

    if -9.49999999999999939e-30 < y < -9.50000000000000059e-238

    1. Initial program 91.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{t}{z}} \]
    8. Step-by-step derivation
      1. clear-num73.8%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{t}}} \]
      2. un-div-inv74.0%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    9. Applied egg-rr74.0%

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

    if -9.50000000000000059e-238 < y < 1.5e-86

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{+40}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-30}:\\ \;\;\;\;\frac{t}{\frac{z}{-y}}\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-238}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-86}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 60.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq 2.7 \cdot 10^{-40} \lor \neg \left(y \leq 0.38\right) \land y \leq 2.05 \cdot 10^{+54}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.49999999999999989e43 or 2.7e-40 < y < 0.38 or 2.04999999999999984e54 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -5.49999999999999989e43 < y < 2.7e-40 or 0.38 < y < 2.04999999999999984e54

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+43}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-40} \lor \neg \left(y \leq 0.38\right) \land y \leq 2.05 \cdot 10^{+54}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 60.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq 9 \cdot 10^{-40} \lor \neg \left(y \leq 0.042\right) \land y \leq 1.15 \cdot 10^{+54}:\\
\;\;\;\;t \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.9000000000000001e43 or 9.0000000000000002e-40 < y < 0.0420000000000000026 or 1.14999999999999997e54 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -3.9000000000000001e43 < y < 9.0000000000000002e-40 or 0.0420000000000000026 < y < 1.14999999999999997e54

    1. Initial program 95.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{+43}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-40} \lor \neg \left(y \leq 0.042\right) \land y \leq 1.15 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 59.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq 9 \cdot 10^{-40} \lor \neg \left(y \leq 4.2 \cdot 10^{+16}\right) \land y \leq 7.6 \cdot 10^{+53}:\\
\;\;\;\;x \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.90000000000000004e43 or 9.0000000000000002e-40 < y < 4.2e16 or 7.59999999999999995e53 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -1.90000000000000004e43 < y < 9.0000000000000002e-40 or 4.2e16 < y < 7.59999999999999995e53

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{+43}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-40} \lor \neg \left(y \leq 4.2 \cdot 10^{+16}\right) \land y \leq 7.6 \cdot 10^{+53}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 60.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\frac{z}{x}}\\ \mathbf{if}\;y \leq -1.4 \cdot 10^{+45}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-85}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 10000:\\ \;\;\;\;t \cdot \frac{y}{-z}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+53}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ t (/ z x))))
   (if (<= y -1.4e+45)
     t
     (if (<= y 9.5e-85)
       t_1
       (if (<= y 10000.0) (* t (/ y (- z))) (if (<= y 9.5e+53) t_1 t))))))
double code(double x, double y, double z, double t) {
	double t_1 = t / (z / x);
	double tmp;
	if (y <= -1.4e+45) {
		tmp = t;
	} else if (y <= 9.5e-85) {
		tmp = t_1;
	} else if (y <= 10000.0) {
		tmp = t * (y / -z);
	} else if (y <= 9.5e+53) {
		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 <= (-1.4d+45)) then
        tmp = t
    else if (y <= 9.5d-85) then
        tmp = t_1
    else if (y <= 10000.0d0) then
        tmp = t * (y / -z)
    else if (y <= 9.5d+53) 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 <= -1.4e+45) {
		tmp = t;
	} else if (y <= 9.5e-85) {
		tmp = t_1;
	} else if (y <= 10000.0) {
		tmp = t * (y / -z);
	} else if (y <= 9.5e+53) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t / (z / x)
	tmp = 0
	if y <= -1.4e+45:
		tmp = t
	elif y <= 9.5e-85:
		tmp = t_1
	elif y <= 10000.0:
		tmp = t * (y / -z)
	elif y <= 9.5e+53:
		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 <= -1.4e+45)
		tmp = t;
	elseif (y <= 9.5e-85)
		tmp = t_1;
	elseif (y <= 10000.0)
		tmp = Float64(t * Float64(y / Float64(-z)));
	elseif (y <= 9.5e+53)
		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 <= -1.4e+45)
		tmp = t;
	elseif (y <= 9.5e-85)
		tmp = t_1;
	elseif (y <= 10000.0)
		tmp = t * (y / -z);
	elseif (y <= 9.5e+53)
		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, -1.4e+45], t, If[LessEqual[y, 9.5e-85], t$95$1, If[LessEqual[y, 10000.0], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e+53], t$95$1, t]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 9.5 \cdot 10^{-85}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 9.5 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.4e45 or 9.5000000000000006e53 < y

    1. Initial program 99.8%

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

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

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

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

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

    if -1.4e45 < y < 9.49999999999999964e-85 or 1e4 < y < 9.5000000000000006e53

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

    if 9.49999999999999964e-85 < y < 1e4

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{+45}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-85}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq 10000:\\ \;\;\;\;t \cdot \frac{y}{-z}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+53}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 89.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+111}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.25e111

    1. Initial program 99.8%

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot x}{y}} \]
    7. Step-by-step derivation
      1. *-lft-identity74.4%

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

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

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

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

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

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

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

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

    if -2.25e111 < y < 3.0999999999999998e138

    1. Initial program 96.7%

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

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

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

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

    if 3.0999999999999998e138 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 76.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+64} \lor \neg \left(x \leq 8 \cdot 10^{-13}\right):\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.00000000000000009e64 or 8.0000000000000002e-13 < x

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000009e64 < x < 8.0000000000000002e-13

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 76.6% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.2000000000000001e64 or 1.2499999999999999e-8 < x

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

    if -4.2000000000000001e64 < x < 1.2499999999999999e-8

    1. Initial program 97.7%

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

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

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

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

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

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

Alternative 16: 97.0% 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: 34.7% 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. Step-by-step derivation
    1. associate-*l/86.3%

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

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

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

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

Developer target: 97.0% 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 2024091 
(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))