Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B

Percentage Accurate: 89.2% → 96.8%
Time: 7.9s
Alternatives: 12
Speedup: 0.8×

Specification

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

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

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

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

Alternative 1: 96.8% accurate, 0.8× speedup?

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

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

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-/.f64N/A

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
    6. lower-/.f6497.6

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

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

Alternative 2: 75.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -5.5 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.5999999999999999e169

    1. Initial program 67.4%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
      6. lower-/.f6499.8

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

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

      \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
    6. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
      2. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
      3. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
      4. lower-/.f6493.7

        \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{z} \]
    7. Applied rewrites93.7%

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

    if -4.5999999999999999e169 < z < -5.5000000000000005e-26 or 0.0013500000000000001 < z

    1. Initial program 88.3%

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

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

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

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

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

    if -5.5000000000000005e-26 < z < 7.20000000000000019e-111

    1. Initial program 96.0%

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

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

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

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

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

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

    if 7.20000000000000019e-111 < z < 0.0013500000000000001

    1. Initial program 99.7%

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

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

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

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

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

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

Alternative 3: 93.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+101} \lor \neg \left(z \leq 4.7 \cdot 10^{+101}\right):\\
\;\;\;\;\frac{\frac{-x}{z}}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.70000000000000006e101 or 4.69999999999999971e101 < z

    1. Initial program 78.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{-x}}{z}}{t - z} \]
      7. lower--.f6489.8

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

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

    if -2.70000000000000006e101 < z < 4.69999999999999971e101

    1. Initial program 95.7%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification93.5%

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

Alternative 4: 73.8% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.5000000000000005e-26 or 0.0013500000000000001 < z

    1. Initial program 83.7%

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

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

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

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

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

    if -5.5000000000000005e-26 < z < 7.20000000000000019e-111

    1. Initial program 96.0%

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

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

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

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

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

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

    if 7.20000000000000019e-111 < z < 0.0013500000000000001

    1. Initial program 99.7%

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

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

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

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

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

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

Alternative 5: 72.3% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.5000000000000002e-108 or 2.2e11 < z

    1. Initial program 83.7%

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{\left(-z\right)} \cdot \left(y - z\right)} \]
      5. lower--.f6473.8

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

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

    if -6.5000000000000002e-108 < z < 7.20000000000000019e-111

    1. Initial program 96.6%

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

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

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

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

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

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

    if 7.20000000000000019e-111 < z < 2.2e11

    1. Initial program 99.7%

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

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

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

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

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

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

Alternative 6: 93.0% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.70000000000000006e101

    1. Initial program 72.2%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
      6. lower-/.f6499.8

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

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

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

        \[\leadsto \frac{\frac{x}{t - z}}{\color{blue}{\mathsf{neg}\left(z\right)}} \]
      2. lower-neg.f6486.8

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

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

    if -2.70000000000000006e101 < z < 4.69999999999999971e101

    1. Initial program 95.7%

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

    if 4.69999999999999971e101 < z

    1. Initial program 86.3%

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\color{blue}{-x}}{z}}{t - z} \]
      7. lower--.f6493.2

        \[\leadsto \frac{\frac{-x}{z}}{\color{blue}{t - z}} \]
    5. Applied rewrites93.2%

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

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

Alternative 7: 69.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot z}\\
\mathbf{if}\;z \leq -2.95 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.94999999999999981e-7 or 4.5999999999999996e34 < z

    1. Initial program 81.9%

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

      \[\leadsto \frac{x}{\color{blue}{{z}^{2}}} \]
    4. Step-by-step derivation
      1. unpow2N/A

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

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

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

    if -2.94999999999999981e-7 < z < 7.20000000000000019e-111

    1. Initial program 96.1%

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

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

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

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

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

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

    if 7.20000000000000019e-111 < z < 4.5999999999999996e34

    1. Initial program 99.7%

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

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

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

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

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

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

