
(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:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* (- y z) (- t z)))))
(if (or (<= t_1 -5e-282) (not (<= t_1 0.0)))
t_1
(/ (/ x (- t z)) (- y z)))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (t - z));
double tmp;
if ((t_1 <= -5e-282) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = (x / (t - z)) / (y - z);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / ((y - z) * (t - z))
if ((t_1 <= (-5d-282)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = (x / (t - z)) / (y - z)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / ((y - z) * (t - z));
double tmp;
if ((t_1 <= -5e-282) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = (x / (t - z)) / (y - z);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = x / ((y - z) * (t - z)) tmp = 0 if (t_1 <= -5e-282) or not (t_1 <= 0.0): tmp = t_1 else: tmp = (x / (t - z)) / (y - z) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(Float64(y - z) * Float64(t - z))) tmp = 0.0 if ((t_1 <= -5e-282) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(Float64(x / Float64(t - z)) / Float64(y - z)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / ((y - z) * (t - z));
tmp = 0.0;
if ((t_1 <= -5e-282) || ~((t_1 <= 0.0)))
tmp = t_1;
else
tmp = (x / (t - z)) / (y - z);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-282], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-282} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y - z}\\
\end{array}
\end{array}
if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < -5.0000000000000001e-282 or -0.0 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) Initial program 99.7%
if -5.0000000000000001e-282 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < -0.0Initial program 76.8%
associate-/r*99.9%
div-inv99.8%
Applied egg-rr99.8%
associate-*l/99.9%
div-inv99.9%
Applied egg-rr99.9%
Final simplification99.8%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -4.8e+178)
(/ (/ x y) (- t z))
(if (<= y -3.1e-80)
(/ x (* y (- t z)))
(if (or (<= y -2.05e-94) (and (not (<= y -5e-121)) (<= y 1e-160)))
(/ x (* z (- z t)))
(/ x (* (- y z) t))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e+178) {
tmp = (x / y) / (t - z);
} else if (y <= -3.1e-80) {
tmp = x / (y * (t - z));
} else if ((y <= -2.05e-94) || (!(y <= -5e-121) && (y <= 1e-160))) {
tmp = x / (z * (z - t));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.8d+178)) then
tmp = (x / y) / (t - z)
else if (y <= (-3.1d-80)) then
tmp = x / (y * (t - z))
else if ((y <= (-2.05d-94)) .or. (.not. (y <= (-5d-121))) .and. (y <= 1d-160)) then
tmp = x / (z * (z - t))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e+178) {
tmp = (x / y) / (t - z);
} else if (y <= -3.1e-80) {
tmp = x / (y * (t - z));
} else if ((y <= -2.05e-94) || (!(y <= -5e-121) && (y <= 1e-160))) {
tmp = x / (z * (z - t));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -4.8e+178: tmp = (x / y) / (t - z) elif y <= -3.1e-80: tmp = x / (y * (t - z)) elif (y <= -2.05e-94) or (not (y <= -5e-121) and (y <= 1e-160)): tmp = x / (z * (z - t)) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -4.8e+178) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -3.1e-80) tmp = Float64(x / Float64(y * Float64(t - z))); elseif ((y <= -2.05e-94) || (!(y <= -5e-121) && (y <= 1e-160))) tmp = Float64(x / Float64(z * Float64(z - t))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -4.8e+178)
tmp = (x / y) / (t - z);
elseif (y <= -3.1e-80)
tmp = x / (y * (t - z));
elseif ((y <= -2.05e-94) || (~((y <= -5e-121)) && (y <= 1e-160)))
tmp = x / (z * (z - t));
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -4.8e+178], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.1e-80], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.05e-94], And[N[Not[LessEqual[y, -5e-121]], $MachinePrecision], LessEqual[y, 1e-160]]], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+178}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-80}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq -2.05 \cdot 10^{-94} \lor \neg \left(y \leq -5 \cdot 10^{-121}\right) \land y \leq 10^{-160}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -4.8e178Initial program 89.4%
associate-/r*94.6%
div-inv94.6%
Applied egg-rr94.6%
un-div-inv94.6%
Applied egg-rr94.6%
Taylor expanded in y around inf 94.6%
if -4.8e178 < y < -3.10000000000000016e-80Initial program 82.8%
Taylor expanded in y around inf 69.6%
*-commutative69.6%
Simplified69.6%
if -3.10000000000000016e-80 < y < -2.05e-94 or -4.99999999999999989e-121 < y < 9.9999999999999999e-161Initial program 94.3%
associate-/r*97.5%
div-inv97.6%
Applied egg-rr97.6%
clear-num97.5%
frac-2neg97.5%
metadata-eval97.5%
frac-times96.7%
metadata-eval96.7%
Applied egg-rr96.7%
Taylor expanded in y around 0 86.4%
if -2.05e-94 < y < -4.99999999999999989e-121 or 9.9999999999999999e-161 < y Initial program 87.9%
Taylor expanded in t around inf 60.1%
Final simplification73.2%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -4e+178)
(/ (/ x y) (- t z))
(if (<= y -2.6e-78)
(/ x (* y (- t z)))
(if (or (<= y -2.9e-94) (and (not (<= y -6.5e-121)) (<= y 7e-109)))
(/ (/ x z) (- z t))
(/ x (* (- y z) t))))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4e+178) {
tmp = (x / y) / (t - z);
} else if (y <= -2.6e-78) {
tmp = x / (y * (t - z));
} else if ((y <= -2.9e-94) || (!(y <= -6.5e-121) && (y <= 7e-109))) {
tmp = (x / z) / (z - t);
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 <= (-4d+178)) then
tmp = (x / y) / (t - z)
else if (y <= (-2.6d-78)) then
tmp = x / (y * (t - z))
else if ((y <= (-2.9d-94)) .or. (.not. (y <= (-6.5d-121))) .and. (y <= 7d-109)) then
tmp = (x / z) / (z - t)
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4e+178) {
tmp = (x / y) / (t - z);
} else if (y <= -2.6e-78) {
tmp = x / (y * (t - z));
} else if ((y <= -2.9e-94) || (!(y <= -6.5e-121) && (y <= 7e-109))) {
tmp = (x / z) / (z - t);
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -4e+178: tmp = (x / y) / (t - z) elif y <= -2.6e-78: tmp = x / (y * (t - z)) elif (y <= -2.9e-94) or (not (y <= -6.5e-121) and (y <= 7e-109)): tmp = (x / z) / (z - t) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -4e+178) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -2.6e-78) tmp = Float64(x / Float64(y * Float64(t - z))); elseif ((y <= -2.9e-94) || (!(y <= -6.5e-121) && (y <= 7e-109))) tmp = Float64(Float64(x / z) / Float64(z - t)); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -4e+178)
tmp = (x / y) / (t - z);
elseif (y <= -2.6e-78)
tmp = x / (y * (t - z));
elseif ((y <= -2.9e-94) || (~((y <= -6.5e-121)) && (y <= 7e-109)))
tmp = (x / z) / (z - t);
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -4e+178], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.6e-78], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.9e-94], And[N[Not[LessEqual[y, -6.5e-121]], $MachinePrecision], LessEqual[y, 7e-109]]], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+178}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-78}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{-94} \lor \neg \left(y \leq -6.5 \cdot 10^{-121}\right) \land y \leq 7 \cdot 10^{-109}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -4.0000000000000002e178Initial program 89.4%
associate-/r*94.6%
div-inv94.6%
Applied egg-rr94.6%
un-div-inv94.6%
Applied egg-rr94.6%
Taylor expanded in y around inf 94.6%
if -4.0000000000000002e178 < y < -2.6000000000000001e-78Initial program 82.8%
Taylor expanded in y around inf 69.6%
*-commutative69.6%
Simplified69.6%
if -2.6000000000000001e-78 < y < -2.89999999999999995e-94 or -6.5000000000000003e-121 < y < 7e-109Initial program 93.6%
associate-/r*97.6%
div-inv97.8%
Applied egg-rr97.8%
clear-num97.7%
frac-2neg97.7%
metadata-eval97.7%
frac-times96.9%
metadata-eval96.9%
Applied egg-rr96.9%
Taylor expanded in y around 0 83.2%
associate-/r*87.2%
Simplified87.2%
if -2.89999999999999995e-94 < y < -6.5000000000000003e-121 or 7e-109 < y Initial program 88.1%
Taylor expanded in t around inf 58.7%
Final simplification73.6%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x z) (- z t))))
(if (<= y -4.5e+180)
(/ (/ x y) (- t z))
(if (<= y -9e-78)
(/ x (* y (- t z)))
(if (<= y -3.2e-94)
t_1
(if (<= y -4.5e-121)
(* (/ x (- y z)) (/ 1.0 t))
(if (<= y 4.8e-132) t_1 (/ x (* (- y z) t)))))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (z - t);
double tmp;
if (y <= -4.5e+180) {
tmp = (x / y) / (t - z);
} else if (y <= -9e-78) {
tmp = x / (y * (t - z));
} else if (y <= -3.2e-94) {
tmp = t_1;
} else if (y <= -4.5e-121) {
tmp = (x / (y - z)) * (1.0 / t);
} else if (y <= 4.8e-132) {
tmp = t_1;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / z) / (z - t)
if (y <= (-4.5d+180)) then
tmp = (x / y) / (t - z)
else if (y <= (-9d-78)) then
tmp = x / (y * (t - z))
else if (y <= (-3.2d-94)) then
tmp = t_1
else if (y <= (-4.5d-121)) then
tmp = (x / (y - z)) * (1.0d0 / t)
else if (y <= 4.8d-132) then
tmp = t_1
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / z) / (z - t);
double tmp;
if (y <= -4.5e+180) {
tmp = (x / y) / (t - z);
} else if (y <= -9e-78) {
tmp = x / (y * (t - z));
} else if (y <= -3.2e-94) {
tmp = t_1;
} else if (y <= -4.5e-121) {
tmp = (x / (y - z)) * (1.0 / t);
} else if (y <= 4.8e-132) {
tmp = t_1;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / z) / (z - t) tmp = 0 if y <= -4.5e+180: tmp = (x / y) / (t - z) elif y <= -9e-78: tmp = x / (y * (t - z)) elif y <= -3.2e-94: tmp = t_1 elif y <= -4.5e-121: tmp = (x / (y - z)) * (1.0 / t) elif y <= 4.8e-132: tmp = t_1 else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / z) / Float64(z - t)) tmp = 0.0 if (y <= -4.5e+180) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -9e-78) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= -3.2e-94) tmp = t_1; elseif (y <= -4.5e-121) tmp = Float64(Float64(x / Float64(y - z)) * Float64(1.0 / t)); elseif (y <= 4.8e-132) tmp = t_1; else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / z) / (z - t);
tmp = 0.0;
if (y <= -4.5e+180)
tmp = (x / y) / (t - z);
elseif (y <= -9e-78)
tmp = x / (y * (t - z));
elseif (y <= -3.2e-94)
tmp = t_1;
elseif (y <= -4.5e-121)
tmp = (x / (y - z)) * (1.0 / t);
elseif (y <= 4.8e-132)
tmp = t_1;
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e+180], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9e-78], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.2e-94], t$95$1, If[LessEqual[y, -4.5e-121], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e-132], t$95$1, N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z - t}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+180}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-78}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-121}:\\
\;\;\;\;\frac{x}{y - z} \cdot \frac{1}{t}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-132}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -4.49999999999999981e180Initial program 89.4%
associate-/r*94.6%
div-inv94.6%
Applied egg-rr94.6%
un-div-inv94.6%
Applied egg-rr94.6%
Taylor expanded in y around inf 94.6%
if -4.49999999999999981e180 < y < -9e-78Initial program 82.8%
Taylor expanded in y around inf 69.6%
*-commutative69.6%
Simplified69.6%
if -9e-78 < y < -3.19999999999999997e-94 or -4.5000000000000003e-121 < y < 4.80000000000000031e-132Initial program 93.5%
associate-/r*97.6%
div-inv97.7%
Applied egg-rr97.7%
clear-num97.6%
frac-2neg97.6%
metadata-eval97.6%
frac-times96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Taylor expanded in y around 0 84.0%
associate-/r*88.1%
Simplified88.1%
if -3.19999999999999997e-94 < y < -4.5000000000000003e-121Initial program 52.5%
associate-/r*100.0%
div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 51.3%
if 4.80000000000000031e-132 < y Initial program 89.0%
Taylor expanded in t around inf 59.2%
Final simplification74.0%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= y -6.2e-79)
(/ x (* y (- t z)))
(if (or (<= y -4.4e-94) (and (not (<= y -5.2e-121)) (<= y 2.7e-163)))
(/ x (* z (- z t)))
(/ x (* (- y z) t)))))assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.2e-79) {
tmp = x / (y * (t - z));
} else if ((y <= -4.4e-94) || (!(y <= -5.2e-121) && (y <= 2.7e-163))) {
tmp = x / (z * (z - t));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 <= (-6.2d-79)) then
tmp = x / (y * (t - z))
else if ((y <= (-4.4d-94)) .or. (.not. (y <= (-5.2d-121))) .and. (y <= 2.7d-163)) then
tmp = x / (z * (z - t))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.2e-79) {
tmp = x / (y * (t - z));
} else if ((y <= -4.4e-94) || (!(y <= -5.2e-121) && (y <= 2.7e-163))) {
tmp = x / (z * (z - t));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if y <= -6.2e-79: tmp = x / (y * (t - z)) elif (y <= -4.4e-94) or (not (y <= -5.2e-121) and (y <= 2.7e-163)): tmp = x / (z * (z - t)) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -6.2e-79) tmp = Float64(x / Float64(y * Float64(t - z))); elseif ((y <= -4.4e-94) || (!(y <= -5.2e-121) && (y <= 2.7e-163))) tmp = Float64(x / Float64(z * Float64(z - t))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -6.2e-79)
tmp = x / (y * (t - z));
elseif ((y <= -4.4e-94) || (~((y <= -5.2e-121)) && (y <= 2.7e-163)))
tmp = x / (z * (z - t));
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -6.2e-79], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -4.4e-94], And[N[Not[LessEqual[y, -5.2e-121]], $MachinePrecision], LessEqual[y, 2.7e-163]]], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-79}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq -4.4 \cdot 10^{-94} \lor \neg \left(y \leq -5.2 \cdot 10^{-121}\right) \land y \leq 2.7 \cdot 10^{-163}:\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -6.1999999999999999e-79Initial program 84.6%
Taylor expanded in y around inf 74.9%
*-commutative74.9%
Simplified74.9%
if -6.1999999999999999e-79 < y < -4.40000000000000002e-94 or -5.19999999999999972e-121 < y < 2.70000000000000015e-163Initial program 94.3%
associate-/r*97.5%
div-inv97.6%
Applied egg-rr97.6%
clear-num97.5%
frac-2neg97.5%
metadata-eval97.5%
frac-times96.7%
metadata-eval96.7%
Applied egg-rr96.7%
Taylor expanded in y around 0 86.4%
if -4.40000000000000002e-94 < y < -5.19999999999999972e-121 or 2.70000000000000015e-163 < y Initial program 87.9%
Taylor expanded in t around inf 60.1%
Final simplification72.9%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x t) y)))
(if (<= t -4.8e-89)
t_1
(if (<= t 1.9e-116)
(/ (- x) (* y z))
(if (<= t 5.2e-19)
(/ x (* y t))
(if (<= t 1.65e+38) (/ (- x) (* z t)) t_1))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double tmp;
if (t <= -4.8e-89) {
tmp = t_1;
} else if (t <= 1.9e-116) {
tmp = -x / (y * z);
} else if (t <= 5.2e-19) {
tmp = x / (y * t);
} else if (t <= 1.65e+38) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 / t) / y
if (t <= (-4.8d-89)) then
tmp = t_1
else if (t <= 1.9d-116) then
tmp = -x / (y * z)
else if (t <= 5.2d-19) then
tmp = x / (y * t)
else if (t <= 1.65d+38) then
tmp = -x / (z * t)
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double tmp;
if (t <= -4.8e-89) {
tmp = t_1;
} else if (t <= 1.9e-116) {
tmp = -x / (y * z);
} else if (t <= 5.2e-19) {
tmp = x / (y * t);
} else if (t <= 1.65e+38) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / t) / y tmp = 0 if t <= -4.8e-89: tmp = t_1 elif t <= 1.9e-116: tmp = -x / (y * z) elif t <= 5.2e-19: tmp = x / (y * t) elif t <= 1.65e+38: tmp = -x / (z * t) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / t) / y) tmp = 0.0 if (t <= -4.8e-89) tmp = t_1; elseif (t <= 1.9e-116) tmp = Float64(Float64(-x) / Float64(y * z)); elseif (t <= 5.2e-19) tmp = Float64(x / Float64(y * t)); elseif (t <= 1.65e+38) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / t) / y;
tmp = 0.0;
if (t <= -4.8e-89)
tmp = t_1;
elseif (t <= 1.9e-116)
tmp = -x / (y * z);
elseif (t <= 5.2e-19)
tmp = x / (y * t);
elseif (t <= 1.65e+38)
tmp = -x / (z * t);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -4.8e-89], t$95$1, If[LessEqual[t, 1.9e-116], N[((-x) / N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-19], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+38], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{-89}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-116}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-19}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+38}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.80000000000000032e-89 or 1.65e38 < t Initial program 86.4%
Taylor expanded in y around inf 54.6%
*-commutative54.6%
associate-/r*64.1%
Simplified64.1%
Taylor expanded in t around inf 59.9%
if -4.80000000000000032e-89 < t < 1.9000000000000001e-116Initial program 93.5%
Taylor expanded in y around inf 56.1%
*-commutative56.1%
associate-/r*58.2%
Simplified58.2%
Taylor expanded in t around 0 46.6%
associate-*r/46.6%
neg-mul-146.6%
*-commutative46.6%
Simplified46.6%
if 1.9000000000000001e-116 < t < 5.20000000000000026e-19Initial program 86.5%
Taylor expanded in z around 0 57.0%
if 5.20000000000000026e-19 < t < 1.65e38Initial program 92.0%
associate-/r*98.6%
div-inv98.6%
Applied egg-rr98.6%
Taylor expanded in t around inf 75.9%
associate-/r*76.3%
Simplified76.3%
Taylor expanded in y around 0 51.4%
mul-1-neg51.4%
*-commutative51.4%
Simplified51.4%
Final simplification54.6%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ x t) y)))
(if (<= t -1.95e-132)
t_1
(if (<= t 1.05e-113)
(/ (/ (- x) z) y)
(if (<= t 5e-19)
(/ x (* y t))
(if (<= t 2.4e+34) (/ (- x) (* z t)) t_1))))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double tmp;
if (t <= -1.95e-132) {
tmp = t_1;
} else if (t <= 1.05e-113) {
tmp = (-x / z) / y;
} else if (t <= 5e-19) {
tmp = x / (y * t);
} else if (t <= 2.4e+34) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 / t) / y
if (t <= (-1.95d-132)) then
tmp = t_1
else if (t <= 1.05d-113) then
tmp = (-x / z) / y
else if (t <= 5d-19) then
tmp = x / (y * t)
else if (t <= 2.4d+34) then
tmp = -x / (z * t)
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (x / t) / y;
double tmp;
if (t <= -1.95e-132) {
tmp = t_1;
} else if (t <= 1.05e-113) {
tmp = (-x / z) / y;
} else if (t <= 5e-19) {
tmp = x / (y * t);
} else if (t <= 2.4e+34) {
tmp = -x / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (x / t) / y tmp = 0 if t <= -1.95e-132: tmp = t_1 elif t <= 1.05e-113: tmp = (-x / z) / y elif t <= 5e-19: tmp = x / (y * t) elif t <= 2.4e+34: tmp = -x / (z * t) else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(x / t) / y) tmp = 0.0 if (t <= -1.95e-132) tmp = t_1; elseif (t <= 1.05e-113) tmp = Float64(Float64(Float64(-x) / z) / y); elseif (t <= 5e-19) tmp = Float64(x / Float64(y * t)); elseif (t <= 2.4e+34) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (x / t) / y;
tmp = 0.0;
if (t <= -1.95e-132)
tmp = t_1;
elseif (t <= 1.05e-113)
tmp = (-x / z) / y;
elseif (t <= 5e-19)
tmp = x / (y * t);
elseif (t <= 2.4e+34)
tmp = -x / (z * t);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -1.95e-132], t$95$1, If[LessEqual[t, 1.05e-113], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 5e-19], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e+34], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{t}}{y}\\
\mathbf{if}\;t \leq -1.95 \cdot 10^{-132}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-113}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-19}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+34}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.94999999999999991e-132 or 2.39999999999999987e34 < t Initial program 86.9%
Taylor expanded in y around inf 56.0%
*-commutative56.0%
associate-/r*64.7%
Simplified64.7%
Taylor expanded in t around inf 58.6%
if -1.94999999999999991e-132 < t < 1.05e-113Initial program 93.7%
Taylor expanded in y around inf 53.6%
*-commutative53.6%
Simplified53.6%
Taylor expanded in t around 0 48.8%
associate-*r/48.8%
*-commutative48.8%
associate-/r*51.2%
neg-mul-151.2%
distribute-neg-frac51.2%
Simplified51.2%
if 1.05e-113 < t < 5.0000000000000004e-19Initial program 86.5%
Taylor expanded in z around 0 57.0%
if 5.0000000000000004e-19 < t < 2.39999999999999987e34Initial program 92.0%
associate-/r*98.6%
div-inv98.6%
Applied egg-rr98.6%
Taylor expanded in t around inf 75.9%
associate-/r*76.3%
Simplified76.3%
Taylor expanded in y around 0 51.4%
mul-1-neg51.4%
*-commutative51.4%
Simplified51.4%
Final simplification55.9%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -9.5e+144) (not (<= z 2.8e+61))) (/ (/ x z) (- z t)) (/ x (* (- y z) (- t z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -9.5e+144) || !(z <= 2.8e+61)) {
tmp = (x / z) / (z - t);
} else {
tmp = x / ((y - z) * (t - z));
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 <= (-9.5d+144)) .or. (.not. (z <= 2.8d+61))) then
tmp = (x / z) / (z - t)
else
tmp = x / ((y - z) * (t - z))
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -9.5e+144) || !(z <= 2.8e+61)) {
tmp = (x / z) / (z - t);
} else {
tmp = x / ((y - z) * (t - z));
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -9.5e+144) or not (z <= 2.8e+61): tmp = (x / z) / (z - t) else: tmp = x / ((y - z) * (t - z)) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -9.5e+144) || !(z <= 2.8e+61)) tmp = Float64(Float64(x / z) / Float64(z - t)); else tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z))); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -9.5e+144) || ~((z <= 2.8e+61)))
tmp = (x / z) / (z - t);
else
tmp = x / ((y - z) * (t - z));
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -9.5e+144], N[Not[LessEqual[z, 2.8e+61]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+144} \lor \neg \left(z \leq 2.8 \cdot 10^{+61}\right):\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\end{array}
\end{array}
if z < -9.50000000000000031e144 or 2.8000000000000001e61 < z Initial program 74.5%
associate-/r*99.9%
div-inv99.8%
Applied egg-rr99.8%
clear-num99.8%
frac-2neg99.8%
metadata-eval99.8%
frac-times98.9%
metadata-eval98.9%
Applied egg-rr98.9%
Taylor expanded in y around 0 72.2%
associate-/r*95.1%
Simplified95.1%
if -9.50000000000000031e144 < z < 2.8000000000000001e61Initial program 95.1%
Final simplification95.1%
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (/ (- x) z) y)))
(if (<= z -4e+179)
t_1
(if (<= z -1.7e-53)
(/ (/ (- x) t) z)
(if (<= z 1.8e+32) (/ (/ x t) y) t_1)))))assert(y < t);
double code(double x, double y, double z, double t) {
double t_1 = (-x / z) / y;
double tmp;
if (z <= -4e+179) {
tmp = t_1;
} else if (z <= -1.7e-53) {
tmp = (-x / t) / z;
} else if (z <= 1.8e+32) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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
if (z <= (-4d+179)) then
tmp = t_1
else if (z <= (-1.7d-53)) then
tmp = (-x / t) / z
else if (z <= 1.8d+32) then
tmp = (x / t) / y
else
tmp = t_1
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double t_1 = (-x / z) / y;
double tmp;
if (z <= -4e+179) {
tmp = t_1;
} else if (z <= -1.7e-53) {
tmp = (-x / t) / z;
} else if (z <= 1.8e+32) {
tmp = (x / t) / y;
} else {
tmp = t_1;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): t_1 = (-x / z) / y tmp = 0 if z <= -4e+179: tmp = t_1 elif z <= -1.7e-53: tmp = (-x / t) / z elif z <= 1.8e+32: tmp = (x / t) / y else: tmp = t_1 return tmp
y, t = sort([y, t]) function code(x, y, z, t) t_1 = Float64(Float64(Float64(-x) / z) / y) tmp = 0.0 if (z <= -4e+179) tmp = t_1; elseif (z <= -1.7e-53) tmp = Float64(Float64(Float64(-x) / t) / z); elseif (z <= 1.8e+32) tmp = Float64(Float64(x / t) / y); else tmp = t_1; end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = (-x / z) / y;
tmp = 0.0;
if (z <= -4e+179)
tmp = t_1;
elseif (z <= -1.7e-53)
tmp = (-x / t) / z;
elseif (z <= 1.8e+32)
tmp = (x / t) / y;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[z, -4e+179], t$95$1, If[LessEqual[z, -1.7e-53], N[(N[((-x) / t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.8e+32], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{-x}{z}}{y}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+179}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{-x}{t}}{z}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+32}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.99999999999999992e179 or 1.7999999999999998e32 < z Initial program 81.1%
Taylor expanded in y around inf 37.0%
*-commutative37.0%
Simplified37.0%
Taylor expanded in t around 0 36.9%
associate-*r/36.9%
*-commutative36.9%
associate-/r*56.6%
neg-mul-156.6%
distribute-neg-frac56.6%
Simplified56.6%
if -3.99999999999999992e179 < z < -1.7e-53Initial program 77.6%
associate-/r*99.5%
div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in t around inf 24.7%
associate-/r*30.2%
Simplified30.2%
Taylor expanded in y around 0 19.9%
mul-1-neg19.9%
associate-/r*20.1%
distribute-neg-frac20.1%
distribute-neg-frac20.1%
Simplified20.1%
if -1.7e-53 < z < 1.7999999999999998e32Initial program 96.4%
Taylor expanded in y around inf 71.2%
*-commutative71.2%
associate-/r*71.9%
Simplified71.9%
Taylor expanded in t around inf 63.4%
Final simplification55.0%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -3.4e-71) (not (<= z 4.6e-103))) (/ x (* z (- z t))) (/ x (* (- y z) t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.4e-71) || !(z <= 4.6e-103)) {
tmp = x / (z * (z - t));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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-71)) .or. (.not. (z <= 4.6d-103))) then
tmp = x / (z * (z - t))
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.4e-71) || !(z <= 4.6e-103)) {
tmp = x / (z * (z - t));
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -3.4e-71) or not (z <= 4.6e-103): tmp = x / (z * (z - t)) else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -3.4e-71) || !(z <= 4.6e-103)) tmp = Float64(x / Float64(z * Float64(z - t))); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -3.4e-71) || ~((z <= 4.6e-103)))
tmp = x / (z * (z - t));
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.4e-71], N[Not[LessEqual[z, 4.6e-103]], $MachinePrecision]], N[(x / N[(z * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-71} \lor \neg \left(z \leq 4.6 \cdot 10^{-103}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if z < -3.40000000000000003e-71 or 4.6000000000000001e-103 < z Initial program 82.7%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
clear-num99.7%
frac-2neg99.7%
metadata-eval99.7%
frac-times99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in y around 0 64.2%
if -3.40000000000000003e-71 < z < 4.6000000000000001e-103Initial program 98.0%
Taylor expanded in t around inf 86.1%
Final simplification73.5%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -1.95e-133) (/ (/ x t) y) (if (<= t 1.22e-116) (/ (/ (- x) z) y) (/ x (* (- y z) t)))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.95e-133) {
tmp = (x / t) / y;
} else if (t <= 1.22e-116) {
tmp = (-x / z) / y;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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.95d-133)) then
tmp = (x / t) / y
else if (t <= 1.22d-116) then
tmp = (-x / z) / y
else
tmp = x / ((y - z) * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.95e-133) {
tmp = (x / t) / y;
} else if (t <= 1.22e-116) {
tmp = (-x / z) / y;
} else {
tmp = x / ((y - z) * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if t <= -1.95e-133: tmp = (x / t) / y elif t <= 1.22e-116: tmp = (-x / z) / y else: tmp = x / ((y - z) * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -1.95e-133) tmp = Float64(Float64(x / t) / y); elseif (t <= 1.22e-116) tmp = Float64(Float64(Float64(-x) / z) / y); else tmp = Float64(x / Float64(Float64(y - z) * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -1.95e-133)
tmp = (x / t) / y;
elseif (t <= 1.22e-116)
tmp = (-x / z) / y;
else
tmp = x / ((y - z) * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -1.95e-133], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.22e-116], N[(N[((-x) / z), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.95 \cdot 10^{-133}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{-116}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -1.95000000000000014e-133Initial program 85.5%
Taylor expanded in y around inf 52.3%
*-commutative52.3%
associate-/r*63.5%
Simplified63.5%
Taylor expanded in t around inf 54.4%
if -1.95000000000000014e-133 < t < 1.22e-116Initial program 93.7%
Taylor expanded in y around inf 53.6%
*-commutative53.6%
Simplified53.6%
Taylor expanded in t around 0 48.8%
associate-*r/48.8%
*-commutative48.8%
associate-/r*51.2%
neg-mul-151.2%
distribute-neg-frac51.2%
Simplified51.2%
if 1.22e-116 < t Initial program 89.3%
Taylor expanded in t around inf 80.7%
Final simplification61.6%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -1.7e-47) (not (<= z 2.9e-7))) (/ (- x) (* z t)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.7e-47) || !(z <= 2.9e-7)) {
tmp = -x / (z * t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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.7d-47)) .or. (.not. (z <= 2.9d-7))) then
tmp = -x / (z * t)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.7e-47) || !(z <= 2.9e-7)) {
tmp = -x / (z * t);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -1.7e-47) or not (z <= 2.9e-7): tmp = -x / (z * t) else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -1.7e-47) || !(z <= 2.9e-7)) tmp = Float64(Float64(-x) / Float64(z * t)); else tmp = Float64(Float64(x / t) / y); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -1.7e-47) || ~((z <= 2.9e-7)))
tmp = -x / (z * t);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.7e-47], N[Not[LessEqual[z, 2.9e-7]], $MachinePrecision]], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-47} \lor \neg \left(z \leq 2.9 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -1.7000000000000001e-47 or 2.8999999999999998e-7 < z Initial program 81.4%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in t around inf 36.7%
associate-/r*36.9%
Simplified36.9%
Taylor expanded in y around 0 33.0%
mul-1-neg33.0%
*-commutative33.0%
Simplified33.0%
if -1.7000000000000001e-47 < z < 2.8999999999999998e-7Initial program 96.2%
Taylor expanded in y around inf 72.1%
*-commutative72.1%
associate-/r*72.8%
Simplified72.8%
Taylor expanded in t around inf 65.3%
Final simplification49.9%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -1.22e+54) (not (<= z 4e+35))) (/ x (* y z)) (/ x (* y t))))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.22e+54) || !(z <= 4e+35)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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.22d+54)) .or. (.not. (z <= 4d+35))) then
tmp = x / (y * z)
else
tmp = x / (y * t)
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.22e+54) || !(z <= 4e+35)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -1.22e+54) or not (z <= 4e+35): tmp = x / (y * z) else: tmp = x / (y * t) return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -1.22e+54) || !(z <= 4e+35)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(x / Float64(y * t)); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -1.22e+54) || ~((z <= 4e+35)))
tmp = x / (y * z);
else
tmp = x / (y * t);
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.22e+54], N[Not[LessEqual[z, 4e+35]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{+54} \lor \neg \left(z \leq 4 \cdot 10^{+35}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -1.22e54 or 3.9999999999999999e35 < z Initial program 78.1%
Taylor expanded in y around inf 34.2%
*-commutative34.2%
associate-/r*52.8%
Simplified52.8%
Taylor expanded in t around 0 33.2%
associate-*r/33.2%
neg-mul-133.2%
*-commutative33.2%
Simplified33.2%
expm1-log1p-u32.8%
expm1-udef54.6%
add-sqr-sqrt24.1%
sqrt-unprod51.1%
sqr-neg51.1%
sqrt-unprod30.4%
add-sqr-sqrt54.5%
associate-/r*54.5%
Applied egg-rr54.5%
expm1-def46.2%
expm1-log1p46.7%
associate-/l/32.7%
*-commutative32.7%
Simplified32.7%
if -1.22e54 < z < 3.9999999999999999e35Initial program 96.1%
Taylor expanded in z around 0 57.0%
Final simplification47.6%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -7.8e+147) (not (<= z 1.15e+49))) (/ x (* y z)) (/ (/ x t) y)))
assert(y < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7.8e+147) || !(z <= 1.15e+49)) {
tmp = x / (y * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 <= (-7.8d+147)) .or. (.not. (z <= 1.15d+49))) then
tmp = x / (y * z)
else
tmp = (x / t) / y
end if
code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7.8e+147) || !(z <= 1.15e+49)) {
tmp = x / (y * z);
} else {
tmp = (x / t) / y;
}
return tmp;
}
[y, t] = sort([y, t]) def code(x, y, z, t): tmp = 0 if (z <= -7.8e+147) or not (z <= 1.15e+49): tmp = x / (y * z) else: tmp = (x / t) / y return tmp
y, t = sort([y, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -7.8e+147) || !(z <= 1.15e+49)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(Float64(x / t) / y); end return tmp end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -7.8e+147) || ~((z <= 1.15e+49)))
tmp = x / (y * z);
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -7.8e+147], N[Not[LessEqual[z, 1.15e+49]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+147} \lor \neg \left(z \leq 1.15 \cdot 10^{+49}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -7.80000000000000033e147 or 1.15000000000000001e49 < z Initial program 75.5%
Taylor expanded in y around inf 34.8%
*-commutative34.8%
associate-/r*52.7%
Simplified52.7%
Taylor expanded in t around 0 34.7%
associate-*r/34.7%
neg-mul-134.7%
*-commutative34.7%
Simplified34.7%
expm1-log1p-u34.3%
expm1-udef57.8%
add-sqr-sqrt28.1%
sqrt-unprod53.4%
sqr-neg53.4%
sqrt-unprod29.7%
add-sqr-sqrt57.7%
associate-/r*57.7%
Applied egg-rr57.7%
expm1-def50.8%
expm1-log1p51.1%
associate-/l/34.5%
*-commutative34.5%
Simplified34.5%
if -7.80000000000000033e147 < z < 1.15000000000000001e49Initial program 95.0%
Taylor expanded in y around inf 66.0%
*-commutative66.0%
associate-/r*68.9%
Simplified68.9%
Taylor expanded in t around inf 55.6%
Final simplification49.2%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ (/ x (- y z)) (- t z)))
assert(y < t);
double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
NOTE: y and t should be sorted in increasing order before calling this function.
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
assert y < t;
public static double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
[y, t] = sort([y, t]) def code(x, y, z, t): return (x / (y - z)) / (t - z)
y, t = sort([y, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(y - z)) / Float64(t - z)) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (y - z)) / (t - z);
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{\frac{x}{y - z}}{t - z}
\end{array}
Initial program 89.1%
associate-/r*96.9%
div-inv96.9%
Applied egg-rr96.9%
un-div-inv96.9%
Applied egg-rr96.9%
Final simplification96.9%
NOTE: y and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* y t)))
assert(y < t);
double code(double x, double y, double z, double t) {
return x / (y * t);
}
NOTE: y and t should be sorted in increasing order before calling this function.
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 * t)
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
[y, t] = sort([y, t]) def code(x, y, z, t): return x / (y * t)
y, t = sort([y, t]) function code(x, y, z, t) return Float64(x / Float64(y * t)) end
y, t = num2cell(sort([y, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (y * t);
end
NOTE: y and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 89.1%
Taylor expanded in z around 0 39.7%
Final simplification39.7%
(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}
herbie shell --seed 2023333
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:herbie-target
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))