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

Percentage Accurate: 96.9% → 97.0%
Time: 12.8s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 15 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 96.9% accurate, 1.0× speedup?

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

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

Alternative 1: 97.0% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

Alternative 2: 60.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -140000:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-43}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-74}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-102}:\\ \;\;\;\;\frac{t}{z} \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{-38}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{+43}:\\ \;\;\;\;t \cdot \frac{-y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -140000.0)
   t
   (if (<= y -1.9e-43)
     (* x (/ t z))
     (if (<= y -7e-74)
       t
       (if (<= y -3e-102)
         (* (/ t z) (- y))
         (if (<= y 2.55e-38)
           (* t (/ x z))
           (if (<= y 1.02e+43) (* t (/ (- y) z)) t)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -140000.0) {
		tmp = t;
	} else if (y <= -1.9e-43) {
		tmp = x * (t / z);
	} else if (y <= -7e-74) {
		tmp = t;
	} else if (y <= -3e-102) {
		tmp = (t / z) * -y;
	} else if (y <= 2.55e-38) {
		tmp = t * (x / z);
	} else if (y <= 1.02e+43) {
		tmp = t * (-y / z);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-140000.0d0)) then
        tmp = t
    else if (y <= (-1.9d-43)) then
        tmp = x * (t / z)
    else if (y <= (-7d-74)) then
        tmp = t
    else if (y <= (-3d-102)) then
        tmp = (t / z) * -y
    else if (y <= 2.55d-38) then
        tmp = t * (x / z)
    else if (y <= 1.02d+43) then
        tmp = t * (-y / z)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -140000.0) {
		tmp = t;
	} else if (y <= -1.9e-43) {
		tmp = x * (t / z);
	} else if (y <= -7e-74) {
		tmp = t;
	} else if (y <= -3e-102) {
		tmp = (t / z) * -y;
	} else if (y <= 2.55e-38) {
		tmp = t * (x / z);
	} else if (y <= 1.02e+43) {
		tmp = t * (-y / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -140000.0:
		tmp = t
	elif y <= -1.9e-43:
		tmp = x * (t / z)
	elif y <= -7e-74:
		tmp = t
	elif y <= -3e-102:
		tmp = (t / z) * -y
	elif y <= 2.55e-38:
		tmp = t * (x / z)
	elif y <= 1.02e+43:
		tmp = t * (-y / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -140000.0)
		tmp = t;
	elseif (y <= -1.9e-43)
		tmp = Float64(x * Float64(t / z));
	elseif (y <= -7e-74)
		tmp = t;
	elseif (y <= -3e-102)
		tmp = Float64(Float64(t / z) * Float64(-y));
	elseif (y <= 2.55e-38)
		tmp = Float64(t * Float64(x / z));
	elseif (y <= 1.02e+43)
		tmp = Float64(t * Float64(Float64(-y) / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -140000.0)
		tmp = t;
	elseif (y <= -1.9e-43)
		tmp = x * (t / z);
	elseif (y <= -7e-74)
		tmp = t;
	elseif (y <= -3e-102)
		tmp = (t / z) * -y;
	elseif (y <= 2.55e-38)
		tmp = t * (x / z);
	elseif (y <= 1.02e+43)
		tmp = t * (-y / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -140000.0], t, If[LessEqual[y, -1.9e-43], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7e-74], t, If[LessEqual[y, -3e-102], N[(N[(t / z), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[y, 2.55e-38], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.02e+43], N[(t * N[((-y) / z), $MachinePrecision]), $MachinePrecision], t]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -140000:\\
\;\;\;\;t\\

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

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

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

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

\mathbf{elif}\;y \leq 1.02 \cdot 10^{+43}:\\
\;\;\;\;t \cdot \frac{-y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.4e5 or -1.89999999999999985e-43 < y < -7.00000000000000029e-74 or 1.02e43 < y

    1. Initial program 99.8%

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

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

    if -1.4e5 < y < -1.89999999999999985e-43

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
      2. associate-/r/75.8%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot x} \]
    5. Simplified75.8%

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

    if -7.00000000000000029e-74 < y < -3e-102

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t}{z}} \]
      4. distribute-rgt-neg-in55.1%

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

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

    if -3e-102 < y < 2.55000000000000014e-38

    1. Initial program 94.4%

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

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

    if 2.55000000000000014e-38 < y < 1.02e43

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -140000:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-43}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-74}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-102}:\\ \;\;\;\;\frac{t}{z} \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq 2.55 \cdot 10^{-38}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{+43}:\\ \;\;\;\;t \cdot \frac{-y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 60.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+99}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-48}:\\ \;\;\;\;\frac{-t}{\frac{y}{x}}\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{-78}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-102}:\\ \;\;\;\;\frac{t}{z} \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq 2.35 \cdot 10^{-39}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+63}:\\ \;\;\;\;t \cdot \frac{-y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -3.2e+99)
   t
   (if (<= y -4.5e-48)
     (/ (- t) (/ y x))
     (if (<= y -1.45e-78)
       t
       (if (<= y -3e-102)
         (* (/ t z) (- y))
         (if (<= y 2.35e-39)
           (* t (/ x z))
           (if (<= y 2.9e+63) (* t (/ (- y) z)) t)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -3.2e+99) {
		tmp = t;
	} else if (y <= -4.5e-48) {
		tmp = -t / (y / x);
	} else if (y <= -1.45e-78) {
		tmp = t;
	} else if (y <= -3e-102) {
		tmp = (t / z) * -y;
	} else if (y <= 2.35e-39) {
		tmp = t * (x / z);
	} else if (y <= 2.9e+63) {
		tmp = t * (-y / z);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-3.2d+99)) then
        tmp = t
    else if (y <= (-4.5d-48)) then
        tmp = -t / (y / x)
    else if (y <= (-1.45d-78)) then
        tmp = t
    else if (y <= (-3d-102)) then
        tmp = (t / z) * -y
    else if (y <= 2.35d-39) then
        tmp = t * (x / z)
    else if (y <= 2.9d+63) then
        tmp = t * (-y / z)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -3.2e+99) {
		tmp = t;
	} else if (y <= -4.5e-48) {
		tmp = -t / (y / x);
	} else if (y <= -1.45e-78) {
		tmp = t;
	} else if (y <= -3e-102) {
		tmp = (t / z) * -y;
	} else if (y <= 2.35e-39) {
		tmp = t * (x / z);
	} else if (y <= 2.9e+63) {
		tmp = t * (-y / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -3.2e+99:
		tmp = t
	elif y <= -4.5e-48:
		tmp = -t / (y / x)
	elif y <= -1.45e-78:
		tmp = t
	elif y <= -3e-102:
		tmp = (t / z) * -y
	elif y <= 2.35e-39:
		tmp = t * (x / z)
	elif y <= 2.9e+63:
		tmp = t * (-y / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -3.2e+99)
		tmp = t;
	elseif (y <= -4.5e-48)
		tmp = Float64(Float64(-t) / Float64(y / x));
	elseif (y <= -1.45e-78)
		tmp = t;
	elseif (y <= -3e-102)
		tmp = Float64(Float64(t / z) * Float64(-y));
	elseif (y <= 2.35e-39)
		tmp = Float64(t * Float64(x / z));
	elseif (y <= 2.9e+63)
		tmp = Float64(t * Float64(Float64(-y) / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -3.2e+99)
		tmp = t;
	elseif (y <= -4.5e-48)
		tmp = -t / (y / x);
	elseif (y <= -1.45e-78)
		tmp = t;
	elseif (y <= -3e-102)
		tmp = (t / z) * -y;
	elseif (y <= 2.35e-39)
		tmp = t * (x / z);
	elseif (y <= 2.9e+63)
		tmp = t * (-y / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.2e+99], t, If[LessEqual[y, -4.5e-48], N[((-t) / N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.45e-78], t, If[LessEqual[y, -3e-102], N[(N[(t / z), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[y, 2.35e-39], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+63], N[(t * N[((-y) / z), $MachinePrecision]), $MachinePrecision], t]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -1.45 \cdot 10^{-78}:\\
\;\;\;\;t\\

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

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

\mathbf{elif}\;y \leq 2.9 \cdot 10^{+63}:\\
\;\;\;\;t \cdot \frac{-y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.19999999999999999e99 or -4.49999999999999988e-48 < y < -1.45e-78 or 2.8999999999999999e63 < y

    1. Initial program 99.9%

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

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

    if -3.19999999999999999e99 < y < -4.49999999999999988e-48

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{y}{x}}} \]
      3. distribute-neg-frac49.9%

        \[\leadsto \color{blue}{\frac{-t}{\frac{y}{x}}} \]
    8. Simplified49.9%

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

    if -1.45e-78 < y < -3e-102

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t}{z}} \]
      4. distribute-rgt-neg-in55.1%

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

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

    if -3e-102 < y < 2.3500000000000001e-39

    1. Initial program 94.4%

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

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

    if 2.3500000000000001e-39 < y < 2.8999999999999999e63

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+99}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-48}:\\ \;\;\;\;\frac{-t}{\frac{y}{x}}\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{-78}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-102}:\\ \;\;\;\;\frac{t}{z} \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq 2.35 \cdot 10^{-39}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+63}:\\ \;\;\;\;t \cdot \frac{-y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 60.3% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -75000:\\
\;\;\;\;t\\

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

\mathbf{elif}\;y \leq -3.6 \cdot 10^{-74}:\\
\;\;\;\;t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -75000 or -1.7999999999999999e-43 < y < -3.6000000000000002e-74 or 4.0000000000000002e47 < y

    1. Initial program 99.8%

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

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

    if -75000 < y < -1.7999999999999999e-43

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
      2. associate-/r/75.8%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot x} \]
    5. Simplified75.8%

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

    if -3.6000000000000002e-74 < y < -1.05e-102

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t}{z}} \]
      4. distribute-rgt-neg-in55.1%

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

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

    if -1.05e-102 < y < 4.0000000000000002e47

    1. Initial program 94.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -75000:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-43}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-74}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{-102}:\\ \;\;\;\;\frac{t}{z} \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+47}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 73.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\frac{z}{x - y}}\\ t_2 := t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{if}\;y \leq -2 \cdot 10^{-72}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-229}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-40}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+58}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ t (/ z (- x y)))) (t_2 (* t (- 1.0 (/ x y)))))
   (if (<= y -2e-72)
     t_2
     (if (<= y 1.25e-229)
       t_1
       (if (<= y 1.9e-40) (* x (/ t (- z y))) (if (<= y 3.7e+58) t_1 t_2))))))
