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

Percentage Accurate: 89.0% → 96.9%
Time: 6.8s
Alternatives: 11
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 11 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.0% 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.9% 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 88.9%

    \[\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.7

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

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

Alternative 2: 93.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ t_2 := \frac{x}{t - z}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{t\_2}{y}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+286}:\\ \;\;\;\;\frac{x}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_2}{-z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- y z) (- t z))) (t_2 (/ x (- t z))))
   (if (<= t_1 (- INFINITY))
     (/ t_2 y)
     (if (<= t_1 5e+286) (/ x t_1) (/ t_2 (- z))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double t_2 = x / (t - z);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_2 / y;
	} else if (t_1 <= 5e+286) {
		tmp = x / t_1;
	} else {
		tmp = t_2 / -z;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = (y - z) * (t - z);
	double t_2 = x / (t - z);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = t_2 / y;
	} else if (t_1 <= 5e+286) {
		tmp = x / t_1;
	} else {
		tmp = t_2 / -z;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y - z) * (t - z)
	t_2 = x / (t - z)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = t_2 / y
	elif t_1 <= 5e+286:
		tmp = x / t_1
	else:
		tmp = t_2 / -z
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y - z) * Float64(t - z))
	t_2 = Float64(x / Float64(t - z))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(t_2 / y);
	elseif (t_1 <= 5e+286)
		tmp = Float64(x / t_1);
	else
		tmp = Float64(t_2 / Float64(-z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y - z) * (t - z);
	t_2 = x / (t - z);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = t_2 / y;
	elseif (t_1 <= 5e+286)
		tmp = x / t_1;
	else
		tmp = t_2 / -z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(t$95$2 / y), $MachinePrecision], If[LessEqual[t$95$1, 5e+286], N[(x / t$95$1), $MachinePrecision], N[(t$95$2 / (-z)), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
t_2 := \frac{x}{t - z}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{t\_2}{y}\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;\frac{x}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0

    1. Initial program 63.0%

      \[\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--.f6495.5

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

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

    if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 5.0000000000000004e286

    1. Initial program 95.6%

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

    if 5.0000000000000004e286 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 81.7%

      \[\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.9

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

      \[\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.f6490.8

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

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

Alternative 3: 66.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\left(z + y\right) \cdot t}\\ \mathbf{if}\;t \leq -1.02 \cdot 10^{-81}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-22}:\\ \;\;\;\;\frac{x}{\left(z - y\right) \cdot z}\\ \mathbf{elif}\;t \leq 6.9 \cdot 10^{+33} \lor \neg \left(t \leq 1.06 \cdot 10^{+119}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(-z\right) \cdot t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (* (+ z y) t))))
   (if (<= t -1.02e-81)
     t_1
     (if (<= t 1.75e-22)
       (/ x (* (- z y) z))
       (if (or (<= t 6.9e+33) (not (<= t 1.06e+119)))
         t_1
         (/ x (* (- z) t)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / ((z + y) * t);
	double tmp;
	if (t <= -1.02e-81) {
		tmp = t_1;
	} else if (t <= 1.75e-22) {
		tmp = x / ((z - y) * z);
	} else if ((t <= 6.9e+33) || !(t <= 1.06e+119)) {
		tmp = t_1;
	} else {
		tmp = x / (-z * t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x / ((z + y) * t)
    if (t <= (-1.02d-81)) then
        tmp = t_1
    else if (t <= 1.75d-22) then
        tmp = x / ((z - y) * z)
    else if ((t <= 6.9d+33) .or. (.not. (t <= 1.06d+119))) then
        tmp = t_1
    else
        tmp = x / (-z * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x / ((z + y) * t);
	double tmp;
	if (t <= -1.02e-81) {
		tmp = t_1;
	} else if (t <= 1.75e-22) {
		tmp = x / ((z - y) * z);
	} else if ((t <= 6.9e+33) || !(t <= 1.06e+119)) {
		tmp = t_1;
	} else {
		tmp = x / (-z * t);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / ((z + y) * t)
	tmp = 0
	if t <= -1.02e-81:
		tmp = t_1
	elif t <= 1.75e-22:
		tmp = x / ((z - y) * z)
	elif (t <= 6.9e+33) or not (t <= 1.06e+119):
		tmp = t_1
	else:
		tmp = x / (-z * t)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(Float64(z + y) * t))
	tmp = 0.0
	if (t <= -1.02e-81)
		tmp = t_1;
	elseif (t <= 1.75e-22)
		tmp = Float64(x / Float64(Float64(z - y) * z));
	elseif ((t <= 6.9e+33) || !(t <= 1.06e+119))
		tmp = t_1;
	else
		tmp = Float64(x / Float64(Float64(-z) * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / ((z + y) * t);
	tmp = 0.0;
	if (t <= -1.02e-81)
		tmp = t_1;
	elseif (t <= 1.75e-22)
		tmp = x / ((z - y) * z);
	elseif ((t <= 6.9e+33) || ~((t <= 1.06e+119)))
		tmp = t_1;
	else
		tmp = x / (-z * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(z + y), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.02e-81], t$95$1, If[LessEqual[t, 1.75e-22], N[(x / N[(N[(z - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 6.9e+33], N[Not[LessEqual[t, 1.06e+119]], $MachinePrecision]], t$95$1, N[(x / N[((-z) * t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 6.9 \cdot 10^{+33} \lor \neg \left(t \leq 1.06 \cdot 10^{+119}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.01999999999999998e-81 or 1.75000000000000003e-22 < t < 6.8999999999999995e33 or 1.0599999999999999e119 < t

    1. Initial program 86.3%

      \[\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.2

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

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

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

      if -1.01999999999999998e-81 < t < 1.75000000000000003e-22

      1. Initial program 90.3%

        \[\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--.f6477.5

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

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

        \[\leadsto \frac{x}{-1 \cdot \left(y \cdot z\right) + \color{blue}{{z}^{2}}} \]
      7. Step-by-step derivation
        1. Applied rewrites77.5%

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

        if 6.8999999999999995e33 < t < 1.0599999999999999e119

        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--.f6485.3

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.02 \cdot 10^{-81}:\\ \;\;\;\;\frac{x}{\left(z + y\right) \cdot t}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-22}:\\ \;\;\;\;\frac{x}{\left(z - y\right) \cdot z}\\ \mathbf{elif}\;t \leq 6.9 \cdot 10^{+33} \lor \neg \left(t \leq 1.06 \cdot 10^{+119}\right):\\ \;\;\;\;\frac{x}{\left(z + y\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(-z\right) \cdot t}\\ \end{array} \]
        10. Add Preprocessing

        Alternative 4: 60.3% accurate, 0.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{z \cdot z}\\ t_2 := \frac{x}{\left(-z\right) \cdot t}\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-137}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-49}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{elif}\;z \leq 0.55:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (/ x (* z z))) (t_2 (/ x (* (- z) t))))
           (if (<= z -3.4e+68)
             t_1
             (if (<= z -1.6e-137)
               t_2
               (if (<= z 2.15e-49) (/ x (* t y)) (if (<= z 0.55) t_2 t_1))))))
        double code(double x, double y, double z, double t) {
        	double t_1 = x / (z * z);
        	double t_2 = x / (-z * t);
        	double tmp;
        	if (z <= -3.4e+68) {
        		tmp = t_1;
        	} else if (z <= -1.6e-137) {
        		tmp = t_2;
        	} else if (z <= 2.15e-49) {
        		tmp = x / (t * y);
        	} else if (z <= 0.55) {
        		tmp = t_2;
        	} 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 / (z * z)
            t_2 = x / (-z * t)
            if (z <= (-3.4d+68)) then
                tmp = t_1
            else if (z <= (-1.6d-137)) then
                tmp = t_2
            else if (z <= 2.15d-49) then
                tmp = x / (t * y)
            else if (z <= 0.55d0) then
                tmp = t_2
            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 t_2 = x / (-z * t);
        	double tmp;
        	if (z <= -3.4e+68) {
        		tmp = t_1;
        	} else if (z <= -1.6e-137) {
        		tmp = t_2;
        	} else if (z <= 2.15e-49) {
        		tmp = x / (t * y);
        	} else if (z <= 0.55) {
        		tmp = t_2;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	t_1 = x / (z * z)
        	t_2 = x / (-z * t)
        	tmp = 0
        	if z <= -3.4e+68:
        		tmp = t_1
        	elif z <= -1.6e-137:
        		tmp = t_2
        	elif z <= 2.15e-49:
        		tmp = x / (t * y)
        	elif z <= 0.55:
        		tmp = t_2
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t)
        	t_1 = Float64(x / Float64(z * z))
        	t_2 = Float64(x / Float64(Float64(-z) * t))
        	tmp = 0.0
        	if (z <= -3.4e+68)
        		tmp = t_1;
        	elseif (z <= -1.6e-137)
        		tmp = t_2;
        	elseif (z <= 2.15e-49)
        		tmp = Float64(x / Float64(t * y));
        	elseif (z <= 0.55)
        		tmp = t_2;
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	t_1 = x / (z * z);
        	t_2 = x / (-z * t);
        	tmp = 0.0;
        	if (z <= -3.4e+68)
        		tmp = t_1;
        	elseif (z <= -1.6e-137)
        		tmp = t_2;
        	elseif (z <= 2.15e-49)
        		tmp = x / (t * y);
        	elseif (z <= 0.55)
        		tmp = t_2;
        	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]}, Block[{t$95$2 = N[(x / N[((-z) * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e+68], t$95$1, If[LessEqual[z, -1.6e-137], t$95$2, If[LessEqual[z, 2.15e-49], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.55], t$95$2, t$95$1]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{x}{z \cdot z}\\
        t_2 := \frac{x}{\left(-z\right) \cdot t}\\
        \mathbf{if}\;z \leq -3.4 \cdot 10^{+68}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq -1.6 \cdot 10^{-137}:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;z \leq 2.15 \cdot 10^{-49}:\\
        \;\;\;\;\frac{x}{t \cdot y}\\
        
        \mathbf{elif}\;z \leq 0.55:\\
        \;\;\;\;t\_2\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -3.40000000000000015e68 or 0.55000000000000004 < z

          1. Initial program 87.3%

            \[\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-*.f6476.9

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

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

          if -3.40000000000000015e68 < z < -1.60000000000000011e-137 or 2.15000000000000008e-49 < z < 0.55000000000000004

          1. Initial program 92.1%

            \[\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--.f6448.1

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

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

            \[\leadsto \frac{x}{\left(-1 \cdot z\right) \cdot t} \]
          7. Step-by-step derivation
            1. Applied rewrites34.1%

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

            if -1.60000000000000011e-137 < z < 2.15000000000000008e-49

            1. Initial program 88.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-*.f6458.7

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

              \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
          8. Recombined 3 regimes into one program.
          9. Add Preprocessing

          Alternative 5: 90.5% accurate, 0.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{\frac{x}{t - z}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t\_1}\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (* (- y z) (- t z))))
             (if (<= t_1 (- INFINITY)) (/ (/ x (- t z)) y) (/ x t_1))))
          double code(double x, double y, double z, double t) {
          	double t_1 = (y - z) * (t - z);
          	double tmp;
          	if (t_1 <= -((double) INFINITY)) {
          		tmp = (x / (t - z)) / y;
          	} else {
          		tmp = x / t_1;
          	}
          	return tmp;
          }
          
          public static double code(double x, double y, double z, double t) {
          	double t_1 = (y - z) * (t - z);
          	double tmp;
          	if (t_1 <= -Double.POSITIVE_INFINITY) {
          		tmp = (x / (t - z)) / y;
          	} else {
          		tmp = x / t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	t_1 = (y - z) * (t - z)
          	tmp = 0
          	if t_1 <= -math.inf:
          		tmp = (x / (t - z)) / y
          	else:
          		tmp = x / t_1
          	return tmp
          
          function code(x, y, z, t)
          	t_1 = Float64(Float64(y - z) * Float64(t - z))
          	tmp = 0.0
          	if (t_1 <= Float64(-Inf))
          		tmp = Float64(Float64(x / Float64(t - z)) / y);
          	else
          		tmp = Float64(x / t_1);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	t_1 = (y - z) * (t - z);
          	tmp = 0.0;
          	if (t_1 <= -Inf)
          		tmp = (x / (t - z)) / y;
          	else
          		tmp = x / 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[LessEqual[t$95$1, (-Infinity)], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / t$95$1), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
          \mathbf{if}\;t\_1 \leq -\infty:\\
          \;\;\;\;\frac{\frac{x}{t - z}}{y}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{x}{t\_1}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0

            1. Initial program 63.0%

              \[\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--.f6495.5

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

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

            if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z))

            1. Initial program 91.3%

              \[\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 6: 89.0% accurate, 0.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t\_1}\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (* (- y z) (- t z))))
             (if (<= t_1 (- INFINITY)) (/ (/ x y) t) (/ x t_1))))
          double code(double x, double y, double z, double t) {
          	double t_1 = (y - z) * (t - z);
          	double tmp;
          	if (t_1 <= -((double) INFINITY)) {
          		tmp = (x / y) / t;
          	} else {
          		tmp = x / t_1;
          	}
          	return tmp;
          }
          
          public static double code(double x, double y, double z, double t) {
          	double t_1 = (y - z) * (t - z);
          	double tmp;
          	if (t_1 <= -Double.POSITIVE_INFINITY) {
          		tmp = (x / y) / t;
          	} else {
          		tmp = x / t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	t_1 = (y - z) * (t - z)
          	tmp = 0
          	if t_1 <= -math.inf:
          		tmp = (x / y) / t
          	else:
          		tmp = x / t_1
          	return tmp
          
          function code(x, y, z, t)
          	t_1 = Float64(Float64(y - z) * Float64(t - z))
          	tmp = 0.0
          	if (t_1 <= Float64(-Inf))
          		tmp = Float64(Float64(x / y) / t);
          	else
          		tmp = Float64(x / t_1);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	t_1 = (y - z) * (t - z);
          	tmp = 0.0;
          	if (t_1 <= -Inf)
          		tmp = (x / y) / t;
          	else
          		tmp = x / 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[LessEqual[t$95$1, (-Infinity)], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], N[(x / t$95$1), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
          \mathbf{if}\;t\_1 \leq -\infty:\\
          \;\;\;\;\frac{\frac{x}{y}}{t}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{x}{t\_1}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0

            1. Initial program 63.0%

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

              \[\leadsto \color{blue}{\frac{x}{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. associate-/r*N/A

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

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

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

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

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

              \[\leadsto \frac{\frac{x}{y}}{t} \]
            7. Step-by-step derivation
              1. Applied rewrites78.3%

                \[\leadsto \frac{\frac{x}{y}}{t} \]

              if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z))

              1. Initial program 91.3%

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

            Alternative 7: 72.6% accurate, 0.7× speedup?

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

              1. Initial program 87.3%

                \[\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.0

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

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

                \[\leadsto \frac{x}{-1 \cdot \left(y \cdot z\right) + \color{blue}{{z}^{2}}} \]
              7. Step-by-step derivation
                1. Applied rewrites73.0%

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

                if -3.7000000000000002e-87 < z < 2.99999999999999973e-8

                1. Initial program 91.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--.f6476.9

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

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

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

              Alternative 8: 69.6% accurate, 0.7× speedup?

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

                1. Initial program 89.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--.f6456.6

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

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

                if -8.99999999999999953e-218 < t < 1.06e-55

                1. Initial program 87.4%

                  \[\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--.f6476.3

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

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

                  \[\leadsto \frac{x}{-1 \cdot \left(y \cdot z\right) + \color{blue}{{z}^{2}}} \]
                7. Step-by-step derivation
                  1. Applied rewrites76.3%

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

                  if 1.06e-55 < t

                  1. Initial program 89.1%

                    \[\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--.f6482.3

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

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

                Alternative 9: 60.4% accurate, 0.7× speedup?

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

                  1. Initial program 87.3%

                    \[\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-*.f6449.9

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

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

                  if -1.01999999999999998e-81 < t < 6e14

                  1. Initial program 89.1%

                    \[\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--.f6475.3

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

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

                    \[\leadsto \frac{x}{-1 \cdot \left(y \cdot z\right) + \color{blue}{{z}^{2}}} \]
                  7. Step-by-step derivation
                    1. Applied rewrites75.3%

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

                    if 6e14 < t

                    1. Initial program 90.2%

                      \[\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--.f6485.3

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

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

                      \[\leadsto \frac{x}{\left(-1 \cdot z\right) \cdot t} \]
                    7. Step-by-step derivation
                      1. Applied rewrites56.9%

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

                    Alternative 10: 60.9% accurate, 0.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -42000000 \lor \neg \left(z \leq 3 \cdot 10^{-8}\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 -42000000.0) (not (<= z 3e-8))) (/ x (* z z)) (/ x (* t y))))
                    double code(double x, double y, double z, double t) {
                    	double tmp;
                    	if ((z <= -42000000.0) || !(z <= 3e-8)) {
                    		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 <= (-42000000.0d0)) .or. (.not. (z <= 3d-8))) 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 <= -42000000.0) || !(z <= 3e-8)) {
                    		tmp = x / (z * z);
                    	} else {
                    		tmp = x / (t * y);
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t):
                    	tmp = 0
                    	if (z <= -42000000.0) or not (z <= 3e-8):
                    		tmp = x / (z * z)
                    	else:
                    		tmp = x / (t * y)
                    	return tmp
                    
                    function code(x, y, z, t)
                    	tmp = 0.0
                    	if ((z <= -42000000.0) || !(z <= 3e-8))
                    		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 <= -42000000.0) || ~((z <= 3e-8)))
                    		tmp = x / (z * z);
                    	else
                    		tmp = x / (t * y);
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_] := If[Or[LessEqual[z, -42000000.0], N[Not[LessEqual[z, 3e-8]], $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 -42000000 \lor \neg \left(z \leq 3 \cdot 10^{-8}\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 < -4.2e7 or 2.99999999999999973e-8 < z

                      1. Initial program 87.4%

                        \[\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.0

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

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

                      if -4.2e7 < z < 2.99999999999999973e-8

                      1. Initial program 90.3%

                        \[\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-*.f6449.7

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

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

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

                    Alternative 11: 39.1% 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 88.9%

                      \[\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-*.f6435.2

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

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

                    Developer Target 1: 87.9% 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 2024320 
                    (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))))