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

Percentage Accurate: 89.2% → 97.0%
Time: 10.1s
Alternatives: 12
Speedup: 1.0×

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: 97.0% accurate, 1.0× 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 85.6%

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

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

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

Alternative 2: 93.5% accurate, 0.3× speedup?

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

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

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

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


\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 71.4%

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

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

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

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

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

    1. Initial program 98.5%

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

    if 5e307 < (*.f64 (-.f64 y z) (-.f64 t z))

    1. Initial program 65.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(t - z\right)}} \]
      4. sub-neg81.2%

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

        \[\leadsto \frac{\frac{x}{z}}{-\color{blue}{\left(\left(-z\right) + t\right)}} \]
      6. distribute-neg-in81.2%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right) + \left(-t\right)}} \]
      7. remove-double-neg81.2%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z} + \left(-t\right)} \]
      8. unsub-neg81.2%

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

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

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

Alternative 3: 74.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+59} \lor \neg \left(z \leq 3.5 \cdot 10^{+85}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.0000000000000001e59 or 3.50000000000000005e85 < z

    1. Initial program 74.0%

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac291.4%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(y - z\right)}} \]
      4. neg-sub091.4%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg91.4%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative91.4%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+91.4%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub091.4%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg91.4%

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

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

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

    if -6.0000000000000001e59 < z < 3.50000000000000005e85

    1. Initial program 92.2%

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

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

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

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

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

Alternative 4: 73.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+54} \lor \neg \left(z \leq 1.55 \cdot 10^{+80}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.0000000000000003e54 or 1.54999999999999994e80 < z

    1. Initial program 74.0%

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac291.4%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(y - z\right)}} \]
      4. neg-sub091.4%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg91.4%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative91.4%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+91.4%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub091.4%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg91.4%

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

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

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

    if -4.0000000000000003e54 < z < 1.54999999999999994e80

    1. Initial program 92.2%

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

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

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

Alternative 5: 73.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.098:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\

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

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


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

    1. Initial program 80.1%

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

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

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

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

    if -0.098000000000000004 < y < 7.80000000000000001e-121

    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 0 76.7%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(t - z\right)}} \]
      4. sub-neg78.3%

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

        \[\leadsto \frac{\frac{x}{z}}{-\color{blue}{\left(\left(-z\right) + t\right)}} \]
      6. distribute-neg-in78.3%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right) + \left(-t\right)}} \]
      7. remove-double-neg78.3%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z} + \left(-t\right)} \]
      8. unsub-neg78.3%

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

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

    if 7.80000000000000001e-121 < y

    1. Initial program 81.9%

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

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

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

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

Alternative 6: 73.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.2:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\

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

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


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

    1. Initial program 80.1%

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

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

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

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

    if -0.20000000000000001 < y < 7.99999999999999988e-118

    1. Initial program 93.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(t - z\right)}} \]
      4. sub-neg77.4%

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

        \[\leadsto \frac{\frac{x}{z}}{-\color{blue}{\left(\left(-z\right) + t\right)}} \]
      6. distribute-neg-in77.4%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right) + \left(-t\right)}} \]
      7. remove-double-neg77.4%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z} + \left(-t\right)} \]
      8. unsub-neg77.4%

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

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

    if 7.99999999999999988e-118 < y

    1. Initial program 81.7%

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

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

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

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

Alternative 7: 66.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+56} \lor \neg \left(z \leq 2.55 \cdot 10^{+64}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.40000000000000001e56 or 2.55000000000000012e64 < z

    1. Initial program 74.7%

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac290.0%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(y - z\right)}} \]
      4. neg-sub090.0%

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

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative90.0%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+90.0%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub090.0%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg90.0%

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

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

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

    if -3.40000000000000001e56 < z < 2.55000000000000012e64

    1. Initial program 92.5%

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

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

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

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

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

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

Alternative 8: 50.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+121} \lor \neg \left(z \leq 10^{+124}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.80000000000000006e121 or 9.99999999999999948e123 < z

    1. Initial program 74.1%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x}}{y \cdot z} \]
      3. *-commutative35.4%

        \[\leadsto \frac{-x}{\color{blue}{z \cdot y}} \]
    8. Simplified35.4%

      \[\leadsto \color{blue}{\frac{-x}{z \cdot y}} \]
    9. Step-by-step derivation
      1. neg-sub035.4%

        \[\leadsto \frac{\color{blue}{0 - x}}{z \cdot y} \]
      2. sub-neg35.4%

        \[\leadsto \frac{\color{blue}{0 + \left(-x\right)}}{z \cdot y} \]
      3. add-sqr-sqrt20.1%

        \[\leadsto \frac{0 + \color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z \cdot y} \]
      4. sqrt-unprod39.2%

        \[\leadsto \frac{0 + \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z \cdot y} \]
      5. sqr-neg39.2%

        \[\leadsto \frac{0 + \sqrt{\color{blue}{x \cdot x}}}{z \cdot y} \]
      6. sqrt-unprod15.5%

        \[\leadsto \frac{0 + \color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z \cdot y} \]
      7. add-sqr-sqrt35.6%

        \[\leadsto \frac{0 + \color{blue}{x}}{z \cdot y} \]
    10. Applied egg-rr35.6%

      \[\leadsto \frac{\color{blue}{0 + x}}{z \cdot y} \]
    11. Step-by-step derivation
      1. +-lft-identity35.6%

        \[\leadsto \frac{\color{blue}{x}}{z \cdot y} \]
    12. Simplified35.6%

      \[\leadsto \frac{\color{blue}{x}}{z \cdot y} \]
    13. Taylor expanded in x around 0 35.6%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{y}} \]
    15. Simplified41.4%

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

    if -2.80000000000000006e121 < z < 9.99999999999999948e123

    1. Initial program 90.4%

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

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

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

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

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

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

