
(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: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ (/ x (- z t)) (- z y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (x / (z - t)) / (z - y);
}
NOTE: x, y, z, 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 / (z - t)) / (z - y)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (x / (z - t)) / (z - y);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (x / (z - t)) / (z - y)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(z - t)) / Float64(z - y)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (z - t)) / (z - y);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{z - t}}{z - y}
\end{array}
Initial program 87.0%
associate-/l/96.4%
Simplified96.4%
Final simplification96.4%
NOTE: x, y, z, 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 y)))) (t_2 (/ (/ x (- t z)) y)))
(if (<= t -4.45e-187)
t_2
(if (<= t 5.8e-181)
t_1
(if (<= t 8.6e-141)
t_2
(if (<= t 5e-27)
t_1
(if (<= t 1.85e+157) (/ x (* t (- y z))) (/ (/ x t) (- y z)))))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = x / (z * (z - y));
double t_2 = (x / (t - z)) / y;
double tmp;
if (t <= -4.45e-187) {
tmp = t_2;
} else if (t <= 5.8e-181) {
tmp = t_1;
} else if (t <= 8.6e-141) {
tmp = t_2;
} else if (t <= 5e-27) {
tmp = t_1;
} else if (t <= 1.85e+157) {
tmp = x / (t * (y - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, 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) :: t_2
real(8) :: tmp
t_1 = x / (z * (z - y))
t_2 = (x / (t - z)) / y
if (t <= (-4.45d-187)) then
tmp = t_2
else if (t <= 5.8d-181) then
tmp = t_1
else if (t <= 8.6d-141) then
tmp = t_2
else if (t <= 5d-27) then
tmp = t_1
else if (t <= 1.85d+157) then
tmp = x / (t * (y - z))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double t_1 = x / (z * (z - y));
double t_2 = (x / (t - z)) / y;
double tmp;
if (t <= -4.45e-187) {
tmp = t_2;
} else if (t <= 5.8e-181) {
tmp = t_1;
} else if (t <= 8.6e-141) {
tmp = t_2;
} else if (t <= 5e-27) {
tmp = t_1;
} else if (t <= 1.85e+157) {
tmp = x / (t * (y - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = x / (z * (z - y)) t_2 = (x / (t - z)) / y tmp = 0 if t <= -4.45e-187: tmp = t_2 elif t <= 5.8e-181: tmp = t_1 elif t <= 8.6e-141: tmp = t_2 elif t <= 5e-27: tmp = t_1 elif t <= 1.85e+157: tmp = x / (t * (y - z)) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(x / Float64(z * Float64(z - y))) t_2 = Float64(Float64(x / Float64(t - z)) / y) tmp = 0.0 if (t <= -4.45e-187) tmp = t_2; elseif (t <= 5.8e-181) tmp = t_1; elseif (t <= 8.6e-141) tmp = t_2; elseif (t <= 5e-27) tmp = t_1; elseif (t <= 1.85e+157) tmp = Float64(x / Float64(t * Float64(y - z))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
t_1 = x / (z * (z - y));
t_2 = (x / (t - z)) / y;
tmp = 0.0;
if (t <= -4.45e-187)
tmp = t_2;
elseif (t <= 5.8e-181)
tmp = t_1;
elseif (t <= 8.6e-141)
tmp = t_2;
elseif (t <= 5e-27)
tmp = t_1;
elseif (t <= 1.85e+157)
tmp = x / (t * (y - z));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -4.45e-187], t$95$2, If[LessEqual[t, 5.8e-181], t$95$1, If[LessEqual[t, 8.6e-141], t$95$2, If[LessEqual[t, 5e-27], t$95$1, If[LessEqual[t, 1.85e+157], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot \left(z - y\right)}\\
t_2 := \frac{\frac{x}{t - z}}{y}\\
\mathbf{if}\;t \leq -4.45 \cdot 10^{-187}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-181}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8.6 \cdot 10^{-141}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+157}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -4.4500000000000002e-187 or 5.7999999999999996e-181 < t < 8.59999999999999948e-141Initial program 89.3%
associate-/l/96.2%
clear-num96.0%
inv-pow96.0%
div-inv95.1%
clear-num95.2%
Applied egg-rr95.2%
unpow-195.2%
associate-/r*95.2%
Applied egg-rr95.2%
Taylor expanded in y around inf 59.2%
*-rgt-identity59.2%
times-frac60.7%
associate-*l/63.6%
associate-*r/63.7%
*-rgt-identity63.7%
Simplified63.7%
if -4.4500000000000002e-187 < t < 5.7999999999999996e-181 or 8.59999999999999948e-141 < t < 5.0000000000000002e-27Initial program 91.1%
Taylor expanded in t around 0 82.2%
associate-*r/82.2%
neg-mul-182.2%
Simplified82.2%
if 5.0000000000000002e-27 < t < 1.8499999999999999e157Initial program 89.0%
Taylor expanded in t around inf 77.0%
if 1.8499999999999999e157 < t Initial program 68.7%
associate-/l/97.0%
Simplified97.0%
Taylor expanded in t around inf 94.2%
Final simplification75.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(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+299) (/ x t_1) (/ (/ x z) (- z y))))))assert(x < y && y < 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+299) {
tmp = x / t_1;
} else {
tmp = (x / z) / (z - y);
}
return tmp;
}
assert x < y && y < z && z < t;
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+299) {
tmp = x / t_1;
} else {
tmp = (x / z) / (z - y);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) 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+299: tmp = x / t_1 else: tmp = (x / z) / (z - y) return tmp
x, y, z, t = sort([x, y, z, t]) 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+299) tmp = Float64(x / t_1); else tmp = Float64(Float64(x / z) / Float64(z - y)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
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+299)
tmp = x / t_1;
else
tmp = (x / z) / (z - y);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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+299], N[(x / t$95$1), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\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^{+299}:\\
\;\;\;\;\frac{x}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\end{array}
\end{array}
if (*.f64 (-.f64 y z) (-.f64 t z)) < -inf.0Initial program 63.2%
associate-/l/99.9%
clear-num99.9%
inv-pow99.9%
div-inv99.9%
clear-num99.9%
Applied egg-rr99.9%
unpow-199.9%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 60.9%
*-rgt-identity60.9%
times-frac85.1%
associate-*l/87.4%
associate-*r/87.4%
*-rgt-identity87.4%
Simplified87.4%
if -inf.0 < (*.f64 (-.f64 y z) (-.f64 t z)) < 5.0000000000000003e299Initial program 98.5%
if 5.0000000000000003e299 < (*.f64 (-.f64 y z) (-.f64 t z)) Initial program 69.0%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in t around 0 84.9%
associate-*r/84.9%
neg-mul-184.9%
Simplified84.9%
Final simplification93.7%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
:precision binary64
(if (<= t -8e-84)
(/ (/ x (- t z)) y)
(if (<= t 4.8e-27)
(/ (/ x z) (- z y))
(if (<= t 3.6e+157) (/ x (* t (- y z))) (/ (/ x t) (- y z))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8e-84) {
tmp = (x / (t - z)) / y;
} else if (t <= 4.8e-27) {
tmp = (x / z) / (z - y);
} else if (t <= 3.6e+157) {
tmp = x / (t * (y - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, 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 <= (-8d-84)) then
tmp = (x / (t - z)) / y
else if (t <= 4.8d-27) then
tmp = (x / z) / (z - y)
else if (t <= 3.6d+157) then
tmp = x / (t * (y - z))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8e-84) {
tmp = (x / (t - z)) / y;
} else if (t <= 4.8e-27) {
tmp = (x / z) / (z - y);
} else if (t <= 3.6e+157) {
tmp = x / (t * (y - z));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -8e-84: tmp = (x / (t - z)) / y elif t <= 4.8e-27: tmp = (x / z) / (z - y) elif t <= 3.6e+157: tmp = x / (t * (y - z)) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -8e-84) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (t <= 4.8e-27) tmp = Float64(Float64(x / z) / Float64(z - y)); elseif (t <= 3.6e+157) tmp = Float64(x / Float64(t * Float64(y - z))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -8e-84)
tmp = (x / (t - z)) / y;
elseif (t <= 4.8e-27)
tmp = (x / z) / (z - y);
elseif (t <= 3.6e+157)
tmp = x / (t * (y - z));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -8e-84], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 4.8e-27], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+157], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{-84}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-27}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+157}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if t < -8.0000000000000003e-84Initial program 90.5%
associate-/l/97.4%
clear-num97.2%
inv-pow97.2%
div-inv96.1%
clear-num96.2%
Applied egg-rr96.2%
unpow-196.2%
associate-/r*96.2%
Applied egg-rr96.2%
Taylor expanded in y around inf 62.7%
*-rgt-identity62.7%
times-frac61.1%
associate-*l/66.3%
associate-*r/66.3%
*-rgt-identity66.3%
Simplified66.3%
if -8.0000000000000003e-84 < t < 4.80000000000000004e-27Initial program 89.5%
associate-/l/94.6%
Simplified94.6%
Taylor expanded in t around 0 82.8%
associate-*r/82.8%
neg-mul-182.8%
Simplified82.8%
if 4.80000000000000004e-27 < t < 3.60000000000000024e157Initial program 89.0%
Taylor expanded in t around inf 77.0%
if 3.60000000000000024e157 < t Initial program 68.7%
associate-/l/97.0%
Simplified97.0%
Taylor expanded in t around inf 94.2%
Final simplification77.9%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -1.05e-65) (/ (/ x (- t z)) y) (if (<= y 2.2e-173) (/ -1.0 (* z (/ (- t z) x))) (/ (/ x t) (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.05e-65) {
tmp = (x / (t - z)) / y;
} else if (y <= 2.2e-173) {
tmp = -1.0 / (z * ((t - z) / x));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, 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 <= (-1.05d-65)) then
tmp = (x / (t - z)) / y
else if (y <= 2.2d-173) then
tmp = (-1.0d0) / (z * ((t - z) / x))
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.05e-65) {
tmp = (x / (t - z)) / y;
} else if (y <= 2.2e-173) {
tmp = -1.0 / (z * ((t - z) / x));
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -1.05e-65: tmp = (x / (t - z)) / y elif y <= 2.2e-173: tmp = -1.0 / (z * ((t - z) / x)) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -1.05e-65) tmp = Float64(Float64(x / Float64(t - z)) / y); elseif (y <= 2.2e-173) tmp = Float64(-1.0 / Float64(z * Float64(Float64(t - z) / x))); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -1.05e-65)
tmp = (x / (t - z)) / y;
elseif (y <= 2.2e-173)
tmp = -1.0 / (z * ((t - z) / x));
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -1.05e-65], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 2.2e-173], N[(-1.0 / N[(z * N[(N[(t - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-65}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-173}:\\
\;\;\;\;\frac{-1}{z \cdot \frac{t - z}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -1.05000000000000001e-65Initial program 77.3%
associate-/l/96.9%
clear-num96.3%
inv-pow96.3%
div-inv96.2%
clear-num96.4%
Applied egg-rr96.4%
unpow-196.4%
associate-/r*96.8%
Applied egg-rr96.8%
Taylor expanded in y around inf 75.8%
*-rgt-identity75.8%
times-frac86.0%
associate-*l/86.7%
associate-*r/86.8%
*-rgt-identity86.8%
Simplified86.8%
if -1.05000000000000001e-65 < y < 2.1999999999999999e-173Initial program 93.7%
associate-/l/97.7%
clear-num97.6%
inv-pow97.6%
div-inv96.5%
clear-num96.6%
Applied egg-rr96.6%
unpow-196.6%
associate-/r*96.7%
Applied egg-rr96.7%
Taylor expanded in y around 0 87.0%
associate-/l/87.0%
div-inv87.0%
*-commutative87.0%
Applied egg-rr87.0%
associate-*r/83.7%
associate-*r/83.7%
metadata-eval83.7%
associate-*r/87.0%
Simplified87.0%
if 2.1999999999999999e-173 < y Initial program 87.4%
associate-/l/95.0%
Simplified95.0%
Taylor expanded in t around inf 63.4%
Final simplification77.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -4.8e+98) (not (<= z 3.3e+125))) (/ x (* z (- y z))) (/ x (* t (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.8e+98) || !(z <= 3.3e+125)) {
tmp = x / (z * (y - z));
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
NOTE: x, y, z, 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 <= (-4.8d+98)) .or. (.not. (z <= 3.3d+125))) then
tmp = x / (z * (y - z))
else
tmp = x / (t * (y - z))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.8e+98) || !(z <= 3.3e+125)) {
tmp = x / (z * (y - z));
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -4.8e+98) or not (z <= 3.3e+125): tmp = x / (z * (y - z)) else: tmp = x / (t * (y - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -4.8e+98) || !(z <= 3.3e+125)) tmp = Float64(x / Float64(z * Float64(y - z))); else tmp = Float64(x / Float64(t * Float64(y - z))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -4.8e+98) || ~((z <= 3.3e+125)))
tmp = x / (z * (y - z));
else
tmp = x / (t * (y - z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.8e+98], N[Not[LessEqual[z, 3.3e+125]], $MachinePrecision]], N[(x / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+98} \lor \neg \left(z \leq 3.3 \cdot 10^{+125}\right):\\
\;\;\;\;\frac{x}{z \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if z < -4.7999999999999997e98 or 3.30000000000000005e125 < z Initial program 78.3%
associate-/l/99.8%
Simplified99.8%
Taylor expanded in t around 0 91.2%
associate-*r/91.2%
neg-mul-191.2%
Simplified91.2%
*-un-lft-identity91.2%
associate-/l/75.2%
add-sqr-sqrt37.3%
sqrt-unprod65.4%
sqr-neg65.4%
sqrt-unprod32.7%
add-sqr-sqrt66.7%
*-commutative66.7%
Applied egg-rr66.7%
*-lft-identity66.7%
Simplified66.7%
if -4.7999999999999997e98 < z < 3.30000000000000005e125Initial program 91.8%
Taylor expanded in t around inf 63.7%
Final simplification64.7%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= t -5.2e-89) (/ (/ x t) y) (if (<= t 4e-187) (- (/ x (* z y))) (/ x (* t (- y z))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5.2e-89) {
tmp = (x / t) / y;
} else if (t <= 4e-187) {
tmp = -(x / (z * y));
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
NOTE: x, y, z, 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 <= (-5.2d-89)) then
tmp = (x / t) / y
else if (t <= 4d-187) then
tmp = -(x / (z * y))
else
tmp = x / (t * (y - z))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5.2e-89) {
tmp = (x / t) / y;
} else if (t <= 4e-187) {
tmp = -(x / (z * y));
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -5.2e-89: tmp = (x / t) / y elif t <= 4e-187: tmp = -(x / (z * y)) else: tmp = x / (t * (y - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -5.2e-89) tmp = Float64(Float64(x / t) / y); elseif (t <= 4e-187) tmp = Float64(-Float64(x / Float64(z * y))); else tmp = Float64(x / Float64(t * Float64(y - z))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (t <= -5.2e-89)
tmp = (x / t) / y;
elseif (t <= 4e-187)
tmp = -(x / (z * y));
else
tmp = x / (t * (y - z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[t, -5.2e-89], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 4e-187], (-N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision]), N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{-89}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-187}:\\
\;\;\;\;-\frac{x}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if t < -5.1999999999999997e-89Initial program 90.6%
associate-/l/97.4%
clear-num97.3%
inv-pow97.3%
div-inv96.1%
clear-num96.2%
Applied egg-rr96.2%
Taylor expanded in z around 0 47.0%
associate-/r*51.7%
Simplified51.7%
if -5.1999999999999997e-89 < t < 4.0000000000000001e-187Initial program 91.9%
associate-/l/92.0%
clear-num91.3%
inv-pow91.3%
div-inv91.3%
clear-num91.4%
Applied egg-rr91.4%
Taylor expanded in y around inf 52.0%
associate-/r*53.2%
Simplified53.2%
Taylor expanded in t around 0 40.7%
mul-1-neg40.7%
distribute-neg-frac240.7%
distribute-lft-neg-out40.7%
neg-mul-140.7%
*-commutative40.7%
associate-*l*40.7%
neg-mul-140.7%
Simplified40.7%
if 4.0000000000000001e-187 < t Initial program 82.0%
Taylor expanded in t around inf 61.4%
Final simplification53.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (or (<= z -3.9e+31) (not (<= z 1.7e+34))) (- (/ x (* z y))) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.9e+31) || !(z <= 1.7e+34)) {
tmp = -(x / (z * y));
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: x, y, z, 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.9d+31)) .or. (.not. (z <= 1.7d+34))) then
tmp = -(x / (z * y))
else
tmp = (x / t) / y
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.9e+31) || !(z <= 1.7e+34)) {
tmp = -(x / (z * y));
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -3.9e+31) or not (z <= 1.7e+34): tmp = -(x / (z * y)) else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -3.9e+31) || !(z <= 1.7e+34)) tmp = Float64(-Float64(x / Float64(z * y))); else tmp = Float64(Float64(x / t) / y); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if ((z <= -3.9e+31) || ~((z <= 1.7e+34)))
tmp = -(x / (z * y));
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.9e+31], N[Not[LessEqual[z, 1.7e+34]], $MachinePrecision]], (-N[(x / N[(z * y), $MachinePrecision]), $MachinePrecision]), N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+31} \lor \neg \left(z \leq 1.7 \cdot 10^{+34}\right):\\
\;\;\;\;-\frac{x}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -3.89999999999999999e31 or 1.7e34 < z Initial program 81.5%
associate-/l/99.8%
clear-num99.7%
inv-pow99.7%
div-inv99.6%
clear-num99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 42.9%
associate-/r*46.6%
Simplified46.6%
Taylor expanded in t around 0 39.4%
mul-1-neg39.4%
distribute-neg-frac239.4%
distribute-lft-neg-out39.4%
neg-mul-139.4%
*-commutative39.4%
associate-*l*39.4%
neg-mul-139.4%
Simplified39.4%
if -3.89999999999999999e31 < z < 1.7e34Initial program 92.0%
associate-/l/93.4%
clear-num93.1%
inv-pow93.1%
div-inv92.4%
clear-num92.4%
Applied egg-rr92.4%
Taylor expanded in z around 0 56.5%
associate-/r*61.4%
Simplified61.4%
Final simplification50.9%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -4e-34) (/ x (* (- t z) y)) (/ x (* t (- y z)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4e-34) {
tmp = x / ((t - z) * y);
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
NOTE: x, y, z, 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-34)) then
tmp = x / ((t - z) * y)
else
tmp = x / (t * (y - z))
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4e-34) {
tmp = x / ((t - z) * y);
} else {
tmp = x / (t * (y - z));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -4e-34: tmp = x / ((t - z) * y) else: tmp = x / (t * (y - z)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -4e-34) tmp = Float64(x / Float64(Float64(t - z) * y)); else tmp = Float64(x / Float64(t * Float64(y - z))); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -4e-34)
tmp = x / ((t - z) * y);
else
tmp = x / (t * (y - z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -4e-34], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{-34}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t \cdot \left(y - z\right)}\\
\end{array}
\end{array}
if y < -3.99999999999999971e-34Initial program 76.6%
Taylor expanded in y around inf 75.1%
*-commutative75.1%
Simplified75.1%
if -3.99999999999999971e-34 < y Initial program 90.5%
Taylor expanded in t around inf 61.4%
Final simplification64.8%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -1.05e-64) (/ x (* (- t z) y)) (/ (/ x t) (- y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.05e-64) {
tmp = x / ((t - z) * y);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, 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 <= (-1.05d-64)) then
tmp = x / ((t - z) * y)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.05e-64) {
tmp = x / ((t - z) * y);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -1.05e-64: tmp = x / ((t - z) * y) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -1.05e-64) tmp = Float64(x / Float64(Float64(t - z) * y)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -1.05e-64)
tmp = x / ((t - z) * y);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -1.05e-64], N[(x / N[(N[(t - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-64}:\\
\;\;\;\;\frac{x}{\left(t - z\right) \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -1.05000000000000006e-64Initial program 77.3%
Taylor expanded in y around inf 75.8%
*-commutative75.8%
Simplified75.8%
if -1.05000000000000006e-64 < y Initial program 90.4%
associate-/l/96.3%
Simplified96.3%
Taylor expanded in t around inf 62.6%
Final simplification66.0%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -2.25e-46) (/ (/ x y) (- t z)) (/ (/ x t) (- y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.25e-46) {
tmp = (x / y) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, 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 <= (-2.25d-46)) then
tmp = (x / y) / (t - z)
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.25e-46) {
tmp = (x / y) / (t - z);
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -2.25e-46: tmp = (x / y) / (t - z) else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -2.25e-46) tmp = Float64(Float64(x / y) / Float64(t - z)); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -2.25e-46)
tmp = (x / y) / (t - z);
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -2.25e-46], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{-46}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -2.25e-46Initial program 77.0%
associate-/l/96.9%
clear-num96.3%
inv-pow96.3%
div-inv96.2%
clear-num96.3%
Applied egg-rr96.3%
Taylor expanded in y around inf 75.4%
associate-/r*85.9%
Simplified85.9%
if -2.25e-46 < y Initial program 90.5%
associate-/l/96.3%
Simplified96.3%
Taylor expanded in t around inf 62.8%
Final simplification68.7%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -1.7e-35) (/ (/ x (- t z)) y) (/ (/ x t) (- y z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.7e-35) {
tmp = (x / (t - z)) / y;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
NOTE: x, y, z, 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 <= (-1.7d-35)) then
tmp = (x / (t - z)) / y
else
tmp = (x / t) / (y - z)
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.7e-35) {
tmp = (x / (t - z)) / y;
} else {
tmp = (x / t) / (y - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -1.7e-35: tmp = (x / (t - z)) / y else: tmp = (x / t) / (y - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -1.7e-35) tmp = Float64(Float64(x / Float64(t - z)) / y); else tmp = Float64(Float64(x / t) / Float64(y - z)); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -1.7e-35)
tmp = (x / (t - z)) / y;
else
tmp = (x / t) / (y - z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -1.7e-35], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-35}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y - z}\\
\end{array}
\end{array}
if y < -1.7000000000000001e-35Initial program 76.6%
associate-/l/96.8%
clear-num96.2%
inv-pow96.2%
div-inv96.1%
clear-num96.3%
Applied egg-rr96.3%
unpow-196.3%
associate-/r*96.7%
Applied egg-rr96.7%
Taylor expanded in y around inf 75.1%
*-rgt-identity75.1%
times-frac85.6%
associate-*l/86.4%
associate-*r/86.4%
*-rgt-identity86.4%
Simplified86.4%
if -1.7000000000000001e-35 < y Initial program 90.5%
associate-/l/96.3%
Simplified96.3%
Taylor expanded in t around inf 63.0%
Final simplification68.9%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -1.16e-59) (/ (/ x (- t z)) y) (/ (/ x (- y z)) t)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.16e-59) {
tmp = (x / (t - z)) / y;
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
NOTE: x, y, z, 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 <= (-1.16d-59)) then
tmp = (x / (t - z)) / y
else
tmp = (x / (y - z)) / t
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.16e-59) {
tmp = (x / (t - z)) / y;
} else {
tmp = (x / (y - z)) / t;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -1.16e-59: tmp = (x / (t - z)) / y else: tmp = (x / (y - z)) / t return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -1.16e-59) tmp = Float64(Float64(x / Float64(t - z)) / y); else tmp = Float64(Float64(x / Float64(y - z)) / t); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -1.16e-59)
tmp = (x / (t - z)) / y;
else
tmp = (x / (y - z)) / t;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -1.16e-59], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.16 \cdot 10^{-59}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y - z}}{t}\\
\end{array}
\end{array}
if y < -1.16e-59Initial program 77.3%
associate-/l/96.9%
clear-num96.3%
inv-pow96.3%
div-inv96.2%
clear-num96.4%
Applied egg-rr96.4%
unpow-196.4%
associate-/r*96.8%
Applied egg-rr96.8%
Taylor expanded in y around inf 75.8%
*-rgt-identity75.8%
times-frac86.0%
associate-*l/86.7%
associate-*r/86.8%
*-rgt-identity86.8%
Simplified86.8%
if -1.16e-59 < y Initial program 90.4%
associate-/l/96.3%
clear-num96.2%
inv-pow96.2%
div-inv95.7%
clear-num95.7%
Applied egg-rr95.7%
Taylor expanded in t around inf 61.0%
*-commutative61.0%
associate-/r*67.6%
Simplified67.6%
Final simplification72.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (if (<= y -5e-47) (/ (/ x y) t) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5e-47) {
tmp = (x / y) / t;
} else {
tmp = (x / t) / y;
}
return tmp;
}
NOTE: x, y, z, 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 <= (-5d-47)) then
tmp = (x / y) / t
else
tmp = (x / t) / y
end if
code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5e-47) {
tmp = (x / y) / t;
} else {
tmp = (x / t) / y;
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if y <= -5e-47: tmp = (x / y) / t else: tmp = (x / t) / y return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (y <= -5e-47) tmp = Float64(Float64(x / y) / t); else tmp = Float64(Float64(x / t) / y); end return tmp end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
tmp = 0.0;
if (y <= -5e-47)
tmp = (x / y) / t;
else
tmp = (x / t) / y;
end
tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := If[LessEqual[y, -5e-47], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-47}:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if y < -5.00000000000000011e-47Initial program 77.0%
Taylor expanded in z around 0 47.9%
div-inv47.9%
associate-/r*47.8%
Applied egg-rr47.8%
*-commutative47.8%
associate-*l/50.5%
associate-*r/51.7%
associate-*l/51.7%
*-lft-identity51.7%
Simplified51.7%
if -5.00000000000000011e-47 < y Initial program 90.5%
associate-/l/96.3%
clear-num96.2%
inv-pow96.2%
div-inv95.7%
clear-num95.7%
Applied egg-rr95.7%
Taylor expanded in z around 0 35.1%
associate-/r*39.4%
Simplified39.4%
Final simplification42.5%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* t y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return x / (t * y);
}
NOTE: x, y, z, 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 / (t * y)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return x / (t * y);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return x / (t * y)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(x / Float64(t * y)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (t * y);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{x}{t \cdot y}
\end{array}
Initial program 87.0%
Taylor expanded in z around 0 38.4%
Final simplification38.4%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ (/ x t) y))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (x / t) / y;
}
NOTE: x, y, z, 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 / t) / y
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (x / t) / y;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (x / t) / y
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(x / t) / y) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / t) / y;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{t}}{y}
\end{array}
Initial program 87.0%
associate-/l/96.4%
clear-num96.2%
inv-pow96.2%
div-inv95.8%
clear-num95.9%
Applied egg-rr95.9%
Taylor expanded in z around 0 38.4%
associate-/r*42.2%
Simplified42.2%
Final simplification42.2%
(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 2024076
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:alt
(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))))