Numeric.Histogram:binBounds from Chart-1.5.3

Percentage Accurate: 92.8% → 98.5%
Time: 10.4s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

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

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

Alternative 1: 98.5% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2e-8 or 4.9999999999999999e-48 < t

    1. Initial program 85.6%

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

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

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

    if -2e-8 < t < 4.9999999999999999e-48

    1. Initial program 98.1%

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

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

Alternative 2: 51.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{-z}{t}\\ t_2 := y \cdot \frac{z}{t}\\ \mathbf{if}\;t \leq -3.7 \cdot 10^{+53}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-74}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-139}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-216}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-159}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.32 \cdot 10^{-36}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+42}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+183}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ (- z) t))) (t_2 (* y (/ z t))))
   (if (<= t -3.7e+53)
     x
     (if (<= t -1.2e-74)
       t_2
       (if (<= t -1.05e-139)
         t_1
         (if (<= t -5.2e-216)
           (/ (* y z) t)
           (if (<= t 2.9e-159)
             t_1
             (if (<= t 1.32e-36)
               t_2
               (if (<= t 4.5e+42)
                 x
                 (if (<= t 1.4e+183) (* z (/ y t)) x))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (-z / t);
	double t_2 = y * (z / t);
	double tmp;
	if (t <= -3.7e+53) {
		tmp = x;
	} else if (t <= -1.2e-74) {
		tmp = t_2;
	} else if (t <= -1.05e-139) {
		tmp = t_1;
	} else if (t <= -5.2e-216) {
		tmp = (y * z) / t;
	} else if (t <= 2.9e-159) {
		tmp = t_1;
	} else if (t <= 1.32e-36) {
		tmp = t_2;
	} else if (t <= 4.5e+42) {
		tmp = x;
	} else if (t <= 1.4e+183) {
		tmp = z * (y / t);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (-z / t)
    t_2 = y * (z / t)
    if (t <= (-3.7d+53)) then
        tmp = x
    else if (t <= (-1.2d-74)) then
        tmp = t_2
    else if (t <= (-1.05d-139)) then
        tmp = t_1
    else if (t <= (-5.2d-216)) then
        tmp = (y * z) / t
    else if (t <= 2.9d-159) then
        tmp = t_1
    else if (t <= 1.32d-36) then
        tmp = t_2
    else if (t <= 4.5d+42) then
        tmp = x
    else if (t <= 1.4d+183) then
        tmp = z * (y / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (-z / t);
	double t_2 = y * (z / t);
	double tmp;
	if (t <= -3.7e+53) {
		tmp = x;
	} else if (t <= -1.2e-74) {
		tmp = t_2;
	} else if (t <= -1.05e-139) {
		tmp = t_1;
	} else if (t <= -5.2e-216) {
		tmp = (y * z) / t;
	} else if (t <= 2.9e-159) {
		tmp = t_1;
	} else if (t <= 1.32e-36) {
		tmp = t_2;
	} else if (t <= 4.5e+42) {
		tmp = x;
	} else if (t <= 1.4e+183) {
		tmp = z * (y / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (-z / t)
	t_2 = y * (z / t)
	tmp = 0
	if t <= -3.7e+53:
		tmp = x
	elif t <= -1.2e-74:
		tmp = t_2
	elif t <= -1.05e-139:
		tmp = t_1
	elif t <= -5.2e-216:
		tmp = (y * z) / t
	elif t <= 2.9e-159:
		tmp = t_1
	elif t <= 1.32e-36:
		tmp = t_2
	elif t <= 4.5e+42:
		tmp = x
	elif t <= 1.4e+183:
		tmp = z * (y / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(Float64(-z) / t))
	t_2 = Float64(y * Float64(z / t))
	tmp = 0.0
	if (t <= -3.7e+53)
		tmp = x;
	elseif (t <= -1.2e-74)
		tmp = t_2;
	elseif (t <= -1.05e-139)
		tmp = t_1;
	elseif (t <= -5.2e-216)
		tmp = Float64(Float64(y * z) / t);
	elseif (t <= 2.9e-159)
		tmp = t_1;
	elseif (t <= 1.32e-36)
		tmp = t_2;
	elseif (t <= 4.5e+42)
		tmp = x;
	elseif (t <= 1.4e+183)
		tmp = Float64(z * Float64(y / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (-z / t);
	t_2 = y * (z / t);
	tmp = 0.0;
	if (t <= -3.7e+53)
		tmp = x;
	elseif (t <= -1.2e-74)
		tmp = t_2;
	elseif (t <= -1.05e-139)
		tmp = t_1;
	elseif (t <= -5.2e-216)
		tmp = (y * z) / t;
	elseif (t <= 2.9e-159)
		tmp = t_1;
	elseif (t <= 1.32e-36)
		tmp = t_2;
	elseif (t <= 4.5e+42)
		tmp = x;
	elseif (t <= 1.4e+183)
		tmp = z * (y / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+53], x, If[LessEqual[t, -1.2e-74], t$95$2, If[LessEqual[t, -1.05e-139], t$95$1, If[LessEqual[t, -5.2e-216], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 2.9e-159], t$95$1, If[LessEqual[t, 1.32e-36], t$95$2, If[LessEqual[t, 4.5e+42], x, If[LessEqual[t, 1.4e+183], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.2 \cdot 10^{-74}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1.05 \cdot 10^{-139}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2.9 \cdot 10^{-159}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.32 \cdot 10^{-36}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 4.5 \cdot 10^{+42}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.4 \cdot 10^{+183}:\\
\;\;\;\;z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3.7e53 or 1.31999999999999993e-36 < t < 4.50000000000000012e42 or 1.40000000000000009e183 < t

    1. Initial program 84.1%

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

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

    if -3.7e53 < t < -1.1999999999999999e-74 or 2.8999999999999999e-159 < t < 1.31999999999999993e-36

    1. Initial program 97.5%

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

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

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

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

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

    if -1.1999999999999999e-74 < t < -1.05000000000000004e-139 or -5.1999999999999997e-216 < t < 2.8999999999999999e-159

    1. Initial program 97.9%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-z \cdot x}}{t} \]
      3. distribute-rgt-neg-out58.4%

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

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

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

    if -1.05000000000000004e-139 < t < -5.1999999999999997e-216

    1. Initial program 99.8%

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

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

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

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

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

    if 4.50000000000000012e42 < t < 1.40000000000000009e183

    1. Initial program 87.1%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative60.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{+53}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-74}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-139}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-216}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-159}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;t \leq 1.32 \cdot 10^{-36}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+42}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+183}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 3: 51.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{t}\\ \mathbf{if}\;t \leq -7.8 \cdot 10^{+43}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.45 \cdot 10^{-124}:\\ \;\;\;\;z \cdot \left(-\frac{x}{t}\right)\\ \mathbf{elif}\;t \leq -9.6 \cdot 10^{-216}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-161}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-30}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+45}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+182}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (/ z t))))
   (if (<= t -7.8e+43)
     x
     (if (<= t -2e-74)
       t_1
       (if (<= t -2.45e-124)
         (* z (- (/ x t)))
         (if (<= t -9.6e-216)
           (/ (* y z) t)
           (if (<= t 3.3e-161)
             (* x (/ (- z) t))
             (if (<= t 2.9e-30)
               t_1
               (if (<= t 9e+45) x (if (<= t 3.1e+182) (* z (/ y t)) x))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (z / t);
	double tmp;
	if (t <= -7.8e+43) {
		tmp = x;
	} else if (t <= -2e-74) {
		tmp = t_1;
	} else if (t <= -2.45e-124) {
		tmp = z * -(x / t);
	} else if (t <= -9.6e-216) {
		tmp = (y * z) / t;
	} else if (t <= 3.3e-161) {
		tmp = x * (-z / t);
	} else if (t <= 2.9e-30) {
		tmp = t_1;
	} else if (t <= 9e+45) {
		tmp = x;
	} else if (t <= 3.1e+182) {
		tmp = z * (y / t);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (z / t)
    if (t <= (-7.8d+43)) then
        tmp = x
    else if (t <= (-2d-74)) then
        tmp = t_1
    else if (t <= (-2.45d-124)) then
        tmp = z * -(x / t)
    else if (t <= (-9.6d-216)) then
        tmp = (y * z) / t
    else if (t <= 3.3d-161) then
        tmp = x * (-z / t)
    else if (t <= 2.9d-30) then
        tmp = t_1
    else if (t <= 9d+45) then
        tmp = x
    else if (t <= 3.1d+182) then
        tmp = z * (y / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = y * (z / t);
	double tmp;
	if (t <= -7.8e+43) {
		tmp = x;
	} else if (t <= -2e-74) {
		tmp = t_1;
	} else if (t <= -2.45e-124) {
		tmp = z * -(x / t);
	} else if (t <= -9.6e-216) {
		tmp = (y * z) / t;
	} else if (t <= 3.3e-161) {
		tmp = x * (-z / t);
	} else if (t <= 2.9e-30) {
		tmp = t_1;
	} else if (t <= 9e+45) {
		tmp = x;
	} else if (t <= 3.1e+182) {
		tmp = z * (y / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (z / t)
	tmp = 0
	if t <= -7.8e+43:
		tmp = x
	elif t <= -2e-74:
		tmp = t_1
	elif t <= -2.45e-124:
		tmp = z * -(x / t)
	elif t <= -9.6e-216:
		tmp = (y * z) / t
	elif t <= 3.3e-161:
		tmp = x * (-z / t)
	elif t <= 2.9e-30:
		tmp = t_1
	elif t <= 9e+45:
		tmp = x
	elif t <= 3.1e+182:
		tmp = z * (y / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(z / t))
	tmp = 0.0
	if (t <= -7.8e+43)
		tmp = x;
	elseif (t <= -2e-74)
		tmp = t_1;
	elseif (t <= -2.45e-124)
		tmp = Float64(z * Float64(-Float64(x / t)));
	elseif (t <= -9.6e-216)
		tmp = Float64(Float64(y * z) / t);
	elseif (t <= 3.3e-161)
		tmp = Float64(x * Float64(Float64(-z) / t));
	elseif (t <= 2.9e-30)
		tmp = t_1;
	elseif (t <= 9e+45)
		tmp = x;
	elseif (t <= 3.1e+182)
		tmp = Float64(z * Float64(y / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (z / t);
	tmp = 0.0;
	if (t <= -7.8e+43)
		tmp = x;
	elseif (t <= -2e-74)
		tmp = t_1;
	elseif (t <= -2.45e-124)
		tmp = z * -(x / t);
	elseif (t <= -9.6e-216)
		tmp = (y * z) / t;
	elseif (t <= 3.3e-161)
		tmp = x * (-z / t);
	elseif (t <= 2.9e-30)
		tmp = t_1;
	elseif (t <= 9e+45)
		tmp = x;
	elseif (t <= 3.1e+182)
		tmp = z * (y / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.8e+43], x, If[LessEqual[t, -2e-74], t$95$1, If[LessEqual[t, -2.45e-124], N[(z * (-N[(x / t), $MachinePrecision])), $MachinePrecision], If[LessEqual[t, -9.6e-216], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 3.3e-161], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e-30], t$95$1, If[LessEqual[t, 9e+45], x, If[LessEqual[t, 3.1e+182], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2 \cdot 10^{-74}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;t \leq 3.3 \cdot 10^{-161}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\

\mathbf{elif}\;t \leq 2.9 \cdot 10^{-30}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 9 \cdot 10^{+45}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 3.1 \cdot 10^{+182}:\\
\;\;\;\;z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -7.8000000000000001e43 or 2.89999999999999989e-30 < t < 8.9999999999999997e45 or 3.09999999999999996e182 < t

    1. Initial program 84.1%

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

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

    if -7.8000000000000001e43 < t < -1.99999999999999992e-74 or 3.2999999999999998e-161 < t < 2.89999999999999989e-30

    1. Initial program 97.5%

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

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

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

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

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

    if -1.99999999999999992e-74 < t < -2.44999999999999983e-124

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

    if -2.44999999999999983e-124 < t < -9.60000000000000014e-216

    1. Initial program 99.8%

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

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

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

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

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

    if -9.60000000000000014e-216 < t < 3.2999999999999998e-161

    1. Initial program 97.1%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-z \cdot x}}{t} \]
      3. distribute-rgt-neg-out55.5%

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

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

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

    if 8.9999999999999997e45 < t < 3.09999999999999996e182

    1. Initial program 87.1%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative60.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.8 \cdot 10^{+43}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-74}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -2.45 \cdot 10^{-124}:\\ \;\;\;\;z \cdot \left(-\frac{x}{t}\right)\\ \mathbf{elif}\;t \leq -9.6 \cdot 10^{-216}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-161}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-30}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+45}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+182}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 4: 51.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{t}\\ \mathbf{if}\;t \leq -6.4 \cdot 10^{+49}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{-129}:\\ \;\;\;\;\frac{-z}{\frac{t}{x}}\\ \mathbf{elif}\;t \leq -9.8 \cdot 10^{-216}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-161}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{+185}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (/ z t))))
   (if (<= t -6.4e+49)
     x
     (if (<= t -1.1e-74)
       t_1
       (if (<= t -4.1e-129)
         (/ (- z) (/ t x))
         (if (<= t -9.8e-216)
           (/ (* y z) t)
           (if (<= t 1.7e-161)
             (* x (/ (- z) t))
             (if (<= t 1.6e-25)
               t_1
               (if (<= t 1.02e+47)
                 x
                 (if (<= t 9.8e+185) (* z (/ y t)) x))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (z / t);
	double tmp;
	if (t <= -6.4e+49) {
		tmp = x;
	} else if (t <= -1.1e-74) {
		tmp = t_1;
	} else if (t <= -4.1e-129) {
		tmp = -z / (t / x);
	} else if (t <= -9.8e-216) {
		tmp = (y * z) / t;
	} else if (t <= 1.7e-161) {
		tmp = x * (-z / t);
	} else if (t <= 1.6e-25) {
		tmp = t_1;
	} else if (t <= 1.02e+47) {
		tmp = x;
	} else if (t <= 9.8e+185) {
		tmp = z * (y / t);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (z / t)
    if (t <= (-6.4d+49)) then
        tmp = x
    else if (t <= (-1.1d-74)) then
        tmp = t_1
    else if (t <= (-4.1d-129)) then
        tmp = -z / (t / x)
    else if (t <= (-9.8d-216)) then
        tmp = (y * z) / t
    else if (t <= 1.7d-161) then
        tmp = x * (-z / t)
    else if (t <= 1.6d-25) then
        tmp = t_1
    else if (t <= 1.02d+47) then
        tmp = x
    else if (t <= 9.8d+185) then
        tmp = z * (y / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = y * (z / t);
	double tmp;
	if (t <= -6.4e+49) {
		tmp = x;
	} else if (t <= -1.1e-74) {
		tmp = t_1;
	} else if (t <= -4.1e-129) {
		tmp = -z / (t / x);
	} else if (t <= -9.8e-216) {
		tmp = (y * z) / t;
	} else if (t <= 1.7e-161) {
		tmp = x * (-z / t);
	} else if (t <= 1.6e-25) {
		tmp = t_1;
	} else if (t <= 1.02e+47) {
		tmp = x;
	} else if (t <= 9.8e+185) {
		tmp = z * (y / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (z / t)
	tmp = 0
	if t <= -6.4e+49:
		tmp = x
	elif t <= -1.1e-74:
		tmp = t_1
	elif t <= -4.1e-129:
		tmp = -z / (t / x)
	elif t <= -9.8e-216:
		tmp = (y * z) / t
	elif t <= 1.7e-161:
		tmp = x * (-z / t)
	elif t <= 1.6e-25:
		tmp = t_1
	elif t <= 1.02e+47:
		tmp = x
	elif t <= 9.8e+185:
		tmp = z * (y / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(z / t))
	tmp = 0.0
	if (t <= -6.4e+49)
		tmp = x;
	elseif (t <= -1.1e-74)
		tmp = t_1;
	elseif (t <= -4.1e-129)
		tmp = Float64(Float64(-z) / Float64(t / x));
	elseif (t <= -9.8e-216)
		tmp = Float64(Float64(y * z) / t);
	elseif (t <= 1.7e-161)
		tmp = Float64(x * Float64(Float64(-z) / t));
	elseif (t <= 1.6e-25)
		tmp = t_1;
	elseif (t <= 1.02e+47)
		tmp = x;
	elseif (t <= 9.8e+185)
		tmp = Float64(z * Float64(y / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (z / t);
	tmp = 0.0;
	if (t <= -6.4e+49)
		tmp = x;
	elseif (t <= -1.1e-74)
		tmp = t_1;
	elseif (t <= -4.1e-129)
		tmp = -z / (t / x);
	elseif (t <= -9.8e-216)
		tmp = (y * z) / t;
	elseif (t <= 1.7e-161)
		tmp = x * (-z / t);
	elseif (t <= 1.6e-25)
		tmp = t_1;
	elseif (t <= 1.02e+47)
		tmp = x;
	elseif (t <= 9.8e+185)
		tmp = z * (y / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.4e+49], x, If[LessEqual[t, -1.1e-74], t$95$1, If[LessEqual[t, -4.1e-129], N[((-z) / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.8e-216], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 1.7e-161], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e-25], t$95$1, If[LessEqual[t, 1.02e+47], x, If[LessEqual[t, 9.8e+185], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.1 \cdot 10^{-74}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -4.1 \cdot 10^{-129}:\\
\;\;\;\;\frac{-z}{\frac{t}{x}}\\

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

\mathbf{elif}\;t \leq 1.7 \cdot 10^{-161}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\

\mathbf{elif}\;t \leq 1.6 \cdot 10^{-25}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.02 \cdot 10^{+47}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 9.8 \cdot 10^{+185}:\\
\;\;\;\;z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -6.40000000000000028e49 or 1.6000000000000001e-25 < t < 1.0199999999999999e47 or 9.79999999999999968e185 < t

    1. Initial program 84.1%

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

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

    if -6.40000000000000028e49 < t < -1.10000000000000005e-74 or 1.69999999999999991e-161 < t < 1.6000000000000001e-25

    1. Initial program 97.5%

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

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

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

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

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

    if -1.10000000000000005e-74 < t < -4.1e-129

    1. Initial program 99.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-z \cdot x}}{t} \]
      3. distribute-rgt-neg-out65.8%

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{z}{\frac{t}{x}}} \]
      3. distribute-neg-frac65.6%

        \[\leadsto \color{blue}{\frac{-z}{\frac{t}{x}}} \]
    8. Simplified65.6%

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

    if -4.1e-129 < t < -9.8000000000000003e-216

    1. Initial program 99.8%

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

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

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

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

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

    if -9.8000000000000003e-216 < t < 1.69999999999999991e-161

    1. Initial program 97.1%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-z \cdot x}}{t} \]
      3. distribute-rgt-neg-out55.5%

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

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

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

    if 1.0199999999999999e47 < t < 9.79999999999999968e185

    1. Initial program 87.1%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative60.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.4 \cdot 10^{+49}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-74}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -4.1 \cdot 10^{-129}:\\ \;\;\;\;\frac{-z}{\frac{t}{x}}\\ \mathbf{elif}\;t \leq -9.8 \cdot 10^{-216}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-161}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-25}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{+185}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 5: 51.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{t}\\ \mathbf{if}\;t \leq -4.2 \cdot 10^{+48}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-74}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{-135}:\\ \;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-215}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-159}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-32}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+182}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (/ z t))))
   (if (<= t -4.2e+48)
     x
     (if (<= t -2e-74)
       t_1
       (if (<= t -7.2e-135)
         (/ (* x (- z)) t)
         (if (<= t -1.25e-215)
           (/ (* y z) t)
           (if (<= t 2.4e-159)
             (* x (/ (- z) t))
             (if (<= t 1.7e-32)
               t_1
               (if (<= t 1.9e+47)
                 x
                 (if (<= t 3.2e+182) (* z (/ y t)) x))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (z / t);
	double tmp;
	if (t <= -4.2e+48) {
		tmp = x;
	} else if (t <= -2e-74) {
		tmp = t_1;
	} else if (t <= -7.2e-135) {
		tmp = (x * -z) / t;
	} else if (t <= -1.25e-215) {
		tmp = (y * z) / t;
	} else if (t <= 2.4e-159) {
		tmp = x * (-z / t);
	} else if (t <= 1.7e-32) {
		tmp = t_1;
	} else if (t <= 1.9e+47) {
		tmp = x;
	} else if (t <= 3.2e+182) {
		tmp = z * (y / t);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (z / t)
    if (t <= (-4.2d+48)) then
        tmp = x
    else if (t <= (-2d-74)) then
        tmp = t_1
    else if (t <= (-7.2d-135)) then
        tmp = (x * -z) / t
    else if (t <= (-1.25d-215)) then
        tmp = (y * z) / t
    else if (t <= 2.4d-159) then
        tmp = x * (-z / t)
    else if (t <= 1.7d-32) then
        tmp = t_1
    else if (t <= 1.9d+47) then
        tmp = x
    else if (t <= 3.2d+182) then
        tmp = z * (y / t)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = y * (z / t);
	double tmp;
	if (t <= -4.2e+48) {
		tmp = x;
	} else if (t <= -2e-74) {
		tmp = t_1;
	} else if (t <= -7.2e-135) {
		tmp = (x * -z) / t;
	} else if (t <= -1.25e-215) {
		tmp = (y * z) / t;
	} else if (t <= 2.4e-159) {
		tmp = x * (-z / t);
	} else if (t <= 1.7e-32) {
		tmp = t_1;
	} else if (t <= 1.9e+47) {
		tmp = x;
	} else if (t <= 3.2e+182) {
		tmp = z * (y / t);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (z / t)
	tmp = 0
	if t <= -4.2e+48:
		tmp = x
	elif t <= -2e-74:
		tmp = t_1
	elif t <= -7.2e-135:
		tmp = (x * -z) / t
	elif t <= -1.25e-215:
		tmp = (y * z) / t
	elif t <= 2.4e-159:
		tmp = x * (-z / t)
	elif t <= 1.7e-32:
		tmp = t_1
	elif t <= 1.9e+47:
		tmp = x
	elif t <= 3.2e+182:
		tmp = z * (y / t)
	else:
		tmp = x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(z / t))
	tmp = 0.0
	if (t <= -4.2e+48)
		tmp = x;
	elseif (t <= -2e-74)
		tmp = t_1;
	elseif (t <= -7.2e-135)
		tmp = Float64(Float64(x * Float64(-z)) / t);
	elseif (t <= -1.25e-215)
		tmp = Float64(Float64(y * z) / t);
	elseif (t <= 2.4e-159)
		tmp = Float64(x * Float64(Float64(-z) / t));
	elseif (t <= 1.7e-32)
		tmp = t_1;
	elseif (t <= 1.9e+47)
		tmp = x;
	elseif (t <= 3.2e+182)
		tmp = Float64(z * Float64(y / t));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (z / t);
	tmp = 0.0;
	if (t <= -4.2e+48)
		tmp = x;
	elseif (t <= -2e-74)
		tmp = t_1;
	elseif (t <= -7.2e-135)
		tmp = (x * -z) / t;
	elseif (t <= -1.25e-215)
		tmp = (y * z) / t;
	elseif (t <= 2.4e-159)
		tmp = x * (-z / t);
	elseif (t <= 1.7e-32)
		tmp = t_1;
	elseif (t <= 1.9e+47)
		tmp = x;
	elseif (t <= 3.2e+182)
		tmp = z * (y / t);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e+48], x, If[LessEqual[t, -2e-74], t$95$1, If[LessEqual[t, -7.2e-135], N[(N[(x * (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, -1.25e-215], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 2.4e-159], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e-32], t$95$1, If[LessEqual[t, 1.9e+47], x, If[LessEqual[t, 3.2e+182], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2 \cdot 10^{-74}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;t \leq 2.4 \cdot 10^{-159}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\

\mathbf{elif}\;t \leq 1.7 \cdot 10^{-32}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+47}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+182}:\\
\;\;\;\;z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -4.1999999999999997e48 or 1.69999999999999989e-32 < t < 1.9000000000000002e47 or 3.1999999999999997e182 < t

    1. Initial program 84.1%

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

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

    if -4.1999999999999997e48 < t < -1.99999999999999992e-74 or 2.39999999999999997e-159 < t < 1.69999999999999989e-32

    1. Initial program 97.5%

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

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

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

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

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

    if -1.99999999999999992e-74 < t < -7.19999999999999955e-135

    1. Initial program 99.8%

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

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

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

        \[\leadsto \frac{\color{blue}{-z \cdot x}}{t} \]
      2. distribute-rgt-neg-out65.8%

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

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

    if -7.19999999999999955e-135 < t < -1.24999999999999989e-215

    1. Initial program 99.8%

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

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

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

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

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

    if -1.24999999999999989e-215 < t < 2.39999999999999997e-159

    1. Initial program 97.1%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-z \cdot x}}{t} \]
      3. distribute-rgt-neg-out55.5%

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

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

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

    if 1.9000000000000002e47 < t < 3.1999999999999997e182

    1. Initial program 87.1%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative60.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+48}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-74}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{-135}:\\ \;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-215}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-159}:\\ \;\;\;\;x \cdot \frac{-z}{t}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-32}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+182}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6: 71.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+153}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq -7.2 \cdot 10^{+92} \lor \neg \left(t \leq -5.2 \cdot 10^{+57}\right) \land t \leq 3.1 \cdot 10^{+182}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.6000000000000001e153 or -7.2e92 < t < -5.2e57 or 3.09999999999999996e182 < t

    1. Initial program 79.8%

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

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

    if -1.6000000000000001e153 < t < -7.2e92 or -5.2e57 < t < 3.09999999999999996e182

    1. Initial program 96.5%

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

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

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

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
    4. Applied egg-rr78.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+153}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{+92} \lor \neg \left(t \leq -5.2 \cdot 10^{+57}\right) \land t \leq 3.1 \cdot 10^{+182}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 71.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+150}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq -3.8 \cdot 10^{+56}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.00000000000000009e150 or -8.9999999999999998e92 < t < -3.79999999999999996e56 or 2.2999999999999998e183 < t

    1. Initial program 79.8%

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

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

    if -5.00000000000000009e150 < t < -8.9999999999999998e92

    1. Initial program 92.9%

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

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

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

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

    if -3.79999999999999996e56 < t < 2.2999999999999998e183

    1. Initial program 96.8%

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

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

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

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
    4. Applied egg-rr78.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{+150}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -9 \cdot 10^{+92}:\\ \;\;\;\;z \cdot \frac{y - x}{t}\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{+56}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+183}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 53.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+47}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 1.05 \cdot 10^{-26} \lor \neg \left(t \leq 1.15 \cdot 10^{+43}\right) \land t \leq 5 \cdot 10^{+182}:\\
