
(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* z t)) a))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x * y) - (z * t)) / a
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
def code(x, y, z, t, a): return ((x * y) - (z * t)) / a
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) - Float64(z * t)) / a) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) - (z * t)) / a; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y - z \cdot t}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* z t)) a))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x * y) - (z * t)) / a
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
def code(x, y, z, t, a): return ((x * y) - (z * t)) / a
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) - Float64(z * t)) / a) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) - (z * t)) / a; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y - z \cdot t}{a}
\end{array}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* z t))))
(if (<= t_1 (- INFINITY))
(- (/ x (/ a y)) (* t (/ z a)))
(if (<= t_1 2e+252) (/ t_1 a) (* t (/ (fma x (/ y t) (- z)) a))))))assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x / (a / y)) - (t * (z / a));
} else if (t_1 <= 2e+252) {
tmp = t_1 / a;
} else {
tmp = t * (fma(x, (y / t), -z) / a);
}
return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x / Float64(a / y)) - Float64(t * Float64(z / a))); elseif (t_1 <= 2e+252) tmp = Float64(t_1 / a); else tmp = Float64(t * Float64(fma(x, Float64(y / t), Float64(-z)) / a)); end return tmp end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+252], N[(t$95$1 / a), $MachinePrecision], N[(t * N[(N[(x * N[(y / t), $MachinePrecision] + (-z)), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - t \cdot \frac{z}{a}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+252}:\\
\;\;\;\;\frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{\mathsf{fma}\left(x, \frac{y}{t}, -z\right)}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0Initial program 67.4%
div-sub67.4%
*-un-lft-identity67.4%
add-sqr-sqrt30.7%
times-frac30.7%
fmm-def30.7%
associate-/l*26.3%
Applied egg-rr26.3%
fmm-undef26.3%
associate-*l/26.3%
*-lft-identity26.3%
associate-/l*26.3%
associate-*l/30.4%
associate-*r/34.8%
*-commutative34.8%
associate-/l*34.8%
Simplified34.8%
*-commutative34.8%
clear-num34.8%
frac-times34.8%
*-un-lft-identity34.8%
Applied egg-rr34.8%
associate-*l/34.8%
rem-square-sqrt99.9%
Simplified99.9%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 2.0000000000000002e252Initial program 99.6%
if 2.0000000000000002e252 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 73.1%
Taylor expanded in t around inf 73.3%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in a around 0 73.3%
associate-/l*85.6%
associate-*r/87.8%
fmm-undef87.8%
Simplified87.8%
Final simplification97.5%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= a 7.2e-31) (/ (fma x y (* z (- t))) a) (- (* (/ x (sqrt a)) (/ y (sqrt a))) (* t (/ z a)))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 7.2e-31) {
tmp = fma(x, y, (z * -t)) / a;
} else {
tmp = ((x / sqrt(a)) * (y / sqrt(a))) - (t * (z / a));
}
return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (a <= 7.2e-31) tmp = Float64(fma(x, y, Float64(z * Float64(-t))) / a); else tmp = Float64(Float64(Float64(x / sqrt(a)) * Float64(y / sqrt(a))) - Float64(t * Float64(z / a))); end return tmp end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[a, 7.2e-31], N[(N[(x * y + N[(z * (-t)), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(N[(x / N[Sqrt[a], $MachinePrecision]), $MachinePrecision] * N[(y / N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.2 \cdot 10^{-31}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(-t\right)\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\sqrt{a}} \cdot \frac{y}{\sqrt{a}} - t \cdot \frac{z}{a}\\
\end{array}
\end{array}
if a < 7.20000000000000007e-31Initial program 92.8%
div-sub91.7%
*-commutative91.7%
div-sub92.8%
*-commutative92.8%
fmm-def93.3%
distribute-rgt-neg-out93.3%
Simplified93.3%
if 7.20000000000000007e-31 < a Initial program 89.6%
div-sub89.6%
*-un-lft-identity89.6%
add-sqr-sqrt89.5%
times-frac89.5%
fmm-def89.5%
associate-/l*93.7%
Applied egg-rr93.7%
fmm-undef93.7%
associate-*l/93.7%
*-lft-identity93.7%
associate-/l*92.4%
associate-*l/95.1%
associate-*r/90.9%
*-commutative90.9%
associate-/l*89.5%
Simplified89.5%
Final simplification92.3%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* z t))))
(if (<= t_1 (- INFINITY))
(- (/ x (/ a y)) (* t (/ z a)))
(if (<= t_1 5e+268) (/ t_1 a) (* x (- (/ y a) (* t (/ z (* a x)))))))))assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x / (a / y)) - (t * (z / a));
} else if (t_1 <= 5e+268) {
tmp = t_1 / a;
} else {
tmp = x * ((y / a) - (t * (z / (a * x))));
}
return tmp;
}
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x / (a / y)) - (t * (z / a));
} else if (t_1 <= 5e+268) {
tmp = t_1 / a;
} else {
tmp = x * ((y / a) - (t * (z / (a * x))));
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = (x * y) - (z * t) tmp = 0 if t_1 <= -math.inf: tmp = (x / (a / y)) - (t * (z / a)) elif t_1 <= 5e+268: tmp = t_1 / a else: tmp = x * ((y / a) - (t * (z / (a * x)))) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x / Float64(a / y)) - Float64(t * Float64(z / a))); elseif (t_1 <= 5e+268) tmp = Float64(t_1 / a); else tmp = Float64(x * Float64(Float64(y / a) - Float64(t * Float64(z / Float64(a * x))))); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (x * y) - (z * t);
tmp = 0.0;
if (t_1 <= -Inf)
tmp = (x / (a / y)) - (t * (z / a));
elseif (t_1 <= 5e+268)
tmp = t_1 / a;
else
tmp = x * ((y / a) - (t * (z / (a * x))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+268], N[(t$95$1 / a), $MachinePrecision], N[(x * N[(N[(y / a), $MachinePrecision] - N[(t * N[(z / N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - t \cdot \frac{z}{a}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+268}:\\
\;\;\;\;\frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{a} - t \cdot \frac{z}{a \cdot x}\right)\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0Initial program 67.4%
div-sub67.4%
*-un-lft-identity67.4%
add-sqr-sqrt30.7%
times-frac30.7%
fmm-def30.7%
associate-/l*26.3%
Applied egg-rr26.3%
fmm-undef26.3%
associate-*l/26.3%
*-lft-identity26.3%
associate-/l*26.3%
associate-*l/30.4%
associate-*r/34.8%
*-commutative34.8%
associate-/l*34.8%
Simplified34.8%
*-commutative34.8%
clear-num34.8%
frac-times34.8%
*-un-lft-identity34.8%
Applied egg-rr34.8%
associate-*l/34.8%
rem-square-sqrt99.9%
Simplified99.9%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 5.0000000000000002e268Initial program 99.6%
if 5.0000000000000002e268 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 70.6%
div-sub70.6%
*-un-lft-identity70.6%
add-sqr-sqrt34.2%
times-frac34.2%
fmm-def34.2%
associate-/l*43.1%
Applied egg-rr43.1%
fmm-undef43.1%
associate-*l/43.1%
*-lft-identity43.1%
associate-/l*45.3%
associate-*l/47.5%
associate-*r/38.5%
*-commutative38.5%
associate-/l*47.5%
Simplified47.5%
Taylor expanded in x around inf 81.4%
+-commutative81.4%
mul-1-neg81.4%
unsub-neg81.4%
associate-/l*88.4%
Simplified88.4%
Final simplification97.8%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* z t))))
(if (<= t_1 (- INFINITY))
(- (/ x (/ a y)) (* t (/ z a)))
(if (<= t_1 5e+268) (/ t_1 a) (* x (- (/ y a) (* t (/ (/ z x) a))))))))assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x / (a / y)) - (t * (z / a));
} else if (t_1 <= 5e+268) {
tmp = t_1 / a;
} else {
tmp = x * ((y / a) - (t * ((z / x) / a)));
}
return tmp;
}
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x / (a / y)) - (t * (z / a));
} else if (t_1 <= 5e+268) {
tmp = t_1 / a;
} else {
tmp = x * ((y / a) - (t * ((z / x) / a)));
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = (x * y) - (z * t) tmp = 0 if t_1 <= -math.inf: tmp = (x / (a / y)) - (t * (z / a)) elif t_1 <= 5e+268: tmp = t_1 / a else: tmp = x * ((y / a) - (t * ((z / x) / a))) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x / Float64(a / y)) - Float64(t * Float64(z / a))); elseif (t_1 <= 5e+268) tmp = Float64(t_1 / a); else tmp = Float64(x * Float64(Float64(y / a) - Float64(t * Float64(Float64(z / x) / a)))); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (x * y) - (z * t);
tmp = 0.0;
if (t_1 <= -Inf)
tmp = (x / (a / y)) - (t * (z / a));
elseif (t_1 <= 5e+268)
tmp = t_1 / a;
else
tmp = x * ((y / a) - (t * ((z / x) / a)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+268], N[(t$95$1 / a), $MachinePrecision], N[(x * N[(N[(y / a), $MachinePrecision] - N[(t * N[(N[(z / x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - t \cdot \frac{z}{a}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+268}:\\
\;\;\;\;\frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{a} - t \cdot \frac{\frac{z}{x}}{a}\right)\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0Initial program 67.4%
div-sub67.4%
*-un-lft-identity67.4%
add-sqr-sqrt30.7%
times-frac30.7%
fmm-def30.7%
associate-/l*26.3%
Applied egg-rr26.3%
fmm-undef26.3%
associate-*l/26.3%
*-lft-identity26.3%
associate-/l*26.3%
associate-*l/30.4%
associate-*r/34.8%
*-commutative34.8%
associate-/l*34.8%
Simplified34.8%
*-commutative34.8%
clear-num34.8%
frac-times34.8%
*-un-lft-identity34.8%
Applied egg-rr34.8%
associate-*l/34.8%
rem-square-sqrt99.9%
Simplified99.9%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 5.0000000000000002e268Initial program 99.6%
if 5.0000000000000002e268 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 70.6%
Taylor expanded in x around inf 81.4%
+-commutative81.4%
mul-1-neg81.4%
unsub-neg81.4%
associate-/l*88.4%
*-commutative88.4%
associate-/r*95.3%
Simplified95.3%
Final simplification98.9%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* z t))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+259)))
(- (* x (/ y a)) (* z (/ t a)))
(/ t_1 a))))assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+259)) {
tmp = (x * (y / a)) - (z * (t / a));
} else {
tmp = t_1 / a;
}
return tmp;
}
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+259)) {
tmp = (x * (y / a)) - (z * (t / a));
} else {
tmp = t_1 / a;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = (x * y) - (z * t) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+259): tmp = (x * (y / a)) - (z * (t / a)) else: tmp = t_1 / a return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+259)) tmp = Float64(Float64(x * Float64(y / a)) - Float64(z * Float64(t / a))); else tmp = Float64(t_1 / a); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (x * y) - (z * t);
tmp = 0.0;
if ((t_1 <= -Inf) || ~((t_1 <= 5e+259)))
tmp = (x * (y / a)) - (z * (t / a));
else
tmp = t_1 / a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+259]], $MachinePrecision]], N[(N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision] - N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / a), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+259}\right):\\
\;\;\;\;x \cdot \frac{y}{a} - z \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0 or 5.00000000000000033e259 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 69.9%
div-sub69.9%
associate-/l*79.8%
associate-/l*93.8%
Applied egg-rr93.8%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 5.00000000000000033e259Initial program 99.6%
Final simplification98.1%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* z t))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+259)))
(- (/ x (/ a y)) (* t (/ z a)))
(/ t_1 a))))assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+259)) {
tmp = (x / (a / y)) - (t * (z / a));
} else {
tmp = t_1 / a;
}
return tmp;
}
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+259)) {
tmp = (x / (a / y)) - (t * (z / a));
} else {
tmp = t_1 / a;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = (x * y) - (z * t) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+259): tmp = (x / (a / y)) - (t * (z / a)) else: tmp = t_1 / a return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(z * t)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+259)) tmp = Float64(Float64(x / Float64(a / y)) - Float64(t * Float64(z / a))); else tmp = Float64(t_1 / a); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (x * y) - (z * t);
tmp = 0.0;
if ((t_1 <= -Inf) || ~((t_1 <= 5e+259)))
tmp = (x / (a / y)) - (t * (z / a));
else
tmp = t_1 / a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+259]], $MachinePrecision]], N[(N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / a), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+259}\right):\\
\;\;\;\;\frac{x}{\frac{a}{y}} - t \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{a}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 z t)) < -inf.0 or 5.00000000000000033e259 < (-.f64 (*.f64 x y) (*.f64 z t)) Initial program 69.9%
div-sub69.9%
*-un-lft-identity69.9%
add-sqr-sqrt32.4%
times-frac32.4%
fmm-def32.4%
associate-/l*36.6%
Applied egg-rr36.6%
fmm-undef36.6%
associate-*l/36.6%
*-lft-identity36.6%
associate-/l*38.0%
associate-*l/40.8%
associate-*r/36.6%
*-commutative36.6%
associate-/l*42.4%
Simplified42.4%
*-commutative42.4%
clear-num42.4%
frac-times40.9%
*-un-lft-identity40.9%
Applied egg-rr40.9%
associate-*l/40.9%
rem-square-sqrt95.4%
Simplified95.4%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 5.00000000000000033e259Initial program 99.6%
Final simplification98.5%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= (* z t) -2e+307) (* (- t) (/ z a)) (if (<= (* z t) 2e+258) (/ (- (* x y) (* z t)) a) (* z (/ (- t) a)))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z * t) <= -2e+307) {
tmp = -t * (z / a);
} else if ((z * t) <= 2e+258) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = z * (-t / a);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z * t) <= (-2d+307)) then
tmp = -t * (z / a)
else if ((z * t) <= 2d+258) then
tmp = ((x * y) - (z * t)) / a
else
tmp = z * (-t / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z * t) <= -2e+307) {
tmp = -t * (z / a);
} else if ((z * t) <= 2e+258) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = z * (-t / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (z * t) <= -2e+307: tmp = -t * (z / a) elif (z * t) <= 2e+258: tmp = ((x * y) - (z * t)) / a else: tmp = z * (-t / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(z * t) <= -2e+307) tmp = Float64(Float64(-t) * Float64(z / a)); elseif (Float64(z * t) <= 2e+258) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); else tmp = Float64(z * Float64(Float64(-t) / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((z * t) <= -2e+307)
tmp = -t * (z / a);
elseif ((z * t) <= 2e+258)
tmp = ((x * y) - (z * t)) / a;
else
tmp = z * (-t / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z * t), $MachinePrecision], -2e+307], N[((-t) * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 2e+258], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(z * N[((-t) / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+307}:\\
\;\;\;\;\left(-t\right) \cdot \frac{z}{a}\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+258}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{-t}{a}\\
\end{array}
\end{array}
if (*.f64 z t) < -1.99999999999999997e307Initial program 63.0%
Taylor expanded in x around 0 63.0%
mul-1-neg63.0%
associate-/l*94.4%
distribute-rgt-neg-in94.4%
distribute-neg-frac294.4%
Simplified94.4%
if -1.99999999999999997e307 < (*.f64 z t) < 2.00000000000000011e258Initial program 96.3%
if 2.00000000000000011e258 < (*.f64 z t) Initial program 64.4%
Taylor expanded in x around 0 70.7%
mul-1-neg70.7%
*-commutative70.7%
associate-*r/99.8%
distribute-rgt-neg-in99.8%
distribute-frac-neg99.8%
Simplified99.8%
Final simplification96.4%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= (* x y) -1e-70) (* y (/ x a)) (if (<= (* x y) 5e-36) (/ -1.0 (/ a (* z t))) (* x (/ y a)))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -1e-70) {
tmp = y * (x / a);
} else if ((x * y) <= 5e-36) {
tmp = -1.0 / (a / (z * t));
} else {
tmp = x * (y / a);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x * y) <= (-1d-70)) then
tmp = y * (x / a)
else if ((x * y) <= 5d-36) then
tmp = (-1.0d0) / (a / (z * t))
else
tmp = x * (y / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -1e-70) {
tmp = y * (x / a);
} else if ((x * y) <= 5e-36) {
tmp = -1.0 / (a / (z * t));
} else {
tmp = x * (y / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (x * y) <= -1e-70: tmp = y * (x / a) elif (x * y) <= 5e-36: tmp = -1.0 / (a / (z * t)) else: tmp = x * (y / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -1e-70) tmp = Float64(y * Float64(x / a)); elseif (Float64(x * y) <= 5e-36) tmp = Float64(-1.0 / Float64(a / Float64(z * t))); else tmp = Float64(x * Float64(y / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((x * y) <= -1e-70)
tmp = y * (x / a);
elseif ((x * y) <= 5e-36)
tmp = -1.0 / (a / (z * t));
else
tmp = x * (y / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -1e-70], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e-36], N[(-1.0 / N[(a / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{-70}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-36}:\\
\;\;\;\;\frac{-1}{\frac{a}{z \cdot t}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -9.99999999999999996e-71Initial program 92.1%
Taylor expanded in y around inf 85.4%
+-commutative85.4%
mul-1-neg85.4%
unsub-neg85.4%
associate-/l*86.5%
Simplified86.5%
Taylor expanded in x around inf 77.8%
if -9.99999999999999996e-71 < (*.f64 x y) < 5.00000000000000004e-36Initial program 95.8%
Taylor expanded in x around 0 84.0%
mul-1-neg84.0%
associate-/l*75.6%
distribute-rgt-neg-in75.6%
distribute-neg-frac275.6%
Simplified75.6%
associate-*r/84.0%
distribute-frac-neg284.0%
clear-num84.0%
distribute-neg-frac84.0%
metadata-eval84.0%
Applied egg-rr84.0%
if 5.00000000000000004e-36 < (*.f64 x y) Initial program 86.2%
Taylor expanded in x around inf 71.1%
associate-*r/76.4%
Simplified76.4%
Final simplification79.9%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= (* x y) -1e-70) (* y (/ x a)) (if (<= (* x y) 5e-36) (* (- t) (/ z a)) (* x (/ y a)))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -1e-70) {
tmp = y * (x / a);
} else if ((x * y) <= 5e-36) {
tmp = -t * (z / a);
} else {
tmp = x * (y / a);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x * y) <= (-1d-70)) then
tmp = y * (x / a)
else if ((x * y) <= 5d-36) then
tmp = -t * (z / a)
else
tmp = x * (y / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -1e-70) {
tmp = y * (x / a);
} else if ((x * y) <= 5e-36) {
tmp = -t * (z / a);
} else {
tmp = x * (y / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (x * y) <= -1e-70: tmp = y * (x / a) elif (x * y) <= 5e-36: tmp = -t * (z / a) else: tmp = x * (y / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -1e-70) tmp = Float64(y * Float64(x / a)); elseif (Float64(x * y) <= 5e-36) tmp = Float64(Float64(-t) * Float64(z / a)); else tmp = Float64(x * Float64(y / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((x * y) <= -1e-70)
tmp = y * (x / a);
elseif ((x * y) <= 5e-36)
tmp = -t * (z / a);
else
tmp = x * (y / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -1e-70], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e-36], N[((-t) * N[(z / a), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{-70}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-36}:\\
\;\;\;\;\left(-t\right) \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -9.99999999999999996e-71Initial program 92.1%
Taylor expanded in y around inf 85.4%
+-commutative85.4%
mul-1-neg85.4%
unsub-neg85.4%
associate-/l*86.5%
Simplified86.5%
Taylor expanded in x around inf 77.8%
if -9.99999999999999996e-71 < (*.f64 x y) < 5.00000000000000004e-36Initial program 95.8%
Taylor expanded in x around 0 84.0%
mul-1-neg84.0%
associate-/l*75.6%
distribute-rgt-neg-in75.6%
distribute-neg-frac275.6%
Simplified75.6%
if 5.00000000000000004e-36 < (*.f64 x y) Initial program 86.2%
Taylor expanded in x around inf 71.1%
associate-*r/76.4%
Simplified76.4%
Final simplification76.6%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= (* x y) -1e-70) (* y (/ x a)) (if (<= (* x y) 5e-36) (/ (* z (- t)) a) (* x (/ y a)))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -1e-70) {
tmp = y * (x / a);
} else if ((x * y) <= 5e-36) {
tmp = (z * -t) / a;
} else {
tmp = x * (y / a);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x * y) <= (-1d-70)) then
tmp = y * (x / a)
else if ((x * y) <= 5d-36) then
tmp = (z * -t) / a
else
tmp = x * (y / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -1e-70) {
tmp = y * (x / a);
} else if ((x * y) <= 5e-36) {
tmp = (z * -t) / a;
} else {
tmp = x * (y / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (x * y) <= -1e-70: tmp = y * (x / a) elif (x * y) <= 5e-36: tmp = (z * -t) / a else: tmp = x * (y / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -1e-70) tmp = Float64(y * Float64(x / a)); elseif (Float64(x * y) <= 5e-36) tmp = Float64(Float64(z * Float64(-t)) / a); else tmp = Float64(x * Float64(y / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((x * y) <= -1e-70)
tmp = y * (x / a);
elseif ((x * y) <= 5e-36)
tmp = (z * -t) / a;
else
tmp = x * (y / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -1e-70], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e-36], N[(N[(z * (-t)), $MachinePrecision] / a), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{-70}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-36}:\\
\;\;\;\;\frac{z \cdot \left(-t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -9.99999999999999996e-71Initial program 92.1%
Taylor expanded in y around inf 85.4%
+-commutative85.4%
mul-1-neg85.4%
unsub-neg85.4%
associate-/l*86.5%
Simplified86.5%
Taylor expanded in x around inf 77.8%
if -9.99999999999999996e-71 < (*.f64 x y) < 5.00000000000000004e-36Initial program 95.8%
Taylor expanded in x around 0 84.0%
associate-*r*84.0%
mul-1-neg84.0%
Simplified84.0%
if 5.00000000000000004e-36 < (*.f64 x y) Initial program 86.2%
Taylor expanded in x around inf 71.1%
associate-*r/76.4%
Simplified76.4%
Final simplification79.8%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= a 2.7e-169) (* y (/ x a)) (* x (/ y a))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 2.7e-169) {
tmp = y * (x / a);
} else {
tmp = x * (y / a);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= 2.7d-169) then
tmp = y * (x / a)
else
tmp = x * (y / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 2.7e-169) {
tmp = y * (x / a);
} else {
tmp = x * (y / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if a <= 2.7e-169: tmp = y * (x / a) else: tmp = x * (y / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (a <= 2.7e-169) tmp = Float64(y * Float64(x / a)); else tmp = Float64(x * Float64(y / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (a <= 2.7e-169)
tmp = y * (x / a);
else
tmp = x * (y / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[a, 2.7e-169], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.7 \cdot 10^{-169}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < 2.7000000000000002e-169Initial program 92.3%
Taylor expanded in y around inf 77.6%
+-commutative77.6%
mul-1-neg77.6%
unsub-neg77.6%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in x around inf 54.0%
if 2.7000000000000002e-169 < a Initial program 91.2%
Taylor expanded in x around inf 54.9%
associate-*r/53.0%
Simplified53.0%
Final simplification53.6%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= a 3.6e-169) (/ y (/ a x)) (* x (/ y a))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 3.6e-169) {
tmp = y / (a / x);
} else {
tmp = x * (y / a);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= 3.6d-169) then
tmp = y / (a / x)
else
tmp = x * (y / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 3.6e-169) {
tmp = y / (a / x);
} else {
tmp = x * (y / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if a <= 3.6e-169: tmp = y / (a / x) else: tmp = x * (y / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (a <= 3.6e-169) tmp = Float64(y / Float64(a / x)); else tmp = Float64(x * Float64(y / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (a <= 3.6e-169)
tmp = y / (a / x);
else
tmp = x * (y / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[a, 3.6e-169], N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.6 \cdot 10^{-169}:\\
\;\;\;\;\frac{y}{\frac{a}{x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < 3.60000000000000001e-169Initial program 92.3%
Taylor expanded in y around inf 77.6%
+-commutative77.6%
mul-1-neg77.6%
unsub-neg77.6%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in x around inf 54.0%
clear-num53.8%
un-div-inv53.3%
Applied egg-rr53.3%
if 3.60000000000000001e-169 < a Initial program 91.2%
Taylor expanded in x around inf 54.9%
associate-*r/53.0%
Simplified53.0%
Final simplification53.2%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (* x (/ y a)))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
return x * (y / a);
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x * (y / a)
end function
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
return x * (y / a);
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): return x * (y / a)
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) return Float64(x * Float64(y / a)) end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp = code(x, y, z, t, a)
tmp = x * (y / a);
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
x \cdot \frac{y}{a}
\end{array}
Initial program 92.0%
Taylor expanded in x around inf 54.4%
associate-*r/54.1%
Simplified54.1%
Final simplification54.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* (/ y a) x) (* (/ t a) z))))
(if (< z -2.468684968699548e+170)
t_1
(if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y / a) * x) - ((t / a) * z);
double tmp;
if (z < -2.468684968699548e+170) {
tmp = t_1;
} else if (z < 6.309831121978371e-71) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((y / a) * x) - ((t / a) * z)
if (z < (-2.468684968699548d+170)) then
tmp = t_1
else if (z < 6.309831121978371d-71) then
tmp = ((x * y) - (z * t)) / a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((y / a) * x) - ((t / a) * z);
double tmp;
if (z < -2.468684968699548e+170) {
tmp = t_1;
} else if (z < 6.309831121978371e-71) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y / a) * x) - ((t / a) * z) tmp = 0 if z < -2.468684968699548e+170: tmp = t_1 elif z < 6.309831121978371e-71: tmp = ((x * y) - (z * t)) / a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y / a) * x) - Float64(Float64(t / a) * z)) tmp = 0.0 if (z < -2.468684968699548e+170) tmp = t_1; elseif (z < 6.309831121978371e-71) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y / a) * x) - ((t / a) * z); tmp = 0.0; if (z < -2.468684968699548e+170) tmp = t_1; elseif (z < 6.309831121978371e-71) tmp = ((x * y) - (z * t)) / a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y / a), $MachinePrecision] * x), $MachinePrecision] - N[(N[(t / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -2.468684968699548e+170], t$95$1, If[Less[z, 6.309831121978371e-71], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot x - \frac{t}{a} \cdot z\\
\mathbf{if}\;z < -2.468684968699548 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 6.309831121978371 \cdot 10^{-71}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024130
(FPCore (x y z t a)
:name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
:precision binary64
:alt
(if (< z -2.468684968699548e+170) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z))))
(/ (- (* x y) (* z t)) a))