Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C

Percentage Accurate: 94.8% → 94.8%
Time: 9.6s
Alternatives: 13
Speedup: 1.0×

Specification

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

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

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

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

Alternative 1: 94.8% accurate, 1.0× speedup?

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

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

    \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
  2. Add Preprocessing
  3. Final simplification97.1%

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

Alternative 2: 94.5% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.1000000000000003e29 or 1 < z

    1. Initial program 98.1%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

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

        \[\leadsto x \cdot \left(\frac{y}{z} - \frac{t}{\color{blue}{\mathsf{neg}\left(z\right)}}\right) \]
      2. lower-neg.f6496.9

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

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

    if -4.1000000000000003e29 < z < 1

    1. Initial program 96.1%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{x \cdot y + -1 \cdot \left(t \cdot \left(x \cdot z\right)\right)}}{z} \]
      3. mul-1-negN/A

        \[\leadsto \frac{x \cdot y + \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot z\right)\right)\right)}}{z} \]
      4. unsub-negN/A

        \[\leadsto \frac{\color{blue}{x \cdot y - t \cdot \left(x \cdot z\right)}}{z} \]
      5. associate-*r*N/A

        \[\leadsto \frac{x \cdot y - \color{blue}{\left(t \cdot x\right) \cdot z}}{z} \]
      6. *-commutativeN/A

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

        \[\leadsto \frac{x \cdot y - \color{blue}{x \cdot \left(t \cdot z\right)}}{z} \]
      8. distribute-lft-out--N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - t \cdot z\right)}}{z} \]
      9. unsub-negN/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y + \left(\mathsf{neg}\left(t \cdot z\right)\right)\right)}}{z} \]
      10. mul-1-negN/A

        \[\leadsto \frac{x \cdot \left(y + \color{blue}{-1 \cdot \left(t \cdot z\right)}\right)}{z} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y + -1 \cdot \left(t \cdot z\right)\right)}}{z} \]
      12. mul-1-negN/A

        \[\leadsto \frac{x \cdot \left(y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}\right)}{z} \]
      13. unsub-negN/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
      14. lower--.f64N/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
      15. *-commutativeN/A

        \[\leadsto \frac{x \cdot \left(y - \color{blue}{z \cdot t}\right)}{z} \]
      16. lower-*.f6496.5

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

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

Alternative 3: 88.7% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.0000000000000001e33 or 1 < z < 8.50000000000000062e209

    1. Initial program 98.7%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
      2. lower-*.f6449.2

        \[\leadsto \frac{\color{blue}{x \cdot y}}{z} \]
    5. Applied rewrites49.2%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    6. Taylor expanded in z around inf

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(y - -1 \cdot t\right) \cdot \frac{x}{z}} \]
      3. sub-negN/A

        \[\leadsto \color{blue}{\left(y + \left(\mathsf{neg}\left(-1 \cdot t\right)\right)\right)} \cdot \frac{x}{z} \]
      4. mul-1-negN/A

        \[\leadsto \left(y + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)\right) \cdot \frac{x}{z} \]
      5. remove-double-negN/A

        \[\leadsto \left(y + \color{blue}{t}\right) \cdot \frac{x}{z} \]
      6. +-commutativeN/A

        \[\leadsto \color{blue}{\left(t + y\right)} \cdot \frac{x}{z} \]
      7. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(t + y\right) \cdot \frac{x}{z}} \]
      8. +-commutativeN/A

        \[\leadsto \color{blue}{\left(y + t\right)} \cdot \frac{x}{z} \]
      9. lower-+.f64N/A

        \[\leadsto \color{blue}{\left(y + t\right)} \cdot \frac{x}{z} \]
      10. lower-/.f6489.3

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

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

    if -9.0000000000000001e33 < z < 1

    1. Initial program 96.2%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

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

        \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
      2. distribute-neg-frac2N/A

        \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
      3. lower-/.f64N/A

        \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
      4. sub-negN/A

        \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
      5. mul-1-negN/A

        \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
      6. +-commutativeN/A

        \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + 1\right)}\right)} \]
      7. distribute-neg-inN/A

        \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}} \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \frac{t}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)} \]
      9. remove-double-negN/A

        \[\leadsto x \cdot \frac{t}{\color{blue}{z} + \left(\mathsf{neg}\left(1\right)\right)} \]
      10. metadata-evalN/A

        \[\leadsto x \cdot \frac{t}{z + \color{blue}{-1}} \]
      11. lower-+.f6432.6

        \[\leadsto x \cdot \frac{t}{\color{blue}{z + -1}} \]
    5. Applied rewrites32.6%

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

      \[\leadsto x \cdot \color{blue}{\frac{y + -1 \cdot \left(t \cdot z\right)}{z}} \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot \frac{y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}}{z} \]
      2. sub-negN/A

        \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
      3. div-subN/A

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

        \[\leadsto x \cdot \left(\frac{y}{z} - \color{blue}{t \cdot \frac{z}{z}}\right) \]
      5. *-lft-identityN/A

        \[\leadsto x \cdot \left(\frac{y}{z} - t \cdot \frac{\color{blue}{1 \cdot z}}{z}\right) \]
      6. associate-*l/N/A

        \[\leadsto x \cdot \left(\frac{y}{z} - t \cdot \color{blue}{\left(\frac{1}{z} \cdot z\right)}\right) \]
      7. lft-mult-inverseN/A

        \[\leadsto x \cdot \left(\frac{y}{z} - t \cdot \color{blue}{1}\right) \]
      8. *-rgt-identityN/A

        \[\leadsto x \cdot \left(\frac{y}{z} - \color{blue}{t}\right) \]
      9. lower--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - t\right)} \]
      10. lower-/.f6495.7

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

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

    if 8.50000000000000062e209 < z

    1. Initial program 94.5%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

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

        \[\leadsto \frac{\color{blue}{\left(y - -1 \cdot t\right) \cdot x}}{z} \]
      2. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(y - -1 \cdot t\right)\right)\right)\right)\right)} \cdot x}{z} \]
      3. neg-mul-1N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{-1 \cdot \left(y - -1 \cdot t\right)}\right)\right) \cdot x}{z} \]
      4. distribute-lft-out--N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(-1 \cdot y - -1 \cdot \left(-1 \cdot t\right)\right)}\right)\right) \cdot x}{z} \]
      5. neg-mul-1N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(-1 \cdot y - \color{blue}{\left(\mathsf{neg}\left(-1 \cdot t\right)\right)}\right)\right)\right) \cdot x}{z} \]
      6. mul-1-negN/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(-1 \cdot y - \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)\right)\right)\right) \cdot x}{z} \]
      7. remove-double-negN/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(-1 \cdot y - \color{blue}{t}\right)\right)\right) \cdot x}{z} \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(-1 \cdot y - t\right) \cdot x\right)}}{z} \]
      9. *-commutativeN/A

        \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{x \cdot \left(-1 \cdot y - t\right)}\right)}{z} \]
      10. mul-1-negN/A

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot y - t\right)\right)}}{z} \]
      11. lower-/.f64N/A

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

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

