
(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 18 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 (* (/ (pow (cbrt x) 2.0) (- y z)) (/ (cbrt x) (- t z))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (pow(cbrt(x), 2.0) / (y - z)) * (cbrt(x) / (t - z));
}
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (Math.pow(Math.cbrt(x), 2.0) / (y - z)) * (Math.cbrt(x) / (t - z));
}
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64((cbrt(x) ^ 2.0) / Float64(y - z)) * Float64(cbrt(x) / Float64(t - z))) end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. code[x_, y_, z_, t_] := N[(N[(N[Power[N[Power[x, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{{\left(\sqrt[3]{x}\right)}^{2}}{y - z} \cdot \frac{\sqrt[3]{x}}{t - z}
\end{array}
Initial program 90.5%
add-cube-cbrt89.6%
times-frac95.8%
pow295.8%
Applied egg-rr95.8%
Final simplification95.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 -2.7e+201)
(/ (/ x y) (- t z))
(if (<= y -4.6e-27)
(/ x (* y (- t z)))
(if (<= y 7.1e-217) (/ (- x) (* z (- t z))) (/ 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 <= -2.7e+201) {
tmp = (x / y) / (t - z);
} else if (y <= -4.6e-27) {
tmp = x / (y * (t - z));
} else if (y <= 7.1e-217) {
tmp = -x / (z * (t - z));
} 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 <= (-2.7d+201)) then
tmp = (x / y) / (t - z)
else if (y <= (-4.6d-27)) then
tmp = x / (y * (t - z))
else if (y <= 7.1d-217) then
tmp = -x / (z * (t - z))
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 <= -2.7e+201) {
tmp = (x / y) / (t - z);
} else if (y <= -4.6e-27) {
tmp = x / (y * (t - z));
} else if (y <= 7.1e-217) {
tmp = -x / (z * (t - z));
} 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 <= -2.7e+201: tmp = (x / y) / (t - z) elif y <= -4.6e-27: tmp = x / (y * (t - z)) elif y <= 7.1e-217: tmp = -x / (z * (t - z)) 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 <= -2.7e+201) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (y <= -4.6e-27) tmp = Float64(x / Float64(y * Float64(t - z))); elseif (y <= 7.1e-217) tmp = Float64(Float64(-x) / Float64(z * Float64(t - z))); else tmp = Float64(x / Float64(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 <= -2.7e+201)
tmp = (x / y) / (t - z);
elseif (y <= -4.6e-27)
tmp = x / (y * (t - z));
elseif (y <= 7.1e-217)
tmp = -x / (z * (t - z));
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, -2.7e+201], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.6e-27], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.1e-217], N[((-x) / N[(z * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+201}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{-27}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{elif}\;y \leq 7.1 \cdot 10^{-217}:\\
\;\;\;\;\frac{-x}{z \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if y < -2.7e201Initial program 80.3%
add-cube-cbrt79.9%
times-frac94.5%
pow294.5%
Applied egg-rr94.5%
associate-*r/94.4%
associate-*l/94.2%
unpow294.2%
add-cube-cbrt94.8%
Applied egg-rr94.8%
Taylor expanded in y around inf 80.3%
associate-/r*94.8%
Simplified94.8%
if -2.7e201 < y < -4.5999999999999999e-27Initial program 89.9%
Taylor expanded in y around inf 76.1%
*-commutative76.1%
Simplified76.1%
if -4.5999999999999999e-27 < y < 7.1000000000000002e-217Initial program 89.9%
Taylor expanded in y around 0 80.7%
associate-*r/80.7%
neg-mul-180.7%
Simplified80.7%
if 7.1000000000000002e-217 < y Initial program 92.9%
Taylor expanded in t around inf 64.6%
Final simplification74.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 (<= t -6e-291)
(/ (/ x y) (- t z))
(if (<= t 2.6e-215)
(/ 1.0 (* y (- (/ z x))))
(if (<= t 6.8e-24) (/ (/ 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 (t <= -6e-291) {
tmp = (x / y) / (t - z);
} else if (t <= 2.6e-215) {
tmp = 1.0 / (y * -(z / x));
} else if (t <= 6.8e-24) {
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 (t <= (-6d-291)) then
tmp = (x / y) / (t - z)
else if (t <= 2.6d-215) then
tmp = 1.0d0 / (y * -(z / x))
else if (t <= 6.8d-24) 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 (t <= -6e-291) {
tmp = (x / y) / (t - z);
} else if (t <= 2.6e-215) {
tmp = 1.0 / (y * -(z / x));
} else if (t <= 6.8e-24) {
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 t <= -6e-291: tmp = (x / y) / (t - z) elif t <= 2.6e-215: tmp = 1.0 / (y * -(z / x)) elif t <= 6.8e-24: 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 (t <= -6e-291) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 2.6e-215) tmp = Float64(1.0 / Float64(y * Float64(-Float64(z / x)))); elseif (t <= 6.8e-24) tmp = Float64(Float64(x / Float64(t - z)) / y); else tmp = Float64(x / Float64(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 (t <= -6e-291)
tmp = (x / y) / (t - z);
elseif (t <= 2.6e-215)
tmp = 1.0 / (y * -(z / x));
elseif (t <= 6.8e-24)
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[t, -6e-291], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e-215], N[(1.0 / N[(y * (-N[(z / x), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e-24], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{-291}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-215}:\\
\;\;\;\;\frac{1}{y \cdot \left(-\frac{z}{x}\right)}\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-24}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -6.0000000000000001e-291Initial program 89.9%
add-cube-cbrt89.1%
times-frac96.6%
pow296.6%
Applied egg-rr96.6%
associate-*r/95.1%
associate-*l/95.1%
unpow295.1%
add-cube-cbrt96.0%
Applied egg-rr96.0%
Taylor expanded in y around inf 56.4%
associate-/r*57.5%
Simplified57.5%
if -6.0000000000000001e-291 < t < 2.6e-215Initial program 91.6%
Taylor expanded in y around inf 58.8%
*-commutative58.8%
associate-/r*66.8%
Simplified66.8%
clear-num68.8%
inv-pow68.8%
div-inv68.6%
clear-num68.6%
Applied egg-rr68.6%
unpow-168.6%
Simplified68.6%
Taylor expanded in t around 0 60.1%
neg-mul-160.1%
distribute-neg-frac60.1%
Simplified60.1%
if 2.6e-215 < t < 6.79999999999999985e-24Initial program 91.9%
Taylor expanded in y around inf 59.2%
*-commutative59.2%
associate-/r*60.5%
Simplified60.5%
if 6.79999999999999985e-24 < t Initial program 90.4%
Taylor expanded in t around inf 83.8%
Final simplification65.9%
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)))
(if (<= z -5.5e+150)
(/ t_1 (- y z))
(if (<= z 1.62e+137) (/ x (* (- y z) (- t z))) (/ t_1 (- t z))))))assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double t_1 = -x / z;
double tmp;
if (z <= -5.5e+150) {
tmp = t_1 / (y - z);
} else if (z <= 1.62e+137) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = t_1 / (t - 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) :: tmp
t_1 = -x / z
if (z <= (-5.5d+150)) then
tmp = t_1 / (y - z)
else if (z <= 1.62d+137) then
tmp = x / ((y - z) * (t - z))
else
tmp = t_1 / (t - 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;
double tmp;
if (z <= -5.5e+150) {
tmp = t_1 / (y - z);
} else if (z <= 1.62e+137) {
tmp = x / ((y - z) * (t - z));
} else {
tmp = t_1 / (t - z);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): t_1 = -x / z tmp = 0 if z <= -5.5e+150: tmp = t_1 / (y - z) elif z <= 1.62e+137: tmp = x / ((y - z) * (t - z)) else: tmp = t_1 / (t - z) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) t_1 = Float64(Float64(-x) / z) tmp = 0.0 if (z <= -5.5e+150) tmp = Float64(t_1 / Float64(y - z)); elseif (z <= 1.62e+137) tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z))); else tmp = Float64(t_1 / Float64(t - 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;
tmp = 0.0;
if (z <= -5.5e+150)
tmp = t_1 / (y - z);
elseif (z <= 1.62e+137)
tmp = x / ((y - z) * (t - z));
else
tmp = t_1 / (t - 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) / z), $MachinePrecision]}, If[LessEqual[z, -5.5e+150], N[(t$95$1 / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.62e+137], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(t - z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{-x}{z}\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+150}:\\
\;\;\;\;\frac{t\_1}{y - z}\\
\mathbf{elif}\;z \leq 1.62 \cdot 10^{+137}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{t - z}\\
\end{array}
\end{array}
if z < -5.50000000000000017e150Initial program 78.6%
add-cube-cbrt78.6%
times-frac99.6%
pow299.6%
Applied egg-rr99.6%
Taylor expanded in t around 0 78.6%
mul-1-neg78.6%
associate-/r*92.1%
distribute-neg-frac92.1%
distribute-frac-neg92.1%
Simplified92.1%
if -5.50000000000000017e150 < z < 1.6200000000000001e137Initial program 93.7%
if 1.6200000000000001e137 < z Initial program 85.7%
add-cube-cbrt85.7%
times-frac99.7%
pow299.7%
Applied egg-rr99.7%
associate-*r/99.8%
associate-*l/99.7%
unpow299.7%
add-cube-cbrt99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 85.7%
mul-1-neg85.7%
associate-/r*97.2%
distribute-neg-frac97.2%
Simplified97.2%
Final simplification94.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 (<= t -1100000000.0) (/ (/ x y) (- t z)) (if (<= t 1.02e-20) (/ (- x) (* z (- y z))) (/ x (* (- y z) t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1100000000.0) {
tmp = (x / y) / (t - z);
} else if (t <= 1.02e-20) {
tmp = -x / (z * (y - z));
} 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 (t <= (-1100000000.0d0)) then
tmp = (x / y) / (t - z)
else if (t <= 1.02d-20) then
tmp = -x / (z * (y - z))
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 (t <= -1100000000.0) {
tmp = (x / y) / (t - z);
} else if (t <= 1.02e-20) {
tmp = -x / (z * (y - z));
} 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 t <= -1100000000.0: tmp = (x / y) / (t - z) elif t <= 1.02e-20: tmp = -x / (z * (y - z)) 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 (t <= -1100000000.0) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 1.02e-20) tmp = Float64(Float64(-x) / Float64(z * Float64(y - z))); else tmp = Float64(x / Float64(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 (t <= -1100000000.0)
tmp = (x / y) / (t - z);
elseif (t <= 1.02e-20)
tmp = -x / (z * (y - z));
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[t, -1100000000.0], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.02e-20], N[((-x) / N[(z * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1100000000:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-20}:\\
\;\;\;\;\frac{-x}{z \cdot \left(y - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -1.1e9Initial program 90.6%
add-cube-cbrt90.0%
times-frac95.9%
pow295.9%
Applied egg-rr95.9%
associate-*r/92.9%
associate-*l/92.8%
unpow292.8%
add-cube-cbrt93.5%
Applied egg-rr93.5%
Taylor expanded in y around inf 61.2%
associate-/r*60.4%
Simplified60.4%
if -1.1e9 < t < 1.02000000000000001e-20Initial program 90.5%
Taylor expanded in t around 0 73.9%
associate-*r/73.9%
neg-mul-173.9%
Simplified73.9%
if 1.02000000000000001e-20 < t Initial program 90.4%
Taylor expanded in t around inf 83.8%
Final simplification73.6%
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 -1200000000.0) (/ (/ x y) (- t z)) (if (<= t 3.85e-22) (/ (/ (- x) z) (- y z)) (/ x (* (- y z) t)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1200000000.0) {
tmp = (x / y) / (t - z);
} else if (t <= 3.85e-22) {
tmp = (-x / z) / (y - z);
} 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 (t <= (-1200000000.0d0)) then
tmp = (x / y) / (t - z)
else if (t <= 3.85d-22) then
tmp = (-x / z) / (y - z)
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 (t <= -1200000000.0) {
tmp = (x / y) / (t - z);
} else if (t <= 3.85e-22) {
tmp = (-x / z) / (y - z);
} 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 t <= -1200000000.0: tmp = (x / y) / (t - z) elif t <= 3.85e-22: tmp = (-x / z) / (y - z) 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 (t <= -1200000000.0) tmp = Float64(Float64(x / y) / Float64(t - z)); elseif (t <= 3.85e-22) tmp = Float64(Float64(Float64(-x) / z) / Float64(y - z)); else tmp = Float64(x / Float64(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 (t <= -1200000000.0)
tmp = (x / y) / (t - z);
elseif (t <= 3.85e-22)
tmp = (-x / z) / (y - z);
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[t, -1200000000.0], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.85e-22], N[(N[((-x) / z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1200000000:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{elif}\;t \leq 3.85 \cdot 10^{-22}:\\
\;\;\;\;\frac{\frac{-x}{z}}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -1.2e9Initial program 90.6%
add-cube-cbrt90.0%
times-frac95.9%
pow295.9%
Applied egg-rr95.9%
associate-*r/92.9%
associate-*l/92.8%
unpow292.8%
add-cube-cbrt93.5%
Applied egg-rr93.5%
Taylor expanded in y around inf 61.2%
associate-/r*60.4%
Simplified60.4%
if -1.2e9 < t < 3.8500000000000001e-22Initial program 90.5%
add-cube-cbrt89.4%
times-frac95.4%
pow295.4%
Applied egg-rr95.4%
Taylor expanded in t around 0 73.9%
mul-1-neg73.9%
associate-/r*80.8%
distribute-neg-frac80.8%
distribute-frac-neg80.8%
Simplified80.8%
if 3.8500000000000001e-22 < t Initial program 90.4%
Taylor expanded in t around inf 83.8%
Final simplification76.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 (<= t -500000000.0) (/ (/ x y) t) (if (<= t 3.5e-177) (- (/ (/ x z) y)) (* (/ x t) (/ 1.0 y)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -500000000.0) {
tmp = (x / y) / t;
} else if (t <= 3.5e-177) {
tmp = -((x / z) / y);
} else {
tmp = (x / t) * (1.0 / 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 (t <= (-500000000.0d0)) then
tmp = (x / y) / t
else if (t <= 3.5d-177) then
tmp = -((x / z) / y)
else
tmp = (x / t) * (1.0d0 / 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 (t <= -500000000.0) {
tmp = (x / y) / t;
} else if (t <= 3.5e-177) {
tmp = -((x / z) / y);
} else {
tmp = (x / t) * (1.0 / y);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -500000000.0: tmp = (x / y) / t elif t <= 3.5e-177: tmp = -((x / z) / y) else: tmp = (x / t) * (1.0 / y) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -500000000.0) tmp = Float64(Float64(x / y) / t); elseif (t <= 3.5e-177) tmp = Float64(-Float64(Float64(x / z) / y)); else tmp = Float64(Float64(x / t) * Float64(1.0 / 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 (t <= -500000000.0)
tmp = (x / y) / t;
elseif (t <= 3.5e-177)
tmp = -((x / z) / y);
else
tmp = (x / t) * (1.0 / 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[t, -500000000.0], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 3.5e-177], (-N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]), N[(N[(x / t), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -500000000:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-177}:\\
\;\;\;\;-\frac{\frac{x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t} \cdot \frac{1}{y}\\
\end{array}
\end{array}
if t < -5e8Initial program 90.6%
Taylor expanded in z around 0 54.8%
*-un-lft-identity54.8%
times-frac53.8%
Applied egg-rr53.8%
associate-*l/53.7%
*-lft-identity53.7%
Simplified53.7%
if -5e8 < t < 3.5000000000000002e-177Initial program 88.7%
Taylor expanded in y around inf 53.5%
*-commutative53.5%
associate-/r*56.6%
Simplified56.6%
Taylor expanded in t around 0 46.2%
associate-*r/46.2%
neg-mul-146.2%
Simplified46.2%
if 3.5000000000000002e-177 < t Initial program 92.0%
Taylor expanded in z around 0 48.8%
associate-/r*54.1%
div-inv54.1%
Applied egg-rr54.1%
Final simplification51.2%
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 -1950000000.0) (/ (/ x y) t) (if (<= t 3.8e-177) (- (/ (/ x z) y)) (/ 1.0 (* y (/ t x))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1950000000.0) {
tmp = (x / y) / t;
} else if (t <= 3.8e-177) {
tmp = -((x / z) / y);
} else {
tmp = 1.0 / (y * (t / x));
}
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 <= (-1950000000.0d0)) then
tmp = (x / y) / t
else if (t <= 3.8d-177) then
tmp = -((x / z) / y)
else
tmp = 1.0d0 / (y * (t / x))
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 <= -1950000000.0) {
tmp = (x / y) / t;
} else if (t <= 3.8e-177) {
tmp = -((x / z) / y);
} else {
tmp = 1.0 / (y * (t / x));
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if t <= -1950000000.0: tmp = (x / y) / t elif t <= 3.8e-177: tmp = -((x / z) / y) else: tmp = 1.0 / (y * (t / x)) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if (t <= -1950000000.0) tmp = Float64(Float64(x / y) / t); elseif (t <= 3.8e-177) tmp = Float64(-Float64(Float64(x / z) / y)); else tmp = Float64(1.0 / Float64(y * Float64(t / x))); 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 <= -1950000000.0)
tmp = (x / y) / t;
elseif (t <= 3.8e-177)
tmp = -((x / z) / y);
else
tmp = 1.0 / (y * (t / x));
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, -1950000000.0], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 3.8e-177], (-N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]), N[(1.0 / N[(y * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1950000000:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-177}:\\
\;\;\;\;-\frac{\frac{x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot \frac{t}{x}}\\
\end{array}
\end{array}
if t < -1.95e9Initial program 90.6%
Taylor expanded in z around 0 54.8%
*-un-lft-identity54.8%
times-frac53.8%
Applied egg-rr53.8%
associate-*l/53.7%
*-lft-identity53.7%
Simplified53.7%
if -1.95e9 < t < 3.80000000000000004e-177Initial program 88.7%
Taylor expanded in y around inf 53.5%
*-commutative53.5%
associate-/r*56.6%
Simplified56.6%
Taylor expanded in t around 0 46.2%
associate-*r/46.2%
neg-mul-146.2%
Simplified46.2%
if 3.80000000000000004e-177 < t Initial program 92.0%
Taylor expanded in z around 0 48.8%
clear-num48.8%
inv-pow48.8%
*-commutative48.8%
associate-/l*54.2%
Applied egg-rr54.2%
unpow-154.2%
associate-/r/48.5%
Simplified48.5%
Taylor expanded in y around 0 48.8%
associate-/l*48.0%
associate-/r/56.1%
Simplified56.1%
Final simplification51.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 (<= t -530000000.0) (/ (/ x y) t) (if (<= t 3.5e-177) (- (/ (/ x 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 (t <= -530000000.0) {
tmp = (x / y) / t;
} else if (t <= 3.5e-177) {
tmp = -((x / 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 (t <= (-530000000.0d0)) then
tmp = (x / y) / t
else if (t <= 3.5d-177) then
tmp = -((x / 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 (t <= -530000000.0) {
tmp = (x / y) / t;
} else if (t <= 3.5e-177) {
tmp = -((x / 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 t <= -530000000.0: tmp = (x / y) / t elif t <= 3.5e-177: tmp = -((x / 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 (t <= -530000000.0) tmp = Float64(Float64(x / y) / t); elseif (t <= 3.5e-177) tmp = Float64(-Float64(Float64(x / z) / y)); else tmp = Float64(x / Float64(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 (t <= -530000000.0)
tmp = (x / y) / t;
elseif (t <= 3.5e-177)
tmp = -((x / 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[t, -530000000.0], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 3.5e-177], (-N[(N[(x / z), $MachinePrecision] / y), $MachinePrecision]), N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -530000000:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-177}:\\
\;\;\;\;-\frac{\frac{x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < -5.3e8Initial program 90.6%
Taylor expanded in z around 0 54.8%
*-un-lft-identity54.8%
times-frac53.8%
Applied egg-rr53.8%
associate-*l/53.7%
*-lft-identity53.7%
Simplified53.7%
if -5.3e8 < t < 3.5000000000000002e-177Initial program 88.7%
Taylor expanded in y around inf 53.5%
*-commutative53.5%
associate-/r*56.6%
Simplified56.6%
Taylor expanded in t around 0 46.2%
associate-*r/46.2%
neg-mul-146.2%
Simplified46.2%
if 3.5000000000000002e-177 < t Initial program 92.0%
Taylor expanded in t around inf 72.3%
Final simplification58.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 (<= t -380000000.0) (/ (/ x y) t) (if (<= t 2.5e-177) (/ (- x) (* y z)) (/ (/ x t) y))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -380000000.0) {
tmp = (x / y) / t;
} else if (t <= 2.5e-177) {
tmp = -x / (y * z);
} 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 (t <= (-380000000.0d0)) then
tmp = (x / y) / t
else if (t <= 2.5d-177) then
tmp = -x / (y * z)
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 (t <= -380000000.0) {
tmp = (x / y) / t;
} else if (t <= 2.5e-177) {
tmp = -x / (y * z);
} 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 t <= -380000000.0: tmp = (x / y) / t elif t <= 2.5e-177: tmp = -x / (y * z) 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 (t <= -380000000.0) tmp = Float64(Float64(x / y) / t); elseif (t <= 2.5e-177) tmp = Float64(Float64(-x) / Float64(y * z)); 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 (t <= -380000000.0)
tmp = (x / y) / t;
elseif (t <= 2.5e-177)
tmp = -x / (y * z);
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[t, -380000000.0], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 2.5e-177], N[((-x) / N[(y * z), $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}\;t \leq -380000000:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-177}:\\
\;\;\;\;\frac{-x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if t < -3.8e8Initial program 90.6%
Taylor expanded in z around 0 54.8%
*-un-lft-identity54.8%
times-frac53.8%
Applied egg-rr53.8%
associate-*l/53.7%
*-lft-identity53.7%
Simplified53.7%
if -3.8e8 < t < 2.5e-177Initial program 88.7%
Taylor expanded in y around inf 53.5%
*-commutative53.5%
associate-/r*56.6%
Simplified56.6%
Taylor expanded in t around 0 40.3%
associate-*r/40.3%
neg-mul-140.3%
*-commutative40.3%
Simplified40.3%
if 2.5e-177 < t Initial program 92.0%
Taylor expanded in y around inf 58.2%
*-commutative58.2%
associate-/r*64.8%
Simplified64.8%
Taylor expanded in t around inf 54.1%
Final simplification49.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 (<= t -440000000.0) (/ (/ x y) t) (if (<= t 3.8e-177) (- (/ (/ 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 (t <= -440000000.0) {
tmp = (x / y) / t;
} else if (t <= 3.8e-177) {
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 (t <= (-440000000.0d0)) then
tmp = (x / y) / t
else if (t <= 3.8d-177) 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 (t <= -440000000.0) {
tmp = (x / y) / t;
} else if (t <= 3.8e-177) {
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 t <= -440000000.0: tmp = (x / y) / t elif t <= 3.8e-177: 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 (t <= -440000000.0) tmp = Float64(Float64(x / y) / t); elseif (t <= 3.8e-177) tmp = Float64(-Float64(Float64(x / 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 (t <= -440000000.0)
tmp = (x / y) / t;
elseif (t <= 3.8e-177)
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[LessEqual[t, -440000000.0], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 3.8e-177], (-N[(N[(x / z), $MachinePrecision] / y), $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}\;t \leq -440000000:\\
\;\;\;\;\frac{\frac{x}{y}}{t}\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-177}:\\
\;\;\;\;-\frac{\frac{x}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if t < -4.4e8Initial program 90.6%
Taylor expanded in z around 0 54.8%
*-un-lft-identity54.8%
times-frac53.8%
Applied egg-rr53.8%
associate-*l/53.7%
*-lft-identity53.7%
Simplified53.7%
if -4.4e8 < t < 3.80000000000000004e-177Initial program 88.7%
Taylor expanded in y around inf 53.5%
*-commutative53.5%
associate-/r*56.6%
Simplified56.6%
Taylor expanded in t around 0 46.2%
associate-*r/46.2%
neg-mul-146.2%
Simplified46.2%
if 3.80000000000000004e-177 < t Initial program 92.0%
Taylor expanded in y around inf 58.2%
*-commutative58.2%
associate-/r*64.8%
Simplified64.8%
Taylor expanded in t around inf 54.1%
Final simplification51.2%
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 -1.8e+38) (not (<= z 1.9e+30))) (/ x (* y z)) (/ x (* y t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.8e+38) || !(z <= 1.9e+30)) {
tmp = x / (y * z);
} else {
tmp = x / (y * 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 ((z <= (-1.8d+38)) .or. (.not. (z <= 1.9d+30))) then
tmp = x / (y * z)
else
tmp = x / (y * 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 ((z <= -1.8e+38) || !(z <= 1.9e+30)) {
tmp = x / (y * z);
} else {
tmp = x / (y * t);
}
return tmp;
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): tmp = 0 if (z <= -1.8e+38) or not (z <= 1.9e+30): tmp = x / (y * z) else: tmp = x / (y * t) return tmp
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) tmp = 0.0 if ((z <= -1.8e+38) || !(z <= 1.9e+30)) tmp = Float64(x / Float64(y * z)); else tmp = Float64(x / Float64(y * 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 ((z <= -1.8e+38) || ~((z <= 1.9e+30)))
tmp = x / (y * z);
else
tmp = x / (y * 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[Or[LessEqual[z, -1.8e+38], N[Not[LessEqual[z, 1.9e+30]], $MachinePrecision]], N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+38} \lor \neg \left(z \leq 1.9 \cdot 10^{+30}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot t}\\
\end{array}
\end{array}
if z < -1.79999999999999985e38 or 1.9000000000000001e30 < z Initial program 85.7%
add-cube-cbrt85.4%
times-frac99.2%
pow299.2%
Applied egg-rr99.2%
Taylor expanded in t around 0 81.8%
mul-1-neg81.8%
associate-/r*89.1%
distribute-neg-frac89.1%
distribute-frac-neg89.1%
Simplified89.1%
expm1-log1p-u88.8%
expm1-udef69.3%
associate-/l/69.3%
associate-/r*69.3%
add-sqr-sqrt26.4%
sqrt-unprod58.6%
sqr-neg58.6%
sqrt-unprod38.9%
add-sqr-sqrt65.3%
Applied egg-rr65.3%
expm1-def61.2%
expm1-log1p61.2%
associate-/l/63.7%
associate-/r*61.2%
Simplified61.2%
Taylor expanded in z around 0 37.6%
*-commutative37.6%
Simplified37.6%
if -1.79999999999999985e38 < z < 1.9000000000000001e30Initial program 94.4%
Taylor expanded in z around 0 56.3%
Final simplification47.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 (or (<= z -2.05e+61) (not (<= z 2.7e+124))) (/ x (* y z)) (/ (/ x t) y)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.05e+61) || !(z <= 2.7e+124)) {
tmp = x / (y * z);
} 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 <= (-2.05d+61)) .or. (.not. (z <= 2.7d+124))) then
tmp = x / (y * z)
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 <= -2.05e+61) || !(z <= 2.7e+124)) {
tmp = x / (y * z);
} 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 <= -2.05e+61) or not (z <= 2.7e+124): tmp = x / (y * z) 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 <= -2.05e+61) || !(z <= 2.7e+124)) tmp = Float64(x / Float64(y * z)); 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 <= -2.05e+61) || ~((z <= 2.7e+124)))
tmp = x / (y * z);
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, -2.05e+61], N[Not[LessEqual[z, 2.7e+124]], $MachinePrecision]], N[(x / N[(y * z), $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 -2.05 \cdot 10^{+61} \lor \neg \left(z \leq 2.7 \cdot 10^{+124}\right):\\
\;\;\;\;\frac{x}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{y}\\
\end{array}
\end{array}
if z < -2.04999999999999986e61 or 2.69999999999999978e124 < z Initial program 85.6%
add-cube-cbrt85.5%
times-frac99.5%
pow299.5%
Applied egg-rr99.5%
Taylor expanded in t around 0 83.2%
mul-1-neg83.2%
associate-/r*92.1%
distribute-neg-frac92.1%
distribute-frac-neg92.1%
Simplified92.1%
expm1-log1p-u91.9%
expm1-udef76.9%
associate-/l/76.9%
associate-/r*76.9%
add-sqr-sqrt29.4%
sqrt-unprod65.9%
sqr-neg65.9%
sqrt-unprod44.6%
add-sqr-sqrt74.0%
Applied egg-rr74.0%
expm1-def69.3%
expm1-log1p69.4%
associate-/l/72.4%
associate-/r*69.4%
Simplified69.4%
Taylor expanded in z around 0 42.2%
*-commutative42.2%
Simplified42.2%
if -2.04999999999999986e61 < z < 2.69999999999999978e124Initial program 93.4%
Taylor expanded in y around inf 63.9%
*-commutative63.9%
associate-/r*67.5%
Simplified67.5%
Taylor expanded in t around inf 53.0%
Final simplification49.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 (<= t 2.1e-27) (/ x (* y (- t z))) (/ x (* (- y z) t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.1e-27) {
tmp = x / (y * (t - z));
} 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 (t <= 2.1d-27) then
tmp = x / (y * (t - z))
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 (t <= 2.1e-27) {
tmp = x / (y * (t - z));
} 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 t <= 2.1e-27: tmp = x / (y * (t - z)) 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 (t <= 2.1e-27) tmp = Float64(x / Float64(y * Float64(t - z))); else tmp = Float64(x / Float64(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 (t <= 2.1e-27)
tmp = x / (y * (t - z));
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[t, 2.1e-27], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.1 \cdot 10^{-27}:\\
\;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < 2.10000000000000015e-27Initial program 90.5%
Taylor expanded in y around inf 57.3%
*-commutative57.3%
Simplified57.3%
if 2.10000000000000015e-27 < t Initial program 90.4%
Taylor expanded in t around inf 83.8%
Final simplification65.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 (<= t 1.25e-22) (/ (/ x y) (- t z)) (/ x (* (- y z) t))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.25e-22) {
tmp = (x / y) / (t - z);
} 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 (t <= 1.25d-22) then
tmp = (x / y) / (t - z)
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 (t <= 1.25e-22) {
tmp = (x / y) / (t - z);
} 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 t <= 1.25e-22: tmp = (x / y) / (t - z) 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 (t <= 1.25e-22) tmp = Float64(Float64(x / y) / Float64(t - z)); else tmp = Float64(x / Float64(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 (t <= 1.25e-22)
tmp = (x / y) / (t - z);
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[t, 1.25e-22], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.25 \cdot 10^{-22}:\\
\;\;\;\;\frac{\frac{x}{y}}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < 1.24999999999999988e-22Initial program 90.5%
add-cube-cbrt89.6%
times-frac95.6%
pow295.6%
Applied egg-rr95.6%
associate-*r/92.6%
associate-*l/92.6%
unpow292.6%
add-cube-cbrt93.6%
Applied egg-rr93.6%
Taylor expanded in y around inf 57.3%
associate-/r*55.2%
Simplified55.2%
if 1.24999999999999988e-22 < t Initial program 90.4%
Taylor expanded in t around inf 83.8%
Final simplification63.6%
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 2.15e-23) (/ (/ 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 (t <= 2.15e-23) {
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 (t <= 2.15d-23) 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 (t <= 2.15e-23) {
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 t <= 2.15e-23: 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 (t <= 2.15e-23) tmp = Float64(Float64(x / Float64(t - z)) / y); else tmp = Float64(x / Float64(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 (t <= 2.15e-23)
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[t, 2.15e-23], N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.15 \cdot 10^{-23}:\\
\;\;\;\;\frac{\frac{x}{t - z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
\end{array}
\end{array}
if t < 2.15000000000000001e-23Initial program 90.5%
Taylor expanded in y around inf 57.3%
*-commutative57.3%
associate-/r*60.7%
Simplified60.7%
if 2.15000000000000001e-23 < t Initial program 90.4%
Taylor expanded in t around inf 83.8%
Final simplification67.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 (- y z)) (- t z)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
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 / (y - z)) / (t - z)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return (x / (y - z)) / (t - z);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return (x / (y - z)) / (t - z)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(Float64(x / Float64(y - z)) / Float64(t - z)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = (x / (y - z)) / (t - z);
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[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{y - z}}{t - z}
\end{array}
Initial program 90.5%
add-cube-cbrt89.6%
times-frac95.8%
pow295.8%
Applied egg-rr95.8%
associate-*r/93.7%
associate-*l/93.7%
unpow293.7%
add-cube-cbrt94.6%
Applied egg-rr94.6%
Final simplification94.6%
NOTE: x, y, z, and t should be sorted in increasing order before calling this function. (FPCore (x y z t) :precision binary64 (/ x (* y t)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
return x / (y * t);
}
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 / (y * t)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
return x / (y * t);
}
[x, y, z, t] = sort([x, y, z, t]) def code(x, y, z, t): return x / (y * t)
x, y, z, t = sort([x, y, z, t]) function code(x, y, z, t) return Float64(x / Float64(y * t)) end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
tmp = x / (y * t);
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[(y * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{x}{y \cdot t}
\end{array}
Initial program 90.5%
Taylor expanded in z around 0 40.2%
Final simplification40.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 2024036
(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))))