Alternative 8: 61.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot z}\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 980000000000:\\
\;\;\;\;\frac{x}{t \cdot y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.14999999999999997e-7 or 9.8e11 < z

    1. Initial program 82.6%

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

      \[\leadsto \frac{x}{\color{blue}{{z}^{2}}} \]
    4. Step-by-step derivation
      1. unpow2N/A

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

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

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

    if -1.14999999999999997e-7 < z < -4.69999999999999994e-116

    1. Initial program 93.7%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{x}{t - z}}}{y} \]
      5. lower--.f6452.2

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

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

      \[\leadsto -1 \cdot \color{blue}{\frac{x}{y \cdot z}} \]
    7. Step-by-step derivation
      1. Applied rewrites33.5%

        \[\leadsto \frac{\frac{x}{-z}}{\color{blue}{y}} \]
      2. Step-by-step derivation
        1. Applied rewrites33.5%

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

        if -4.69999999999999994e-116 < z < 9.8e11

        1. Initial program 97.2%

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

          \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
        4. Step-by-step derivation
          1. lower-*.f6469.9

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-7}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-116}:\\ \;\;\;\;\frac{-x}{y \cdot z}\\ \mathbf{elif}\;z \leq 980000000000:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 9: 69.1% accurate, 0.7× speedup?

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

        1. Initial program 81.9%

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

          \[\leadsto \frac{x}{\color{blue}{{z}^{2}}} \]
        4. Step-by-step derivation
          1. unpow2N/A

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

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

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

        if -2.94999999999999981e-7 < z < 1.55e36

        1. Initial program 96.9%

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

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

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

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

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

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

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

      Alternative 10: 61.8% accurate, 0.8× speedup?

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

        1. Initial program 82.6%

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

          \[\leadsto \frac{x}{\color{blue}{{z}^{2}}} \]
        4. Step-by-step derivation
          1. unpow2N/A

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

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

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

        if -1.55e-8 < z < 9.8e11

        1. Initial program 96.8%

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

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

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

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

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

      Alternative 11: 90.5% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+169}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (if (<= z -4.6e+169) (/ (/ x z) z) (/ x (* (- y z) (- t z)))))
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if (z <= -4.6e+169) {
      		tmp = (x / z) / z;
      	} else {
      		tmp = x / ((y - z) * (t - z));
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8) :: tmp
          if (z <= (-4.6d+169)) then
              tmp = (x / z) / z
          else
              tmp = x / ((y - z) * (t - z))
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t) {
      	double tmp;
      	if (z <= -4.6e+169) {
      		tmp = (x / z) / z;
      	} else {
      		tmp = x / ((y - z) * (t - z));
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	tmp = 0
      	if z <= -4.6e+169:
      		tmp = (x / z) / z
      	else:
      		tmp = x / ((y - z) * (t - z))
      	return tmp
      
      function code(x, y, z, t)
      	tmp = 0.0
      	if (z <= -4.6e+169)
      		tmp = Float64(Float64(x / z) / z);
      	else
      		tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t)
      	tmp = 0.0;
      	if (z <= -4.6e+169)
      		tmp = (x / z) / z;
      	else
      		tmp = x / ((y - z) * (t - z));
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := If[LessEqual[z, -4.6e+169], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -4.6 \cdot 10^{+169}:\\
      \;\;\;\;\frac{\frac{x}{z}}{z}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -4.5999999999999999e169

        1. Initial program 67.4%

          \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-/.f64N/A

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

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

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

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

            \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
          6. lower-/.f6499.8

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

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

          \[\leadsto \color{blue}{\frac{x}{{z}^{2}}} \]
        6. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
          2. associate-/r*N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
          3. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{z}}{z}} \]
          4. lower-/.f6493.7

            \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{z} \]
        7. Applied rewrites93.7%

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

        if -4.5999999999999999e169 < z

        1. Initial program 92.6%

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

      Alternative 12: 39.5% accurate, 1.4× speedup?

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
      6. Add Preprocessing

      Developer Target 1: 88.1% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;\frac{x}{t\_1} < 0:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{t\_1}\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (* (- y z) (- t z))))
         (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
      double code(double x, double y, double z, double t) {
      	double t_1 = (y - z) * (t - z);
      	double tmp;
      	if ((x / t_1) < 0.0) {
      		tmp = (x / (y - z)) / (t - z);
      	} else {
      		tmp = x * (1.0 / 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 - z) * (t - z)
          if ((x / t_1) < 0.0d0) then
              tmp = (x / (y - z)) / (t - z)
          else
              tmp = x * (1.0d0 / t_1)
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t) {
      	double t_1 = (y - z) * (t - z);
      	double tmp;
      	if ((x / t_1) < 0.0) {
      		tmp = (x / (y - z)) / (t - z);
      	} else {
      		tmp = x * (1.0 / t_1);
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	t_1 = (y - z) * (t - z)
      	tmp = 0
      	if (x / t_1) < 0.0:
      		tmp = (x / (y - z)) / (t - z)
      	else:
      		tmp = x * (1.0 / t_1)
      	return tmp
      
      function code(x, y, z, t)
      	t_1 = Float64(Float64(y - z) * Float64(t - z))
      	tmp = 0.0
      	if (Float64(x / t_1) < 0.0)
      		tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z));
      	else
      		tmp = Float64(x * Float64(1.0 / t_1));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t)
      	t_1 = (y - z) * (t - z);
      	tmp = 0.0;
      	if ((x / t_1) < 0.0)
      		tmp = (x / (y - z)) / (t - z);
      	else
      		tmp = x * (1.0 / t_1);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
      \mathbf{if}\;\frac{x}{t\_1} < 0:\\
      \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
      
      \mathbf{else}:\\
      \;\;\;\;x \cdot \frac{1}{t\_1}\\
      
      
      \end{array}
      \end{array}
      

      Reproduce

      ?
      herbie shell --seed 2024337 
      (FPCore (x y z t)
        :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
        :precision binary64
      
        :alt
        (! :herbie-platform default (if (< (/ x (* (- y z) (- t z))) 0) (/ (/ x (- y z)) (- t z)) (* x (/ 1 (* (- y z) (- t z))))))
      
        (/ x (* (- y z) (- t z))))