Alternative 4: 78.1% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.4e-131 or 2.70000000000000011e-13 < z < 8.50000000000000062e209

    1. Initial program 98.9%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
      2. lower-*.f6451.0

        \[\leadsto \frac{\color{blue}{x \cdot y}}{z} \]
    5. Applied rewrites51.0%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    6. Taylor expanded in z around inf

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(y - -1 \cdot t\right) \cdot \frac{x}{z}} \]
      3. sub-negN/A

        \[\leadsto \color{blue}{\left(y + \left(\mathsf{neg}\left(-1 \cdot t\right)\right)\right)} \cdot \frac{x}{z} \]
      4. mul-1-negN/A

        \[\leadsto \left(y + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)\right) \cdot \frac{x}{z} \]
      5. remove-double-negN/A

        \[\leadsto \left(y + \color{blue}{t}\right) \cdot \frac{x}{z} \]
      6. +-commutativeN/A

        \[\leadsto \color{blue}{\left(t + y\right)} \cdot \frac{x}{z} \]
      7. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(t + y\right) \cdot \frac{x}{z}} \]
      8. +-commutativeN/A

        \[\leadsto \color{blue}{\left(y + t\right)} \cdot \frac{x}{z} \]
      9. lower-+.f64N/A

        \[\leadsto \color{blue}{\left(y + t\right)} \cdot \frac{x}{z} \]
      10. lower-/.f6484.4

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

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

    if -1.4e-131 < z < 2.70000000000000011e-13

    1. Initial program 95.0%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
      2. lower-*.f6479.4

        \[\leadsto \frac{\color{blue}{x \cdot y}}{z} \]
    5. Applied rewrites79.4%

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

    if 8.50000000000000062e209 < z

    1. Initial program 94.5%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

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

        \[\leadsto \frac{\color{blue}{\left(y - -1 \cdot t\right) \cdot x}}{z} \]
      2. remove-double-negN/A

        \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(y - -1 \cdot t\right)\right)\right)\right)\right)} \cdot x}{z} \]
      3. neg-mul-1N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{-1 \cdot \left(y - -1 \cdot t\right)}\right)\right) \cdot x}{z} \]
      4. distribute-lft-out--N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(-1 \cdot y - -1 \cdot \left(-1 \cdot t\right)\right)}\right)\right) \cdot x}{z} \]
      5. neg-mul-1N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(-1 \cdot y - \color{blue}{\left(\mathsf{neg}\left(-1 \cdot t\right)\right)}\right)\right)\right) \cdot x}{z} \]
      6. mul-1-negN/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(-1 \cdot y - \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)\right)\right)\right) \cdot x}{z} \]
      7. remove-double-negN/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(-1 \cdot y - \color{blue}{t}\right)\right)\right) \cdot x}{z} \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\left(-1 \cdot y - t\right) \cdot x\right)}}{z} \]
      9. *-commutativeN/A

        \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{x \cdot \left(-1 \cdot y - t\right)}\right)}{z} \]
      10. mul-1-negN/A

        \[\leadsto \frac{\color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot y - t\right)\right)}}{z} \]
      11. lower-/.f64N/A

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

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