Alternative 9: 46.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+118} \lor \neg \left(z \leq 2.25 \cdot 10^{+105}\right):\\
\;\;\;\;\frac{x}{z \cdot y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1e118 or 2.2500000000000001e105 < z

    1. Initial program 75.1%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x}}{y \cdot z} \]
      3. *-commutative34.3%

        \[\leadsto \frac{-x}{\color{blue}{z \cdot y}} \]
    8. Simplified34.3%

      \[\leadsto \color{blue}{\frac{-x}{z \cdot y}} \]
    9. Step-by-step derivation
      1. neg-sub034.3%

        \[\leadsto \frac{\color{blue}{0 - x}}{z \cdot y} \]
      2. sub-neg34.3%

        \[\leadsto \frac{\color{blue}{0 + \left(-x\right)}}{z \cdot y} \]
      3. add-sqr-sqrt19.3%

        \[\leadsto \frac{0 + \color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z \cdot y} \]
      4. sqrt-unprod38.0%

        \[\leadsto \frac{0 + \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z \cdot y} \]
      5. sqr-neg38.0%

        \[\leadsto \frac{0 + \sqrt{\color{blue}{x \cdot x}}}{z \cdot y} \]
      6. sqrt-unprod15.1%

        \[\leadsto \frac{0 + \color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z \cdot y} \]
      7. add-sqr-sqrt34.5%

        \[\leadsto \frac{0 + \color{blue}{x}}{z \cdot y} \]
    10. Applied egg-rr34.5%

      \[\leadsto \frac{\color{blue}{0 + x}}{z \cdot y} \]
    11. Step-by-step derivation
      1. +-lft-identity34.5%

        \[\leadsto \frac{\color{blue}{x}}{z \cdot y} \]
    12. Simplified34.5%

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

    if -2.1e118 < z < 2.2500000000000001e105

    1. Initial program 90.2%

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

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

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

Alternative 10: 67.8% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.00000000000000006e-122

    1. Initial program 85.6%

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

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

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

        \[\leadsto \frac{x}{\color{blue}{z \cdot \left(-\left(y - z\right)\right)}} \]
      3. neg-sub058.2%

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(0 - \left(y - z\right)\right)}} \]
      4. sub-neg58.2%

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

        \[\leadsto \frac{x}{z \cdot \left(0 - \color{blue}{\left(\left(-z\right) + y\right)}\right)} \]
      6. associate--r+58.2%

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(\left(0 - \left(-z\right)\right) - y\right)}} \]
      7. neg-sub058.2%

        \[\leadsto \frac{x}{z \cdot \left(\color{blue}{\left(-\left(-z\right)\right)} - y\right)} \]
      8. remove-double-neg58.2%

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

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

    if -1.00000000000000006e-122 < z < 2.4500000000000001e64

    1. Initial program 92.6%

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

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

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

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

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

    if 2.4500000000000001e64 < z

    1. Initial program 71.9%

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{z}}{y - z}} \]
      3. distribute-neg-frac288.8%

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-\left(y - z\right)}} \]
      4. neg-sub088.8%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{0 - \left(y - z\right)}} \]
      5. sub-neg88.8%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(y + \left(-z\right)\right)}} \]
      6. +-commutative88.8%

        \[\leadsto \frac{\frac{x}{z}}{0 - \color{blue}{\left(\left(-z\right) + y\right)}} \]
      7. associate--r+88.8%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(0 - \left(-z\right)\right) - y}} \]
      8. neg-sub088.8%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-\left(-z\right)\right)} - y} \]
      9. remove-double-neg88.8%

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

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

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

Alternative 11: 46.6% accurate, 0.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.74999999999999998e112

    1. Initial program 82.4%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x}}{y \cdot z} \]
      3. *-commutative41.7%

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

      \[\leadsto \color{blue}{\frac{-x}{z \cdot y}} \]
    9. Step-by-step derivation
      1. neg-sub041.7%

        \[\leadsto \frac{\color{blue}{0 - x}}{z \cdot y} \]
      2. sub-neg41.7%

        \[\leadsto \frac{\color{blue}{0 + \left(-x\right)}}{z \cdot y} \]
      3. add-sqr-sqrt23.0%

        \[\leadsto \frac{0 + \color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{z \cdot y} \]
      4. sqrt-unprod48.3%

        \[\leadsto \frac{0 + \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{z \cdot y} \]
      5. sqr-neg48.3%

        \[\leadsto \frac{0 + \sqrt{\color{blue}{x \cdot x}}}{z \cdot y} \]
      6. sqrt-unprod18.8%

        \[\leadsto \frac{0 + \color{blue}{\sqrt{x} \cdot \sqrt{x}}}{z \cdot y} \]
      7. add-sqr-sqrt41.6%

        \[\leadsto \frac{0 + \color{blue}{x}}{z \cdot y} \]
    10. Applied egg-rr41.6%

      \[\leadsto \frac{\color{blue}{0 + x}}{z \cdot y} \]
    11. Step-by-step derivation
      1. +-lft-identity41.6%

        \[\leadsto \frac{\color{blue}{x}}{z \cdot y} \]
    12. Simplified41.6%

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

    if -1.74999999999999998e112 < z

    1. Initial program 86.1%

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

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

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

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

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

Alternative 12: 40.1% accurate, 1.8× 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 85.6%

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

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

Developer Target 1: 88.0% 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 2024135 
(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))))