double code(double x, double y, double z, double t) {
	double t_1 = t / (z / (x - y));
	double t_2 = t * (1.0 - (x / y));
	double tmp;
	if (y <= -2e-72) {
		tmp = t_2;
	} else if (y <= 1.25e-229) {
		tmp = t_1;
	} else if (y <= 1.9e-40) {
		tmp = x * (t / (z - y));
	} else if (y <= 3.7e+58) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t / (z / (x - y))
    t_2 = t * (1.0d0 - (x / y))
    if (y <= (-2d-72)) then
        tmp = t_2
    else if (y <= 1.25d-229) then
        tmp = t_1
    else if (y <= 1.9d-40) then
        tmp = x * (t / (z - y))
    else if (y <= 3.7d+58) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t / (z / (x - y));
	double t_2 = t * (1.0 - (x / y));
	double tmp;
	if (y <= -2e-72) {
		tmp = t_2;
	} else if (y <= 1.25e-229) {
		tmp = t_1;
	} else if (y <= 1.9e-40) {
		tmp = x * (t / (z - y));
	} else if (y <= 3.7e+58) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t / (z / (x - y))
	t_2 = t * (1.0 - (x / y))
	tmp = 0
	if y <= -2e-72:
		tmp = t_2
	elif y <= 1.25e-229:
		tmp = t_1
	elif y <= 1.9e-40:
		tmp = x * (t / (z - y))
	elif y <= 3.7e+58:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t / Float64(z / Float64(x - y)))
	t_2 = Float64(t * Float64(1.0 - Float64(x / y)))
	tmp = 0.0
	if (y <= -2e-72)
		tmp = t_2;
	elseif (y <= 1.25e-229)
		tmp = t_1;
	elseif (y <= 1.9e-40)
		tmp = Float64(x * Float64(t / Float64(z - y)));
	elseif (y <= 3.7e+58)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t / (z / (x - y));
	t_2 = t * (1.0 - (x / y));
	tmp = 0.0;
	if (y <= -2e-72)
		tmp = t_2;
	elseif (y <= 1.25e-229)
		tmp = t_1;
	elseif (y <= 1.9e-40)
		tmp = x * (t / (z - y));
	elseif (y <= 3.7e+58)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e-72], t$95$2, If[LessEqual[y, 1.25e-229], t$95$1, If[LessEqual[y, 1.9e-40], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+58], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 1.25 \cdot 10^{-229}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 3.7 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.9999999999999999e-72 or 3.7000000000000002e58 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e-72 < y < 1.25000000000000004e-229 or 1.8999999999999999e-40 < y < 3.7000000000000002e58

    1. Initial program 96.1%

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

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

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

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

    if 1.25000000000000004e-229 < y < 1.8999999999999999e-40

    1. Initial program 93.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{-72}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-229}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-40}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+58}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 74.1% accurate, 0.4× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -8.3000000000000004e-69

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

    if -8.3000000000000004e-69 < y < 7.8000000000000004e-230

    1. Initial program 95.5%

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

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

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

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

    if 7.8000000000000004e-230 < y < 9e-42

    1. Initial program 93.3%

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

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

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

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

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

    if 9e-42 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot y}{-\color{blue}{\left(z + \left(-y\right)\right)}} \]
      6. distribute-neg-in70.9%

        \[\leadsto \frac{t \cdot y}{\color{blue}{\left(-z\right) + \left(-\left(-y\right)\right)}} \]
      7. remove-double-neg70.9%

        \[\leadsto \frac{t \cdot y}{\left(-z\right) + \color{blue}{y}} \]
    7. Applied egg-rr70.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.3 \cdot 10^{-69}:\\ \;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-230}:\\ \;\;\;\;\frac{t}{\frac{z}{x - y}}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{y - z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 74.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{-69} \lor \neg \left(y \leq 3.55 \cdot 10^{-43}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.4e-69 or 3.55000000000000013e-43 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

    if -4.4e-69 < y < 3.55000000000000013e-43

    1. Initial program 94.6%

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

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

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

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

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

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

Alternative 8: 68.8% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.19999999999999999e99 or 1.99999999999999989e49 < y

    1. Initial program 99.9%

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

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

    if -3.19999999999999999e99 < y < 1.99999999999999989e49

    1. Initial program 96.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+99}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \frac{t}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 75.1% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.0399999999999999e-70

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

    if -1.0399999999999999e-70 < y < 8.59999999999999964

    1. Initial program 95.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x}}} \]
    7. Simplified79.8%

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

    if 8.59999999999999964 < y

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot y}{\color{blue}{\left(-z\right) + \left(-\left(-y\right)\right)}} \]
      7. remove-double-neg73.8%

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

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

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

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

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

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

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