Alternative 5: 94.5% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.1000000000000003e29 or 1 < z

    1. Initial program 98.1%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto x \cdot \frac{\color{blue}{y + \left(\mathsf{neg}\left(-1\right)\right) \cdot t}}{z} \]
      3. metadata-evalN/A

        \[\leadsto x \cdot \frac{y + \color{blue}{1} \cdot t}{z} \]
      4. *-lft-identityN/A

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
      5. lower-+.f6496.9

        \[\leadsto x \cdot \frac{\color{blue}{y + t}}{z} \]
    5. Applied rewrites96.9%

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

    if -4.1000000000000003e29 < z < 1

    1. Initial program 96.1%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot \left(x \cdot z\right)\right) + x \cdot y}{z}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{x \cdot y + -1 \cdot \left(t \cdot \left(x \cdot z\right)\right)}}{z} \]
      3. mul-1-negN/A

        \[\leadsto \frac{x \cdot y + \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot z\right)\right)\right)}}{z} \]
      4. unsub-negN/A

        \[\leadsto \frac{\color{blue}{x \cdot y - t \cdot \left(x \cdot z\right)}}{z} \]
      5. associate-*r*N/A

        \[\leadsto \frac{x \cdot y - \color{blue}{\left(t \cdot x\right) \cdot z}}{z} \]
      6. *-commutativeN/A

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

        \[\leadsto \frac{x \cdot y - \color{blue}{x \cdot \left(t \cdot z\right)}}{z} \]
      8. distribute-lft-out--N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y - t \cdot z\right)}}{z} \]
      9. unsub-negN/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y + \left(\mathsf{neg}\left(t \cdot z\right)\right)\right)}}{z} \]
      10. mul-1-negN/A

        \[\leadsto \frac{x \cdot \left(y + \color{blue}{-1 \cdot \left(t \cdot z\right)}\right)}{z} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(y + -1 \cdot \left(t \cdot z\right)\right)}}{z} \]
      12. mul-1-negN/A

        \[\leadsto \frac{x \cdot \left(y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}\right)}{z} \]
      13. unsub-negN/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
      14. lower--.f64N/A

        \[\leadsto \frac{x \cdot \color{blue}{\left(y - t \cdot z\right)}}{z} \]
      15. *-commutativeN/A

        \[\leadsto \frac{x \cdot \left(y - \color{blue}{z \cdot t}\right)}{z} \]
      16. lower-*.f6496.5

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

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

Alternative 6: 93.2% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.0000000000000001e33 or 1 < z

    1. Initial program 98.1%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
      2. cancel-sign-sub-invN/A

        \[\leadsto x \cdot \frac{\color{blue}{y + \left(\mathsf{neg}\left(-1\right)\right) \cdot t}}{z} \]
      3. metadata-evalN/A

        \[\leadsto x \cdot \frac{y + \color{blue}{1} \cdot t}{z} \]
      4. *-lft-identityN/A

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
      5. lower-+.f6496.8

        \[\leadsto x \cdot \frac{\color{blue}{y + t}}{z} \]
    5. Applied rewrites96.8%

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

    if -9.0000000000000001e33 < z < 1

    1. Initial program 96.2%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

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

        \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
      2. distribute-neg-frac2N/A

        \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
      3. lower-/.f64N/A

        \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
      4. sub-negN/A

        \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
      5. mul-1-negN/A

        \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
      6. +-commutativeN/A

        \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + 1\right)}\right)} \]
      7. distribute-neg-inN/A

        \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}} \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \frac{t}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)} \]
      9. remove-double-negN/A

        \[\leadsto x \cdot \frac{t}{\color{blue}{z} + \left(\mathsf{neg}\left(1\right)\right)} \]
      10. metadata-evalN/A

        \[\leadsto x \cdot \frac{t}{z + \color{blue}{-1}} \]
      11. lower-+.f6432.6

        \[\leadsto x \cdot \frac{t}{\color{blue}{z + -1}} \]
    5. Applied rewrites32.6%

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

      \[\leadsto x \cdot \color{blue}{\frac{y + -1 \cdot \left(t \cdot z\right)}{z}} \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot \frac{y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}}{z} \]
      2. sub-negN/A

        \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
      3. div-subN/A

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

        \[\leadsto x \cdot \left(\frac{y}{z} - \color{blue}{t \cdot \frac{z}{z}}\right) \]
      5. *-lft-identityN/A

        \[\leadsto x \cdot \left(\frac{y}{z} - t \cdot \frac{\color{blue}{1 \cdot z}}{z}\right) \]
      6. associate-*l/N/A

        \[\leadsto x \cdot \left(\frac{y}{z} - t \cdot \color{blue}{\left(\frac{1}{z} \cdot z\right)}\right) \]
      7. lft-mult-inverseN/A

        \[\leadsto x \cdot \left(\frac{y}{z} - t \cdot \color{blue}{1}\right) \]
      8. *-rgt-identityN/A

        \[\leadsto x \cdot \left(\frac{y}{z} - \color{blue}{t}\right) \]
      9. lower--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} - t\right)} \]
      10. lower-/.f6495.7

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

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