\;\;\;\;y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.79999999999999988e47 or 1.05000000000000004e-26 < t < 1.1500000000000001e43 or 4.99999999999999973e182 < t

    1. Initial program 84.1%

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

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

    if -2.79999999999999988e47 < t < 1.05000000000000004e-26 or 1.1500000000000001e43 < t < 4.99999999999999973e182

    1. Initial program 96.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-26} \lor \neg \left(t \leq 1.15 \cdot 10^{+43}\right) \land t \leq 5 \cdot 10^{+182}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 53.1% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;t \leq 7.6 \cdot 10^{+47}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 3.1 \cdot 10^{+182}:\\
\;\;\;\;z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.85000000000000009e49 or 4.9e-42 < t < 7.6000000000000007e47 or 3.09999999999999996e182 < t

    1. Initial program 84.1%

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

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

    if -1.85000000000000009e49 < t < 4.9e-42

    1. Initial program 98.2%

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

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

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

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

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

    if 7.6000000000000007e47 < t < 3.09999999999999996e182

    1. Initial program 87.1%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative60.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{+49}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{-42}:\\ \;\;\;\;y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+182}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 52.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{+52}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 3.05 \cdot 10^{+44}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 3.1 \cdot 10^{+182}:\\
\;\;\;\;z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.2e52 or 1.42000000000000005e-39 < t < 3.04999999999999991e44 or 3.09999999999999996e182 < t

    1. Initial program 84.1%

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

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

    if -2.2e52 < t < 1.42000000000000005e-39

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

    if 3.04999999999999991e44 < t < 3.09999999999999996e182

    1. Initial program 87.1%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative60.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{+52}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.42 \cdot 10^{-39}:\\ \;\;\;\;\frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;t \leq 3.05 \cdot 10^{+44}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+182}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 52.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+53}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 7.2 \cdot 10^{+45}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 3.1 \cdot 10^{+182}:\\