Alternative 10: 39.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-122}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.2000000000000001e-122 or 2.1499999999999999e-72 < y

    1. Initial program 99.8%

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

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

    if -8.2000000000000001e-122 < y < 2.1499999999999999e-72

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(-\frac{t}{z}\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u23.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(y \cdot \left(-\frac{t}{z}\right)\right)\right)} \]
      2. expm1-udef21.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \left(-\frac{t}{z}\right)\right)} - 1} \]
      3. add-sqr-sqrt18.8%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \color{blue}{\left(\sqrt{-\frac{t}{z}} \cdot \sqrt{-\frac{t}{z}}\right)}\right)} - 1 \]
      4. sqrt-unprod22.8%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \color{blue}{\sqrt{\left(-\frac{t}{z}\right) \cdot \left(-\frac{t}{z}\right)}}\right)} - 1 \]
      5. sqr-neg22.8%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \sqrt{\color{blue}{\frac{t}{z} \cdot \frac{t}{z}}}\right)} - 1 \]
      6. sqrt-unprod11.8%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \color{blue}{\left(\sqrt{\frac{t}{z}} \cdot \sqrt{\frac{t}{z}}\right)}\right)} - 1 \]
      7. add-sqr-sqrt22.7%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \color{blue}{\frac{t}{z}}\right)} - 1 \]
    10. Applied egg-rr22.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \frac{t}{z}\right)} - 1} \]
    11. Step-by-step derivation
      1. expm1-def22.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{-122}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{-72}:\\ \;\;\;\;y \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 60.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -65000:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -65000 or 7.80000000000000001e-43 < y

    1. Initial program 99.9%

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

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

    if -65000 < y < 7.80000000000000001e-43

    1. Initial program 95.2%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
      2. associate-/r/62.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -65000:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-43}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 61.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -140000:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4e5 or 3.4999999999999997e58 < y

    1. Initial program 99.9%

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

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

    if -1.4e5 < y < 3.4999999999999997e58

    1. Initial program 95.7%

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

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

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

Alternative 13: 61.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -42000:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -42000 or 8.5999999999999994e38 < y

    1. Initial program 99.9%

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

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

    if -42000 < y < 8.5999999999999994e38

    1. Initial program 95.7%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    5. Simplified60.6%

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

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

Alternative 14: 96.9% accurate, 1.0× speedup?

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

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

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

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

Alternative 15: 35.5% accurate, 9.0× speedup?

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

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

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

    \[\leadsto \color{blue}{t} \]
  4. Final simplification38.0%

    \[\leadsto t \]
  5. Add Preprocessing

Developer target: 97.0% accurate, 1.0× speedup?

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

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

Reproduce

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

  :herbie-target
  (/ t (/ (- z y) (- x y)))

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