Alternative 7: 78.2% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e-131 or 2.70000000000000011e-13 < z

    1. Initial program 98.4%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
      2. lower-*.f6451.1

        \[\leadsto \frac{\color{blue}{x \cdot y}}{z} \]
    5. Applied rewrites51.1%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    6. Taylor expanded in z around inf

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(y - -1 \cdot t\right) \cdot \frac{x}{z}} \]
      3. sub-negN/A

        \[\leadsto \color{blue}{\left(y + \left(\mathsf{neg}\left(-1 \cdot t\right)\right)\right)} \cdot \frac{x}{z} \]
      4. mul-1-negN/A

        \[\leadsto \left(y + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)\right) \cdot \frac{x}{z} \]
      5. remove-double-negN/A

        \[\leadsto \left(y + \color{blue}{t}\right) \cdot \frac{x}{z} \]
      6. +-commutativeN/A

        \[\leadsto \color{blue}{\left(t + y\right)} \cdot \frac{x}{z} \]
      7. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(t + y\right) \cdot \frac{x}{z}} \]
      8. +-commutativeN/A

        \[\leadsto \color{blue}{\left(y + t\right)} \cdot \frac{x}{z} \]
      9. lower-+.f64N/A

        \[\leadsto \color{blue}{\left(y + t\right)} \cdot \frac{x}{z} \]
      10. lower-/.f6482.8

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

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

    if -1.4e-131 < z < 2.70000000000000011e-13

    1. Initial program 95.0%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
      2. lower-*.f6479.4

        \[\leadsto \frac{\color{blue}{x \cdot y}}{z} \]
    5. Applied rewrites79.4%

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