\;\;\;\;z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.6500000000000001e53 or 1.90000000000000005e-28 < t < 7.2e45 or 3.09999999999999996e182 < t

    1. Initial program 84.1%

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

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

    if -1.6500000000000001e53 < t < 1.90000000000000005e-28

    1. Initial program 98.2%

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

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

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

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

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

    if 7.2e45 < t < 3.09999999999999996e182

    1. Initial program 87.1%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot z} \]
      2. *-commutative60.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{+53}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-28}:\\ \;\;\;\;\frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+45}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+182}:\\ \;\;\;\;z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 12: 84.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.00000000000000003e-28 or 3.20000000000000006e-86 < t

    1. Initial program 86.6%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    4. Simplified90.0%

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

    if -3.00000000000000003e-28 < t < 3.20000000000000006e-86

    1. Initial program 97.9%

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

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

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

        \[\leadsto \color{blue}{\frac{z}{t} \cdot \left(y - x\right)} \]
    4. Applied egg-rr88.2%

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

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

Alternative 13: 85.4% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.79999999999999934e-6 or 1.6499999999999999e36 < y

    1. Initial program 90.7%

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

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

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

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

    if -9.79999999999999934e-6 < y < 1.6499999999999999e36

    1. Initial program 91.2%

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

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

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

        \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(-1 \cdot \frac{z}{t}\right)} \]
      3. *-rgt-identity88.5%

        \[\leadsto \color{blue}{x} + x \cdot \left(-1 \cdot \frac{z}{t}\right) \]
      4. mul-1-neg88.5%

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

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

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

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

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

Alternative 14: 93.5% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.8000000000000005e93

    1. Initial program 86.7%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t}} \]
    4. Simplified98.0%

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

    if -7.8000000000000005e93 < y

    1. Initial program 92.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.8 \cdot 10^{+93}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y - x}{t}\\ \end{array} \]

Alternative 15: 96.7% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.10000000000000002e-212

    1. Initial program 87.5%

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

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

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

    if -1.10000000000000002e-212 < z

    1. Initial program 94.1%

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

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{t}{z}}} \]
    3. Simplified99.2%

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

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

Alternative 16: 97.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{t}, y - x, x\right)} \]
  4. Step-by-step derivation
    1. fma-udef97.8%

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

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

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

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

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

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

Alternative 17: 38.4% accurate, 9.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 90.9%

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification42.4%

    \[\leadsto x \]

Developer target: 97.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x < -9.025511195533005 \cdot 10^{-135}:\\
\;\;\;\;x - \frac{z}{t} \cdot \left(x - y\right)\\

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023199 
(FPCore (x y z t)
  :name "Numeric.Histogram:binBounds from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< x -9.025511195533005e-135) (- x (* (/ z t) (- x y))) (if (< x 4.275032163700715e-250) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z)))))

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