Alternative 8: 66.8% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.80000000000000013e86

    1. Initial program 99.7%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

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

        \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
      2. distribute-neg-frac2N/A

        \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
      3. lower-/.f64N/A

        \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
      4. sub-negN/A

        \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
      5. mul-1-negN/A

        \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
      6. +-commutativeN/A

        \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + 1\right)}\right)} \]
      7. distribute-neg-inN/A

        \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}} \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \frac{t}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)} \]
      9. remove-double-negN/A

        \[\leadsto x \cdot \frac{t}{\color{blue}{z} + \left(\mathsf{neg}\left(1\right)\right)} \]
      10. metadata-evalN/A

        \[\leadsto x \cdot \frac{t}{z + \color{blue}{-1}} \]
      11. lower-+.f6489.1

        \[\leadsto x \cdot \frac{t}{\color{blue}{z + -1}} \]
    5. Applied rewrites89.1%

      \[\leadsto x \cdot \color{blue}{\frac{t}{z + -1}} \]
    6. Taylor expanded in z around inf

      \[\leadsto x \cdot \frac{t}{\color{blue}{z}} \]
    7. Step-by-step derivation
      1. Applied rewrites74.3%

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

      if -8.80000000000000013e86 < t < 9.49999999999999926e146

      1. Initial program 95.9%

        \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
      4. Step-by-step derivation
        1. lower-/.f6481.2

          \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
      5. Applied rewrites81.2%

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

      if 9.49999999999999926e146 < t

      1. Initial program 99.9%

        \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in z around 0

        \[\leadsto x \cdot \color{blue}{\frac{y + -1 \cdot \left(t \cdot z\right)}{z}} \]
      4. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto x \cdot \color{blue}{\frac{y + -1 \cdot \left(t \cdot z\right)}{z}} \]
        2. mul-1-negN/A

          \[\leadsto x \cdot \frac{y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}}{z} \]
        3. unsub-negN/A

          \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
        4. lower--.f64N/A

          \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
        5. *-commutativeN/A

          \[\leadsto x \cdot \frac{y - \color{blue}{z \cdot t}}{z} \]
        6. lower-*.f6462.7

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

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

        \[\leadsto x \cdot \left(-1 \cdot \color{blue}{t}\right) \]
      7. Step-by-step derivation
        1. Applied rewrites55.3%

          \[\leadsto x \cdot \left(-t\right) \]
      8. Recombined 3 regimes into one program.
      9. Add Preprocessing

      Alternative 9: 65.7% accurate, 1.2× speedup?

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

        1. Initial program 99.7%

          \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

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

            \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
          2. distribute-neg-frac2N/A

            \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
          4. sub-negN/A

            \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
          5. mul-1-negN/A

            \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
          6. +-commutativeN/A

            \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + 1\right)}\right)} \]
          7. distribute-neg-inN/A

            \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}} \]
          8. mul-1-negN/A

            \[\leadsto x \cdot \frac{t}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)} \]
          9. remove-double-negN/A

            \[\leadsto x \cdot \frac{t}{\color{blue}{z} + \left(\mathsf{neg}\left(1\right)\right)} \]
          10. metadata-evalN/A

            \[\leadsto x \cdot \frac{t}{z + \color{blue}{-1}} \]
          11. lower-+.f6489.1

            \[\leadsto x \cdot \frac{t}{\color{blue}{z + -1}} \]
        5. Applied rewrites89.1%

          \[\leadsto x \cdot \color{blue}{\frac{t}{z + -1}} \]
        6. Taylor expanded in z around inf

          \[\leadsto x \cdot \frac{t}{\color{blue}{z}} \]
        7. Step-by-step derivation
          1. Applied rewrites74.3%

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

          if -1.2200000000000001e87 < t < 9.49999999999999926e146

          1. Initial program 95.9%

            \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in y around inf

            \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
            2. lower-*.f6479.3

              \[\leadsto \frac{\color{blue}{x \cdot y}}{z} \]
          5. Applied rewrites79.3%

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

          if 9.49999999999999926e146 < t

          1. Initial program 99.9%

            \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in z around 0

            \[\leadsto x \cdot \color{blue}{\frac{y + -1 \cdot \left(t \cdot z\right)}{z}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto x \cdot \color{blue}{\frac{y + -1 \cdot \left(t \cdot z\right)}{z}} \]
            2. mul-1-negN/A

              \[\leadsto x \cdot \frac{y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}}{z} \]
            3. unsub-negN/A

              \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
            4. lower--.f64N/A

              \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
            5. *-commutativeN/A

              \[\leadsto x \cdot \frac{y - \color{blue}{z \cdot t}}{z} \]
            6. lower-*.f6462.7

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

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

            \[\leadsto x \cdot \left(-1 \cdot \color{blue}{t}\right) \]
          7. Step-by-step derivation
            1. Applied rewrites55.3%

              \[\leadsto x \cdot \left(-t\right) \]
          8. Recombined 3 regimes into one program.
          9. Add Preprocessing

          Alternative 10: 64.3% accurate, 1.2× speedup?

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

            1. Initial program 99.7%

              \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
            2. Add Preprocessing
            3. Taylor expanded in y around inf

              \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
            4. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
              2. lower-*.f6419.6

                \[\leadsto \frac{\color{blue}{x \cdot y}}{z} \]
            5. Applied rewrites19.6%

              \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
            6. Taylor expanded in z around inf

              \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
            7. Step-by-step derivation
              1. *-commutativeN/A

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

                \[\leadsto \color{blue}{\left(y - -1 \cdot t\right) \cdot \frac{x}{z}} \]
              3. sub-negN/A

                \[\leadsto \color{blue}{\left(y + \left(\mathsf{neg}\left(-1 \cdot t\right)\right)\right)} \cdot \frac{x}{z} \]
              4. mul-1-negN/A

                \[\leadsto \left(y + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)\right) \cdot \frac{x}{z} \]
              5. remove-double-negN/A

                \[\leadsto \left(y + \color{blue}{t}\right) \cdot \frac{x}{z} \]
              6. +-commutativeN/A

                \[\leadsto \color{blue}{\left(t + y\right)} \cdot \frac{x}{z} \]
              7. lower-*.f64N/A

                \[\leadsto \color{blue}{\left(t + y\right) \cdot \frac{x}{z}} \]
              8. +-commutativeN/A

                \[\leadsto \color{blue}{\left(y + t\right)} \cdot \frac{x}{z} \]
              9. lower-+.f64N/A

                \[\leadsto \color{blue}{\left(y + t\right)} \cdot \frac{x}{z} \]
              10. lower-/.f6470.1

                \[\leadsto \left(y + t\right) \cdot \color{blue}{\frac{x}{z}} \]
            8. Applied rewrites70.1%

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

              \[\leadsto \frac{t \cdot x}{\color{blue}{z}} \]
            10. Step-by-step derivation
              1. Applied rewrites58.2%

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

              if -1.2200000000000001e87 < t < 9.49999999999999926e146

              1. Initial program 95.9%

                \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in y around inf

                \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
              4. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
                2. lower-*.f6479.3

                  \[\leadsto \frac{\color{blue}{x \cdot y}}{z} \]
              5. Applied rewrites79.3%

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

              if 9.49999999999999926e146 < t

              1. Initial program 99.9%

                \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in z around 0

                \[\leadsto x \cdot \color{blue}{\frac{y + -1 \cdot \left(t \cdot z\right)}{z}} \]
              4. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto x \cdot \color{blue}{\frac{y + -1 \cdot \left(t \cdot z\right)}{z}} \]
                2. mul-1-negN/A

                  \[\leadsto x \cdot \frac{y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}}{z} \]
                3. unsub-negN/A

                  \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
                4. lower--.f64N/A

                  \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
                5. *-commutativeN/A

                  \[\leadsto x \cdot \frac{y - \color{blue}{z \cdot t}}{z} \]
                6. lower-*.f6462.7

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

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

                \[\leadsto x \cdot \left(-1 \cdot \color{blue}{t}\right) \]
              7. Step-by-step derivation
                1. Applied rewrites55.3%

                  \[\leadsto x \cdot \left(-t\right) \]
              8. Recombined 3 regimes into one program.
              9. Add Preprocessing

              Alternative 11: 64.7% accurate, 1.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.22 \cdot 10^{+87}:\\ \;\;\;\;\frac{x \cdot t}{z}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+244}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \end{array} \end{array} \]
              (FPCore (x y z t)
               :precision binary64
               (if (<= t -1.22e+87)
                 (/ (* x t) z)
                 (if (<= t 1.7e+244) (* y (/ x z)) (* x (- t)))))
              double code(double x, double y, double z, double t) {
              	double tmp;
              	if (t <= -1.22e+87) {
              		tmp = (x * t) / z;
              	} else if (t <= 1.7e+244) {
              		tmp = y * (x / z);
              	} else {
              		tmp = 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 (t <= (-1.22d+87)) then
                      tmp = (x * t) / z
                  else if (t <= 1.7d+244) then
                      tmp = y * (x / z)
                  else
                      tmp = x * -t
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t) {
              	double tmp;
              	if (t <= -1.22e+87) {
              		tmp = (x * t) / z;
              	} else if (t <= 1.7e+244) {
              		tmp = y * (x / z);
              	} else {
              		tmp = x * -t;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t):
              	tmp = 0
              	if t <= -1.22e+87:
              		tmp = (x * t) / z
              	elif t <= 1.7e+244:
              		tmp = y * (x / z)
              	else:
              		tmp = x * -t
              	return tmp
              
              function code(x, y, z, t)
              	tmp = 0.0
              	if (t <= -1.22e+87)
              		tmp = Float64(Float64(x * t) / z);
              	elseif (t <= 1.7e+244)
              		tmp = Float64(y * Float64(x / z));
              	else
              		tmp = Float64(x * Float64(-t));
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t)
              	tmp = 0.0;
              	if (t <= -1.22e+87)
              		tmp = (x * t) / z;
              	elseif (t <= 1.7e+244)
              		tmp = y * (x / z);
              	else
              		tmp = x * -t;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_] := If[LessEqual[t, -1.22e+87], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 1.7e+244], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;t \leq -1.22 \cdot 10^{+87}:\\
              \;\;\;\;\frac{x \cdot t}{z}\\
              
              \mathbf{elif}\;t \leq 1.7 \cdot 10^{+244}:\\
              \;\;\;\;y \cdot \frac{x}{z}\\
              
              \mathbf{else}:\\
              \;\;\;\;x \cdot \left(-t\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if t < -1.2200000000000001e87

                1. Initial program 99.7%

                  \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
                2. Add Preprocessing
                3. Taylor expanded in y around inf

                  \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
                4. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
                  2. lower-*.f6419.6

                    \[\leadsto \frac{\color{blue}{x \cdot y}}{z} \]
                5. Applied rewrites19.6%

                  \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
                6. Taylor expanded in z around inf

                  \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
                7. Step-by-step derivation
                  1. *-commutativeN/A

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

                    \[\leadsto \color{blue}{\left(y - -1 \cdot t\right) \cdot \frac{x}{z}} \]
                  3. sub-negN/A

                    \[\leadsto \color{blue}{\left(y + \left(\mathsf{neg}\left(-1 \cdot t\right)\right)\right)} \cdot \frac{x}{z} \]
                  4. mul-1-negN/A

                    \[\leadsto \left(y + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)\right) \cdot \frac{x}{z} \]
                  5. remove-double-negN/A

                    \[\leadsto \left(y + \color{blue}{t}\right) \cdot \frac{x}{z} \]
                  6. +-commutativeN/A

                    \[\leadsto \color{blue}{\left(t + y\right)} \cdot \frac{x}{z} \]
                  7. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left(t + y\right) \cdot \frac{x}{z}} \]
                  8. +-commutativeN/A

                    \[\leadsto \color{blue}{\left(y + t\right)} \cdot \frac{x}{z} \]
                  9. lower-+.f64N/A

                    \[\leadsto \color{blue}{\left(y + t\right)} \cdot \frac{x}{z} \]
                  10. lower-/.f6470.1

                    \[\leadsto \left(y + t\right) \cdot \color{blue}{\frac{x}{z}} \]
                8. Applied rewrites70.1%

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

                  \[\leadsto \frac{t \cdot x}{\color{blue}{z}} \]
                10. Step-by-step derivation
                  1. Applied rewrites58.2%

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

                  if -1.2200000000000001e87 < t < 1.70000000000000005e244

                  1. Initial program 96.3%

                    \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
                  2. Add Preprocessing
                  3. Taylor expanded in y around inf

                    \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
                  4. Step-by-step derivation
                    1. lower-/.f64N/A

                      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
                    2. lower-*.f6475.3

                      \[\leadsto \frac{\color{blue}{x \cdot y}}{z} \]
                  5. Applied rewrites75.3%

                    \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
                  6. Step-by-step derivation
                    1. Applied rewrites72.8%

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

                    if 1.70000000000000005e244 < t

                    1. Initial program 100.0%

                      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
                    2. Add Preprocessing
                    3. Taylor expanded in z around 0

                      \[\leadsto x \cdot \color{blue}{\frac{y + -1 \cdot \left(t \cdot z\right)}{z}} \]
                    4. Step-by-step derivation
                      1. lower-/.f64N/A

                        \[\leadsto x \cdot \color{blue}{\frac{y + -1 \cdot \left(t \cdot z\right)}{z}} \]
                      2. mul-1-negN/A

                        \[\leadsto x \cdot \frac{y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}}{z} \]
                      3. unsub-negN/A

                        \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
                      4. lower--.f64N/A

                        \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
                      5. *-commutativeN/A

                        \[\leadsto x \cdot \frac{y - \color{blue}{z \cdot t}}{z} \]
                      6. lower-*.f6467.6

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

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

                      \[\leadsto x \cdot \left(-1 \cdot \color{blue}{t}\right) \]
                    7. Step-by-step derivation
                      1. Applied rewrites68.1%

                        \[\leadsto x \cdot \left(-t\right) \]
                    8. Recombined 3 regimes into one program.
                    9. Final simplification69.9%

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

                    Alternative 12: 42.9% accurate, 1.2× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot t}{z}\\ \mathbf{if}\;z \leq -0.75:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x \cdot \left(-\mathsf{fma}\left(z, t, t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                    (FPCore (x y z t)
                     :precision binary64
                     (let* ((t_1 (/ (* x t) z)))
                       (if (<= z -0.75) t_1 (if (<= z 1.0) (* x (- (fma z t t))) t_1))))
                    double code(double x, double y, double z, double t) {
                    	double t_1 = (x * t) / z;
                    	double tmp;
                    	if (z <= -0.75) {
                    		tmp = t_1;
                    	} else if (z <= 1.0) {
                    		tmp = x * -fma(z, t, t);
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t)
                    	t_1 = Float64(Float64(x * t) / z)
                    	tmp = 0.0
                    	if (z <= -0.75)
                    		tmp = t_1;
                    	elseif (z <= 1.0)
                    		tmp = Float64(x * Float64(-fma(z, t, t)));
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -0.75], t$95$1, If[LessEqual[z, 1.0], N[(x * (-N[(z * t + t), $MachinePrecision])), $MachinePrecision], t$95$1]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \frac{x \cdot t}{z}\\
                    \mathbf{if}\;z \leq -0.75:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;z \leq 1:\\
                    \;\;\;\;x \cdot \left(-\mathsf{fma}\left(z, t, t\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z < -0.75 or 1 < z

                      1. Initial program 98.2%

                        \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
                      2. Add Preprocessing
                      3. Taylor expanded in y around inf

                        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
                      4. Step-by-step derivation
                        1. lower-/.f64N/A

                          \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
                        2. lower-*.f6450.2

                          \[\leadsto \frac{\color{blue}{x \cdot y}}{z} \]
                      5. Applied rewrites50.2%

                        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
                      6. Taylor expanded in z around inf

                        \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
                      7. Step-by-step derivation
                        1. *-commutativeN/A

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

                          \[\leadsto \color{blue}{\left(y - -1 \cdot t\right) \cdot \frac{x}{z}} \]
                        3. sub-negN/A

                          \[\leadsto \color{blue}{\left(y + \left(\mathsf{neg}\left(-1 \cdot t\right)\right)\right)} \cdot \frac{x}{z} \]
                        4. mul-1-negN/A

                          \[\leadsto \left(y + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)\right) \cdot \frac{x}{z} \]
                        5. remove-double-negN/A

                          \[\leadsto \left(y + \color{blue}{t}\right) \cdot \frac{x}{z} \]
                        6. +-commutativeN/A

                          \[\leadsto \color{blue}{\left(t + y\right)} \cdot \frac{x}{z} \]
                        7. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(t + y\right) \cdot \frac{x}{z}} \]
                        8. +-commutativeN/A

                          \[\leadsto \color{blue}{\left(y + t\right)} \cdot \frac{x}{z} \]
                        9. lower-+.f64N/A

                          \[\leadsto \color{blue}{\left(y + t\right)} \cdot \frac{x}{z} \]
                        10. lower-/.f6487.0

                          \[\leadsto \left(y + t\right) \cdot \color{blue}{\frac{x}{z}} \]
                      8. Applied rewrites87.0%

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

                        \[\leadsto \frac{t \cdot x}{\color{blue}{z}} \]
                      10. Step-by-step derivation
                        1. Applied rewrites51.2%

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

                        if -0.75 < z < 1

                        1. Initial program 96.0%

                          \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
                        2. Add Preprocessing
                        3. Taylor expanded in y around 0

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

                            \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{t}{1 - z}\right)\right)} \]
                          2. distribute-neg-frac2N/A

                            \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                          3. lower-/.f64N/A

                            \[\leadsto x \cdot \color{blue}{\frac{t}{\mathsf{neg}\left(\left(1 - z\right)\right)}} \]
                          4. sub-negN/A

                            \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
                          5. mul-1-negN/A

                            \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\left(1 + \color{blue}{-1 \cdot z}\right)\right)} \]
                          6. +-commutativeN/A

                            \[\leadsto x \cdot \frac{t}{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + 1\right)}\right)} \]
                          7. distribute-neg-inN/A

                            \[\leadsto x \cdot \frac{t}{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(1\right)\right)}} \]
                          8. mul-1-negN/A

                            \[\leadsto x \cdot \frac{t}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(1\right)\right)} \]
                          9. remove-double-negN/A

                            \[\leadsto x \cdot \frac{t}{\color{blue}{z} + \left(\mathsf{neg}\left(1\right)\right)} \]
                          10. metadata-evalN/A

                            \[\leadsto x \cdot \frac{t}{z + \color{blue}{-1}} \]
                          11. lower-+.f6432.7

                            \[\leadsto x \cdot \frac{t}{\color{blue}{z + -1}} \]
                        5. Applied rewrites32.7%

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

                          \[\leadsto x \cdot \left(-1 \cdot t + \color{blue}{-1 \cdot \left(t \cdot z\right)}\right) \]
                        7. Step-by-step derivation
                          1. Applied rewrites32.5%

                            \[\leadsto x \cdot \left(-\mathsf{fma}\left(z, t, t\right)\right) \]
                        8. Recombined 2 regimes into one program.
                        9. Add Preprocessing

                        Alternative 13: 22.9% accurate, 4.3× speedup?

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

                          \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
                        2. Add Preprocessing
                        3. Taylor expanded in z around 0

                          \[\leadsto x \cdot \color{blue}{\frac{y + -1 \cdot \left(t \cdot z\right)}{z}} \]
                        4. Step-by-step derivation
                          1. lower-/.f64N/A

                            \[\leadsto x \cdot \color{blue}{\frac{y + -1 \cdot \left(t \cdot z\right)}{z}} \]
                          2. mul-1-negN/A

                            \[\leadsto x \cdot \frac{y + \color{blue}{\left(\mathsf{neg}\left(t \cdot z\right)\right)}}{z} \]
                          3. unsub-negN/A

                            \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
                          4. lower--.f64N/A

                            \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
                          5. *-commutativeN/A

                            \[\leadsto x \cdot \frac{y - \color{blue}{z \cdot t}}{z} \]
                          6. lower-*.f6463.9

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

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

                          \[\leadsto x \cdot \left(-1 \cdot \color{blue}{t}\right) \]
                        7. Step-by-step derivation
                          1. Applied rewrites21.6%

                            \[\leadsto x \cdot \left(-t\right) \]
                          2. Add Preprocessing

                          Developer Target 1: 95.2% accurate, 0.3× speedup?

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

                          Reproduce

                          ?
                          herbie shell --seed 2024238 
                          (FPCore (x y z t)
                            :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
                            :precision binary64
                          
                            :alt
                            (! :herbie-platform default (if (< (* x (- (/ y z) (/ t (- 1 z)))) -3811613151656021/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* x (- (/ y z) (* t (/ 1 (- 1 z))))) (if (< (* x (- (/ y z) (/ t (- 1 z)))) 7066972463851151/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (/ (* y x) z) (- (/ (* t x) (- 1 z)))) (* x (- (/ y z) (* t (/ 1 (- 1 z))))))))
                          
                            (* x (- (/ y z) (/ t (- 1.0 z)))))