
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2e-35) (not (<= z 5.7e-30))) (/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c) (/ (+ b (fma x (* 9.0 y) (* t (* a (* z -4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2e-35) || !(z <= 5.7e-30)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + fma(x, (9.0 * y), (t * (a * (z * -4.0))))) / (z * c);
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2e-35) || !(z <= 5.7e-30)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c); else tmp = Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c)); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2e-35], N[Not[LessEqual[z, 5.7e-30]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-35} \lor \neg \left(z \leq 5.7 \cdot 10^{-30}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.00000000000000002e-35 or 5.69999999999999977e-30 < z Initial program 68.2%
+-commutative68.2%
associate-+r-68.2%
*-commutative68.2%
associate-*r*71.8%
*-commutative71.8%
associate-+r-71.8%
+-commutative71.8%
associate-*l*71.8%
associate-*l*73.9%
*-commutative73.9%
Simplified73.9%
Taylor expanded in t around inf 68.2%
Taylor expanded in t around 0 87.8%
+-commutative87.8%
associate-/r*84.4%
associate-*r/82.3%
*-commutative82.3%
associate-*r/77.6%
metadata-eval77.6%
distribute-lft-neg-in77.6%
associate-+l+77.6%
*-commutative77.6%
associate-*l/77.6%
associate-/l*77.6%
unsub-neg77.6%
associate-/r*81.7%
associate-*r*81.7%
associate-*r/86.4%
associate-*r*86.4%
Simplified87.2%
Taylor expanded in c around 0 95.6%
if -2.00000000000000002e-35 < z < 5.69999999999999977e-30Initial program 94.0%
Simplified93.2%
Final simplification94.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* y (* 9.0 x))) (t_2 (/ (+ b (* 9.0 (* x y))) (* z c))))
(if (<= t_1 -2e+148)
t_2
(if (<= t_1 1e+32)
(/ (- (/ b z) (* (* a t) 4.0)) c)
(if (<= t_1 1e+140)
t_2
(if (<= t_1 5e+208)
(- (/ b (* z c)) (* 4.0 (* a (/ t c))))
(* 9.0 (* x (/ y (* z c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double t_2 = (b + (9.0 * (x * y))) / (z * c);
double tmp;
if (t_1 <= -2e+148) {
tmp = t_2;
} else if (t_1 <= 1e+32) {
tmp = ((b / z) - ((a * t) * 4.0)) / c;
} else if (t_1 <= 1e+140) {
tmp = t_2;
} else if (t_1 <= 5e+208) {
tmp = (b / (z * c)) - (4.0 * (a * (t / c)));
} else {
tmp = 9.0 * (x * (y / (z * c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (9.0d0 * x)
t_2 = (b + (9.0d0 * (x * y))) / (z * c)
if (t_1 <= (-2d+148)) then
tmp = t_2
else if (t_1 <= 1d+32) then
tmp = ((b / z) - ((a * t) * 4.0d0)) / c
else if (t_1 <= 1d+140) then
tmp = t_2
else if (t_1 <= 5d+208) then
tmp = (b / (z * c)) - (4.0d0 * (a * (t / c)))
else
tmp = 9.0d0 * (x * (y / (z * c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double t_2 = (b + (9.0 * (x * y))) / (z * c);
double tmp;
if (t_1 <= -2e+148) {
tmp = t_2;
} else if (t_1 <= 1e+32) {
tmp = ((b / z) - ((a * t) * 4.0)) / c;
} else if (t_1 <= 1e+140) {
tmp = t_2;
} else if (t_1 <= 5e+208) {
tmp = (b / (z * c)) - (4.0 * (a * (t / c)));
} else {
tmp = 9.0 * (x * (y / (z * c)));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = y * (9.0 * x) t_2 = (b + (9.0 * (x * y))) / (z * c) tmp = 0 if t_1 <= -2e+148: tmp = t_2 elif t_1 <= 1e+32: tmp = ((b / z) - ((a * t) * 4.0)) / c elif t_1 <= 1e+140: tmp = t_2 elif t_1 <= 5e+208: tmp = (b / (z * c)) - (4.0 * (a * (t / c))) else: tmp = 9.0 * (x * (y / (z * c))) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(y * Float64(9.0 * x)) t_2 = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)) tmp = 0.0 if (t_1 <= -2e+148) tmp = t_2; elseif (t_1 <= 1e+32) tmp = Float64(Float64(Float64(b / z) - Float64(Float64(a * t) * 4.0)) / c); elseif (t_1 <= 1e+140) tmp = t_2; elseif (t_1 <= 5e+208) tmp = Float64(Float64(b / Float64(z * c)) - Float64(4.0 * Float64(a * Float64(t / c)))); else tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = y * (9.0 * x);
t_2 = (b + (9.0 * (x * y))) / (z * c);
tmp = 0.0;
if (t_1 <= -2e+148)
tmp = t_2;
elseif (t_1 <= 1e+32)
tmp = ((b / z) - ((a * t) * 4.0)) / c;
elseif (t_1 <= 1e+140)
tmp = t_2;
elseif (t_1 <= 5e+208)
tmp = (b / (z * c)) - (4.0 * (a * (t / c)));
else
tmp = 9.0 * (x * (y / (z * c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+148], t$95$2, If[LessEqual[t$95$1, 1e+32], N[(N[(N[(b / z), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 1e+140], t$95$2, If[LessEqual[t$95$1, 5e+208], N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(9 \cdot x\right)\\
t_2 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+148}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+32}:\\
\;\;\;\;\frac{\frac{b}{z} - \left(a \cdot t\right) \cdot 4}{c}\\
\mathbf{elif}\;t\_1 \leq 10^{+140}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+208}:\\
\;\;\;\;\frac{b}{z \cdot c} - 4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.0000000000000001e148 or 1.00000000000000005e32 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000006e140Initial program 86.8%
+-commutative86.8%
associate-+r-86.8%
*-commutative86.8%
associate-*r*88.5%
*-commutative88.5%
associate-+r-88.5%
+-commutative88.5%
associate-*l*88.4%
associate-*l*86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in x around inf 80.4%
if -2.0000000000000001e148 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000005e32Initial program 77.4%
+-commutative77.4%
associate-+r-77.4%
*-commutative77.4%
associate-*r*78.6%
*-commutative78.6%
associate-+r-78.6%
+-commutative78.6%
associate-*l*78.0%
associate-*l*80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in x around inf 65.2%
Taylor expanded in x around 0 86.4%
Taylor expanded in c around 0 89.0%
if 1.00000000000000006e140 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.0000000000000004e208Initial program 77.1%
+-commutative77.1%
associate-+r-77.1%
*-commutative77.1%
associate-*r*88.7%
*-commutative88.7%
associate-+r-88.7%
+-commutative88.7%
associate-*l*88.7%
associate-*l*83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in x around inf 59.5%
Taylor expanded in x around 0 57.5%
associate-/l*68.5%
Applied egg-rr68.5%
if 5.0000000000000004e208 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 82.5%
+-commutative82.5%
associate-+r-82.5%
*-commutative82.5%
associate-*r*79.2%
*-commutative79.2%
associate-+r-79.2%
+-commutative79.2%
associate-*l*79.2%
associate-*l*79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in x around inf 83.1%
associate-/l*93.1%
associate-/r*93.0%
Simplified93.0%
Taylor expanded in y around 0 93.1%
Final simplification86.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a t) 4.0))
(t_2 (* y (* 9.0 x)))
(t_3 (/ (- (* 9.0 (/ (* x y) z)) t_1) c)))
(if (<= t_2 -2e-30)
t_3
(if (<= t_2 5e+104)
(/ (- (/ b z) t_1) c)
(if (<= t_2 5e+203) t_3 (* 9.0 (* x (/ y (* z c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * t) * 4.0;
double t_2 = y * (9.0 * x);
double t_3 = ((9.0 * ((x * y) / z)) - t_1) / c;
double tmp;
if (t_2 <= -2e-30) {
tmp = t_3;
} else if (t_2 <= 5e+104) {
tmp = ((b / z) - t_1) / c;
} else if (t_2 <= 5e+203) {
tmp = t_3;
} else {
tmp = 9.0 * (x * (y / (z * c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (a * t) * 4.0d0
t_2 = y * (9.0d0 * x)
t_3 = ((9.0d0 * ((x * y) / z)) - t_1) / c
if (t_2 <= (-2d-30)) then
tmp = t_3
else if (t_2 <= 5d+104) then
tmp = ((b / z) - t_1) / c
else if (t_2 <= 5d+203) then
tmp = t_3
else
tmp = 9.0d0 * (x * (y / (z * c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * t) * 4.0;
double t_2 = y * (9.0 * x);
double t_3 = ((9.0 * ((x * y) / z)) - t_1) / c;
double tmp;
if (t_2 <= -2e-30) {
tmp = t_3;
} else if (t_2 <= 5e+104) {
tmp = ((b / z) - t_1) / c;
} else if (t_2 <= 5e+203) {
tmp = t_3;
} else {
tmp = 9.0 * (x * (y / (z * c)));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (a * t) * 4.0 t_2 = y * (9.0 * x) t_3 = ((9.0 * ((x * y) / z)) - t_1) / c tmp = 0 if t_2 <= -2e-30: tmp = t_3 elif t_2 <= 5e+104: tmp = ((b / z) - t_1) / c elif t_2 <= 5e+203: tmp = t_3 else: tmp = 9.0 * (x * (y / (z * c))) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * t) * 4.0) t_2 = Float64(y * Float64(9.0 * x)) t_3 = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) - t_1) / c) tmp = 0.0 if (t_2 <= -2e-30) tmp = t_3; elseif (t_2 <= 5e+104) tmp = Float64(Float64(Float64(b / z) - t_1) / c); elseif (t_2 <= 5e+203) tmp = t_3; else tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (a * t) * 4.0;
t_2 = y * (9.0 * x);
t_3 = ((9.0 * ((x * y) / z)) - t_1) / c;
tmp = 0.0;
if (t_2 <= -2e-30)
tmp = t_3;
elseif (t_2 <= 5e+104)
tmp = ((b / z) - t_1) / c;
elseif (t_2 <= 5e+203)
tmp = t_3;
else
tmp = 9.0 * (x * (y / (z * c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * t), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-30], t$95$3, If[LessEqual[t$95$2, 5e+104], N[(N[(N[(b / z), $MachinePrecision] - t$95$1), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$2, 5e+203], t$95$3, N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \left(a \cdot t\right) \cdot 4\\
t_2 := y \cdot \left(9 \cdot x\right)\\
t_3 := \frac{9 \cdot \frac{x \cdot y}{z} - t\_1}{c}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-30}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+104}:\\
\;\;\;\;\frac{\frac{b}{z} - t\_1}{c}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+203}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2e-30 or 4.9999999999999997e104 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.99999999999999994e203Initial program 80.2%
+-commutative80.2%
associate-+r-80.2%
*-commutative80.2%
associate-*r*82.4%
*-commutative82.4%
associate-+r-82.4%
+-commutative82.4%
associate-*l*81.3%
associate-*l*81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in z around inf 79.5%
Taylor expanded in b around 0 81.0%
if -2e-30 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.9999999999999997e104Initial program 79.2%
+-commutative79.2%
associate-+r-79.2%
*-commutative79.2%
associate-*r*81.4%
*-commutative81.4%
associate-+r-81.4%
+-commutative81.4%
associate-*l*81.4%
associate-*l*82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in x around inf 62.3%
Taylor expanded in x around 0 86.6%
Taylor expanded in c around 0 89.6%
if 4.99999999999999994e203 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 83.7%
+-commutative83.7%
associate-+r-83.7%
*-commutative83.7%
associate-*r*80.6%
*-commutative80.6%
associate-+r-80.6%
+-commutative80.6%
associate-*l*80.5%
associate-*l*80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in x around inf 77.8%
associate-/l*87.1%
associate-/r*87.1%
Simplified87.1%
Taylor expanded in y around 0 87.1%
Final simplification86.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 9.0 (* x (/ y (* z c))))) (t_2 (/ b (* z c))))
(if (<= z -1.25e+23)
(* -4.0 (* t (/ a c)))
(if (<= z -1.15e-188)
t_1
(if (<= z -3.1e-255)
t_2
(if (<= z 8.5e-254)
t_1
(if (<= z 3e-119)
t_2
(if (<= z 8.4e-16) t_1 (* a (/ (* -4.0 t) c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * (y / (z * c)));
double t_2 = b / (z * c);
double tmp;
if (z <= -1.25e+23) {
tmp = -4.0 * (t * (a / c));
} else if (z <= -1.15e-188) {
tmp = t_1;
} else if (z <= -3.1e-255) {
tmp = t_2;
} else if (z <= 8.5e-254) {
tmp = t_1;
} else if (z <= 3e-119) {
tmp = t_2;
} else if (z <= 8.4e-16) {
tmp = t_1;
} else {
tmp = a * ((-4.0 * t) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 9.0d0 * (x * (y / (z * c)))
t_2 = b / (z * c)
if (z <= (-1.25d+23)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= (-1.15d-188)) then
tmp = t_1
else if (z <= (-3.1d-255)) then
tmp = t_2
else if (z <= 8.5d-254) then
tmp = t_1
else if (z <= 3d-119) then
tmp = t_2
else if (z <= 8.4d-16) then
tmp = t_1
else
tmp = a * (((-4.0d0) * t) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * (y / (z * c)));
double t_2 = b / (z * c);
double tmp;
if (z <= -1.25e+23) {
tmp = -4.0 * (t * (a / c));
} else if (z <= -1.15e-188) {
tmp = t_1;
} else if (z <= -3.1e-255) {
tmp = t_2;
} else if (z <= 8.5e-254) {
tmp = t_1;
} else if (z <= 3e-119) {
tmp = t_2;
} else if (z <= 8.4e-16) {
tmp = t_1;
} else {
tmp = a * ((-4.0 * t) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * (x * (y / (z * c))) t_2 = b / (z * c) tmp = 0 if z <= -1.25e+23: tmp = -4.0 * (t * (a / c)) elif z <= -1.15e-188: tmp = t_1 elif z <= -3.1e-255: tmp = t_2 elif z <= 8.5e-254: tmp = t_1 elif z <= 3e-119: tmp = t_2 elif z <= 8.4e-16: tmp = t_1 else: tmp = a * ((-4.0 * t) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))) t_2 = Float64(b / Float64(z * c)) tmp = 0.0 if (z <= -1.25e+23) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= -1.15e-188) tmp = t_1; elseif (z <= -3.1e-255) tmp = t_2; elseif (z <= 8.5e-254) tmp = t_1; elseif (z <= 3e-119) tmp = t_2; elseif (z <= 8.4e-16) tmp = t_1; else tmp = Float64(a * Float64(Float64(-4.0 * t) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (x * (y / (z * c)));
t_2 = b / (z * c);
tmp = 0.0;
if (z <= -1.25e+23)
tmp = -4.0 * (t * (a / c));
elseif (z <= -1.15e-188)
tmp = t_1;
elseif (z <= -3.1e-255)
tmp = t_2;
elseif (z <= 8.5e-254)
tmp = t_1;
elseif (z <= 3e-119)
tmp = t_2;
elseif (z <= 8.4e-16)
tmp = t_1;
else
tmp = a * ((-4.0 * t) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e+23], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.15e-188], t$95$1, If[LessEqual[z, -3.1e-255], t$95$2, If[LessEqual[z, 8.5e-254], t$95$1, If[LessEqual[z, 3e-119], t$95$2, If[LessEqual[z, 8.4e-16], t$95$1, N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
t_2 := \frac{b}{z \cdot c}\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+23}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-255}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-254}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-119}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 8.4 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\end{array}
\end{array}
if z < -1.25e23Initial program 71.9%
+-commutative71.9%
associate-+r-71.9%
*-commutative71.9%
associate-*r*73.3%
*-commutative73.3%
associate-+r-73.3%
+-commutative73.3%
associate-*l*73.3%
associate-*l*76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in t around inf 71.8%
Taylor expanded in t around 0 88.8%
+-commutative88.8%
associate-/r*86.0%
associate-*r/81.5%
*-commutative81.5%
associate-*r/76.7%
metadata-eval76.7%
distribute-lft-neg-in76.7%
associate-+l+76.7%
*-commutative76.7%
associate-*l/76.7%
associate-/l*76.7%
unsub-neg76.7%
associate-/r*81.3%
associate-*r*81.3%
associate-*r/86.1%
associate-*r*86.1%
Simplified86.1%
Taylor expanded in z around inf 59.8%
*-commutative59.8%
associate-/l*59.6%
Simplified59.6%
if -1.25e23 < z < -1.15e-188 or -3.09999999999999997e-255 < z < 8.49999999999999963e-254 or 3.0000000000000002e-119 < z < 8.4000000000000004e-16Initial program 91.9%
+-commutative91.9%
associate-+r-91.9%
*-commutative91.9%
associate-*r*92.0%
*-commutative92.0%
associate-+r-92.0%
+-commutative92.0%
associate-*l*92.0%
associate-*l*89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in x around inf 57.9%
associate-/l*60.1%
associate-/r*59.0%
Simplified59.0%
Taylor expanded in y around 0 60.1%
if -1.15e-188 < z < -3.09999999999999997e-255 or 8.49999999999999963e-254 < z < 3.0000000000000002e-119Initial program 97.6%
+-commutative97.6%
associate-+r-97.6%
*-commutative97.6%
associate-*r*95.4%
*-commutative95.4%
associate-+r-95.4%
+-commutative95.4%
associate-*l*93.1%
associate-*l*93.2%
*-commutative93.2%
Simplified93.2%
Taylor expanded in b around inf 79.7%
*-commutative79.7%
Simplified79.7%
if 8.4000000000000004e-16 < z Initial program 59.7%
+-commutative59.7%
associate-+r-59.7%
*-commutative59.7%
associate-*r*66.1%
*-commutative66.1%
associate-+r-66.1%
+-commutative66.1%
associate-*l*66.0%
associate-*l*67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in z around inf 67.8%
*-commutative67.8%
associate-/l*64.9%
associate-*r*64.9%
associate-*l/64.9%
Simplified64.9%
Final simplification64.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 9.0 (* x (/ y (* z c))))) (t_2 (/ b (* z c))))
(if (<= z -1.2e+23)
(* -4.0 (* t (/ a c)))
(if (<= z -3.2e-183)
t_1
(if (<= z -3.7e-253)
t_2
(if (<= z 3.3e-252)
(* 9.0 (* x (/ (/ y c) z)))
(if (<= z 3.3e-119)
t_2
(if (<= z 8.5e-16) t_1 (* a (/ (* -4.0 t) c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * (y / (z * c)));
double t_2 = b / (z * c);
double tmp;
if (z <= -1.2e+23) {
tmp = -4.0 * (t * (a / c));
} else if (z <= -3.2e-183) {
tmp = t_1;
} else if (z <= -3.7e-253) {
tmp = t_2;
} else if (z <= 3.3e-252) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (z <= 3.3e-119) {
tmp = t_2;
} else if (z <= 8.5e-16) {
tmp = t_1;
} else {
tmp = a * ((-4.0 * t) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 9.0d0 * (x * (y / (z * c)))
t_2 = b / (z * c)
if (z <= (-1.2d+23)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= (-3.2d-183)) then
tmp = t_1
else if (z <= (-3.7d-253)) then
tmp = t_2
else if (z <= 3.3d-252) then
tmp = 9.0d0 * (x * ((y / c) / z))
else if (z <= 3.3d-119) then
tmp = t_2
else if (z <= 8.5d-16) then
tmp = t_1
else
tmp = a * (((-4.0d0) * t) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * (y / (z * c)));
double t_2 = b / (z * c);
double tmp;
if (z <= -1.2e+23) {
tmp = -4.0 * (t * (a / c));
} else if (z <= -3.2e-183) {
tmp = t_1;
} else if (z <= -3.7e-253) {
tmp = t_2;
} else if (z <= 3.3e-252) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (z <= 3.3e-119) {
tmp = t_2;
} else if (z <= 8.5e-16) {
tmp = t_1;
} else {
tmp = a * ((-4.0 * t) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * (x * (y / (z * c))) t_2 = b / (z * c) tmp = 0 if z <= -1.2e+23: tmp = -4.0 * (t * (a / c)) elif z <= -3.2e-183: tmp = t_1 elif z <= -3.7e-253: tmp = t_2 elif z <= 3.3e-252: tmp = 9.0 * (x * ((y / c) / z)) elif z <= 3.3e-119: tmp = t_2 elif z <= 8.5e-16: tmp = t_1 else: tmp = a * ((-4.0 * t) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))) t_2 = Float64(b / Float64(z * c)) tmp = 0.0 if (z <= -1.2e+23) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= -3.2e-183) tmp = t_1; elseif (z <= -3.7e-253) tmp = t_2; elseif (z <= 3.3e-252) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); elseif (z <= 3.3e-119) tmp = t_2; elseif (z <= 8.5e-16) tmp = t_1; else tmp = Float64(a * Float64(Float64(-4.0 * t) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (x * (y / (z * c)));
t_2 = b / (z * c);
tmp = 0.0;
if (z <= -1.2e+23)
tmp = -4.0 * (t * (a / c));
elseif (z <= -3.2e-183)
tmp = t_1;
elseif (z <= -3.7e-253)
tmp = t_2;
elseif (z <= 3.3e-252)
tmp = 9.0 * (x * ((y / c) / z));
elseif (z <= 3.3e-119)
tmp = t_2;
elseif (z <= 8.5e-16)
tmp = t_1;
else
tmp = a * ((-4.0 * t) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+23], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.2e-183], t$95$1, If[LessEqual[z, -3.7e-253], t$95$2, If[LessEqual[z, 3.3e-252], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e-119], t$95$2, If[LessEqual[z, 8.5e-16], t$95$1, N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
t_2 := \frac{b}{z \cdot c}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+23}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-183}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-253}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-252}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-119}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\end{array}
\end{array}
if z < -1.2e23Initial program 71.9%
+-commutative71.9%
associate-+r-71.9%
*-commutative71.9%
associate-*r*73.3%
*-commutative73.3%
associate-+r-73.3%
+-commutative73.3%
associate-*l*73.3%
associate-*l*76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in t around inf 71.8%
Taylor expanded in t around 0 88.8%
+-commutative88.8%
associate-/r*86.0%
associate-*r/81.5%
*-commutative81.5%
associate-*r/76.7%
metadata-eval76.7%
distribute-lft-neg-in76.7%
associate-+l+76.7%
*-commutative76.7%
associate-*l/76.7%
associate-/l*76.7%
unsub-neg76.7%
associate-/r*81.3%
associate-*r*81.3%
associate-*r/86.1%
associate-*r*86.1%
Simplified86.1%
Taylor expanded in z around inf 59.8%
*-commutative59.8%
associate-/l*59.6%
Simplified59.6%
if -1.2e23 < z < -3.2000000000000002e-183 or 3.30000000000000008e-119 < z < 8.5000000000000001e-16Initial program 89.3%
+-commutative89.3%
associate-+r-89.3%
*-commutative89.3%
associate-*r*89.3%
*-commutative89.3%
associate-+r-89.3%
+-commutative89.3%
associate-*l*89.3%
associate-*l*86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in x around inf 49.5%
associate-/l*52.5%
associate-/r*51.0%
Simplified51.0%
Taylor expanded in y around 0 52.5%
if -3.2000000000000002e-183 < z < -3.69999999999999975e-253 or 3.30000000000000009e-252 < z < 3.30000000000000008e-119Initial program 97.6%
+-commutative97.6%
associate-+r-97.6%
*-commutative97.6%
associate-*r*95.4%
*-commutative95.4%
associate-+r-95.4%
+-commutative95.4%
associate-*l*93.1%
associate-*l*93.2%
*-commutative93.2%
Simplified93.2%
Taylor expanded in b around inf 79.7%
*-commutative79.7%
Simplified79.7%
if -3.69999999999999975e-253 < z < 3.30000000000000009e-252Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-*l*99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 82.5%
associate-/l*82.5%
associate-/r*82.5%
Simplified82.5%
if 8.5000000000000001e-16 < z Initial program 59.7%
+-commutative59.7%
associate-+r-59.7%
*-commutative59.7%
associate-*r*66.1%
*-commutative66.1%
associate-+r-66.1%
+-commutative66.1%
associate-*l*66.0%
associate-*l*67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in z around inf 67.8%
*-commutative67.8%
associate-/l*64.9%
associate-*r*64.9%
associate-*l/64.9%
Simplified64.9%
Final simplification64.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 9.0 (* y (/ x (* z c))))))
(if (<= z -1.4e+23)
(* -4.0 (* t (/ a c)))
(if (<= z 1.05e-253)
t_1
(if (<= z 3.3e-119)
(/ b (* z c))
(if (<= z 4.1e-16)
t_1
(if (<= z 9.7e+79)
(* a (/ (* -4.0 t) c))
(if (<= z 1.35e+109)
(* 9.0 (* x (/ y (* z c))))
(/ -4.0 (/ c (* a t)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (y * (x / (z * c)));
double tmp;
if (z <= -1.4e+23) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 1.05e-253) {
tmp = t_1;
} else if (z <= 3.3e-119) {
tmp = b / (z * c);
} else if (z <= 4.1e-16) {
tmp = t_1;
} else if (z <= 9.7e+79) {
tmp = a * ((-4.0 * t) / c);
} else if (z <= 1.35e+109) {
tmp = 9.0 * (x * (y / (z * c)));
} else {
tmp = -4.0 / (c / (a * t));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 9.0d0 * (y * (x / (z * c)))
if (z <= (-1.4d+23)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 1.05d-253) then
tmp = t_1
else if (z <= 3.3d-119) then
tmp = b / (z * c)
else if (z <= 4.1d-16) then
tmp = t_1
else if (z <= 9.7d+79) then
tmp = a * (((-4.0d0) * t) / c)
else if (z <= 1.35d+109) then
tmp = 9.0d0 * (x * (y / (z * c)))
else
tmp = (-4.0d0) / (c / (a * t))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (y * (x / (z * c)));
double tmp;
if (z <= -1.4e+23) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 1.05e-253) {
tmp = t_1;
} else if (z <= 3.3e-119) {
tmp = b / (z * c);
} else if (z <= 4.1e-16) {
tmp = t_1;
} else if (z <= 9.7e+79) {
tmp = a * ((-4.0 * t) / c);
} else if (z <= 1.35e+109) {
tmp = 9.0 * (x * (y / (z * c)));
} else {
tmp = -4.0 / (c / (a * t));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * (y * (x / (z * c))) tmp = 0 if z <= -1.4e+23: tmp = -4.0 * (t * (a / c)) elif z <= 1.05e-253: tmp = t_1 elif z <= 3.3e-119: tmp = b / (z * c) elif z <= 4.1e-16: tmp = t_1 elif z <= 9.7e+79: tmp = a * ((-4.0 * t) / c) elif z <= 1.35e+109: tmp = 9.0 * (x * (y / (z * c))) else: tmp = -4.0 / (c / (a * t)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(y * Float64(x / Float64(z * c)))) tmp = 0.0 if (z <= -1.4e+23) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 1.05e-253) tmp = t_1; elseif (z <= 3.3e-119) tmp = Float64(b / Float64(z * c)); elseif (z <= 4.1e-16) tmp = t_1; elseif (z <= 9.7e+79) tmp = Float64(a * Float64(Float64(-4.0 * t) / c)); elseif (z <= 1.35e+109) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); else tmp = Float64(-4.0 / Float64(c / Float64(a * t))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (y * (x / (z * c)));
tmp = 0.0;
if (z <= -1.4e+23)
tmp = -4.0 * (t * (a / c));
elseif (z <= 1.05e-253)
tmp = t_1;
elseif (z <= 3.3e-119)
tmp = b / (z * c);
elseif (z <= 4.1e-16)
tmp = t_1;
elseif (z <= 9.7e+79)
tmp = a * ((-4.0 * t) / c);
elseif (z <= 1.35e+109)
tmp = 9.0 * (x * (y / (z * c)));
else
tmp = -4.0 / (c / (a * t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(y * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+23], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e-253], t$95$1, If[LessEqual[z, 3.3e-119], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e-16], t$95$1, If[LessEqual[z, 9.7e+79], N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+109], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 / N[(c / N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+23}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-253}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-119}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.7 \cdot 10^{+79}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+109}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-4}{\frac{c}{a \cdot t}}\\
\end{array}
\end{array}
if z < -1.4e23Initial program 71.9%
+-commutative71.9%
associate-+r-71.9%
*-commutative71.9%
associate-*r*73.3%
*-commutative73.3%
associate-+r-73.3%
+-commutative73.3%
associate-*l*73.3%
associate-*l*76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in t around inf 71.8%
Taylor expanded in t around 0 88.8%
+-commutative88.8%
associate-/r*86.0%
associate-*r/81.5%
*-commutative81.5%
associate-*r/76.7%
metadata-eval76.7%
distribute-lft-neg-in76.7%
associate-+l+76.7%
*-commutative76.7%
associate-*l/76.7%
associate-/l*76.7%
unsub-neg76.7%
associate-/r*81.3%
associate-*r*81.3%
associate-*r/86.1%
associate-*r*86.1%
Simplified86.1%
Taylor expanded in z around inf 59.8%
*-commutative59.8%
associate-/l*59.6%
Simplified59.6%
if -1.4e23 < z < 1.0499999999999999e-253 or 3.30000000000000008e-119 < z < 4.10000000000000006e-16Initial program 93.0%
+-commutative93.0%
associate-+r-93.0%
*-commutative93.0%
associate-*r*93.0%
*-commutative93.0%
associate-+r-93.0%
+-commutative93.0%
associate-*l*93.0%
associate-*l*90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in t around inf 91.3%
Taylor expanded in t around 0 74.2%
+-commutative74.2%
associate-/r*74.3%
associate-*r/77.2%
*-commutative77.2%
associate-*r/80.2%
metadata-eval80.2%
distribute-lft-neg-in80.2%
associate-+l+80.2%
*-commutative80.2%
associate-*l/80.2%
associate-/l*80.2%
unsub-neg80.2%
associate-/r*77.3%
associate-*r*77.3%
associate-*r/75.2%
associate-*r*75.2%
Simplified75.2%
Taylor expanded in x around inf 55.6%
*-commutative55.6%
associate-/l*62.1%
Simplified62.1%
if 1.0499999999999999e-253 < z < 3.30000000000000008e-119Initial program 96.6%
+-commutative96.6%
associate-+r-96.6%
*-commutative96.6%
associate-*r*93.5%
*-commutative93.5%
associate-+r-93.5%
+-commutative93.5%
associate-*l*90.2%
associate-*l*93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in b around inf 80.7%
*-commutative80.7%
Simplified80.7%
if 4.10000000000000006e-16 < z < 9.7000000000000002e79Initial program 83.7%
+-commutative83.7%
associate-+r-83.7%
*-commutative83.7%
associate-*r*84.0%
*-commutative84.0%
associate-+r-84.0%
+-commutative84.0%
associate-*l*83.9%
associate-*l*83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in z around inf 52.2%
*-commutative52.2%
associate-/l*59.5%
associate-*r*59.5%
associate-*l/59.5%
Simplified59.5%
if 9.7000000000000002e79 < z < 1.35000000000000001e109Initial program 100.0%
+-commutative100.0%
associate-+r-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+r-100.0%
+-commutative100.0%
associate-*l*99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 75.2%
associate-/l*63.6%
associate-/r*63.6%
Simplified63.6%
Taylor expanded in y around 0 63.6%
if 1.35000000000000001e109 < z Initial program 45.5%
+-commutative45.5%
associate-+r-45.5%
*-commutative45.5%
associate-*r*54.8%
*-commutative54.8%
associate-+r-54.8%
+-commutative54.8%
associate-*l*54.7%
associate-*l*57.1%
*-commutative57.1%
Simplified57.1%
Taylor expanded in z around inf 57.2%
Taylor expanded in z around inf 77.5%
associate-*r/77.5%
Simplified77.5%
clear-num77.6%
inv-pow77.6%
*-un-lft-identity77.6%
times-frac77.6%
metadata-eval77.6%
Applied egg-rr77.6%
unpow-177.6%
associate-/r*77.6%
metadata-eval77.6%
Simplified77.6%
Final simplification66.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a t) 4.0)) (t_2 (* y (* 9.0 x))))
(if (<= t_2 -2e-30)
(/ (- (* 9.0 (/ (* x y) z)) t_1) c)
(if (<= t_2 1e+32)
(/ (- (/ b z) t_1) c)
(/ (- (* 9.0 (* x y)) (* 4.0 (* a (* z t)))) (* z c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * t) * 4.0;
double t_2 = y * (9.0 * x);
double tmp;
if (t_2 <= -2e-30) {
tmp = ((9.0 * ((x * y) / z)) - t_1) / c;
} else if (t_2 <= 1e+32) {
tmp = ((b / z) - t_1) / c;
} else {
tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a * t) * 4.0d0
t_2 = y * (9.0d0 * x)
if (t_2 <= (-2d-30)) then
tmp = ((9.0d0 * ((x * y) / z)) - t_1) / c
else if (t_2 <= 1d+32) then
tmp = ((b / z) - t_1) / c
else
tmp = ((9.0d0 * (x * y)) - (4.0d0 * (a * (z * t)))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * t) * 4.0;
double t_2 = y * (9.0 * x);
double tmp;
if (t_2 <= -2e-30) {
tmp = ((9.0 * ((x * y) / z)) - t_1) / c;
} else if (t_2 <= 1e+32) {
tmp = ((b / z) - t_1) / c;
} else {
tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (a * t) * 4.0 t_2 = y * (9.0 * x) tmp = 0 if t_2 <= -2e-30: tmp = ((9.0 * ((x * y) / z)) - t_1) / c elif t_2 <= 1e+32: tmp = ((b / z) - t_1) / c else: tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * t) * 4.0) t_2 = Float64(y * Float64(9.0 * x)) tmp = 0.0 if (t_2 <= -2e-30) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) - t_1) / c); elseif (t_2 <= 1e+32) tmp = Float64(Float64(Float64(b / z) - t_1) / c); else tmp = Float64(Float64(Float64(9.0 * Float64(x * y)) - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (a * t) * 4.0;
t_2 = y * (9.0 * x);
tmp = 0.0;
if (t_2 <= -2e-30)
tmp = ((9.0 * ((x * y) / z)) - t_1) / c;
elseif (t_2 <= 1e+32)
tmp = ((b / z) - t_1) / c;
else
tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * t), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-30], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$2, 1e+32], N[(N[(N[(b / z), $MachinePrecision] - t$95$1), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \left(a \cdot t\right) \cdot 4\\
t_2 := y \cdot \left(9 \cdot x\right)\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-30}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} - t\_1}{c}\\
\mathbf{elif}\;t\_2 \leq 10^{+32}:\\
\;\;\;\;\frac{\frac{b}{z} - t\_1}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2e-30Initial program 79.4%
+-commutative79.4%
associate-+r-79.4%
*-commutative79.4%
associate-*r*79.4%
*-commutative79.4%
associate-+r-79.4%
+-commutative79.4%
associate-*l*78.0%
associate-*l*79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in z around inf 78.3%
Taylor expanded in b around 0 82.7%
if -2e-30 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000005e32Initial program 76.8%
+-commutative76.8%
associate-+r-76.8%
*-commutative76.8%
associate-*r*79.3%
*-commutative79.3%
associate-+r-79.3%
+-commutative79.3%
associate-*l*79.3%
associate-*l*81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in x around inf 62.0%
Taylor expanded in x around 0 88.3%
Taylor expanded in c around 0 92.4%
if 1.00000000000000005e32 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 86.7%
+-commutative86.7%
associate-+r-86.7%
*-commutative86.7%
associate-*r*88.3%
*-commutative88.3%
associate-+r-88.3%
+-commutative88.3%
associate-*l*88.3%
associate-*l*85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in b around 0 76.8%
Final simplification85.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* y (* 9.0 x))))
(if (or (<= t_1 -2e+148) (not (<= t_1 1e+32)))
(/ (+ b (* 9.0 (* x y))) (* z c))
(/ (- (/ b z) (* (* a t) 4.0)) c))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double tmp;
if ((t_1 <= -2e+148) || !(t_1 <= 1e+32)) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = ((b / z) - ((a * t) * 4.0)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = y * (9.0d0 * x)
if ((t_1 <= (-2d+148)) .or. (.not. (t_1 <= 1d+32))) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = ((b / z) - ((a * t) * 4.0d0)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y * (9.0 * x);
double tmp;
if ((t_1 <= -2e+148) || !(t_1 <= 1e+32)) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = ((b / z) - ((a * t) * 4.0)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = y * (9.0 * x) tmp = 0 if (t_1 <= -2e+148) or not (t_1 <= 1e+32): tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = ((b / z) - ((a * t) * 4.0)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(y * Float64(9.0 * x)) tmp = 0.0 if ((t_1 <= -2e+148) || !(t_1 <= 1e+32)) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(Float64(Float64(b / z) - Float64(Float64(a * t) * 4.0)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = y * (9.0 * x);
tmp = 0.0;
if ((t_1 <= -2e+148) || ~((t_1 <= 1e+32)))
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = ((b / z) - ((a * t) * 4.0)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+148], N[Not[LessEqual[t$95$1, 1e+32]], $MachinePrecision]], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / z), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(9 \cdot x\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+148} \lor \neg \left(t\_1 \leq 10^{+32}\right):\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} - \left(a \cdot t\right) \cdot 4}{c}\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.0000000000000001e148 or 1.00000000000000005e32 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 84.1%
+-commutative84.1%
associate-+r-84.1%
*-commutative84.1%
associate-*r*86.0%
*-commutative86.0%
associate-+r-86.0%
+-commutative86.0%
associate-*l*86.0%
associate-*l*84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in x around inf 75.0%
if -2.0000000000000001e148 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000005e32Initial program 77.4%
+-commutative77.4%
associate-+r-77.4%
*-commutative77.4%
associate-*r*78.6%
*-commutative78.6%
associate-+r-78.6%
+-commutative78.6%
associate-*l*78.0%
associate-*l*80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in x around inf 65.2%
Taylor expanded in x around 0 86.4%
Taylor expanded in c around 0 89.0%
Final simplification83.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -5.2e-36) (not (<= z 5e-51))) (/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c) (/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -5.2e-36) || !(z <= 5e-51)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-5.2d-36)) .or. (.not. (z <= 5d-51))) then
tmp = (((-4.0d0) * (a * t)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c
else
tmp = (b + ((x * (9.0d0 * y)) - ((a * t) * (z * 4.0d0)))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -5.2e-36) || !(z <= 5e-51)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -5.2e-36) or not (z <= 5e-51): tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c else: tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -5.2e-36) || !(z <= 5e-51)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -5.2e-36) || ~((z <= 5e-51)))
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
else
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -5.2e-36], N[Not[LessEqual[z, 5e-51]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{-36} \lor \neg \left(z \leq 5 \cdot 10^{-51}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -5.2000000000000001e-36 or 5.00000000000000004e-51 < z Initial program 68.2%
+-commutative68.2%
associate-+r-68.2%
*-commutative68.2%
associate-*r*71.7%
*-commutative71.7%
associate-+r-71.7%
+-commutative71.7%
associate-*l*71.6%
associate-*l*73.8%
*-commutative73.8%
Simplified73.8%
Taylor expanded in t around inf 68.9%
Taylor expanded in t around 0 87.3%
+-commutative87.3%
associate-/r*84.0%
associate-*r/82.0%
*-commutative82.0%
associate-*r/77.4%
metadata-eval77.4%
distribute-lft-neg-in77.4%
associate-+l+77.4%
*-commutative77.4%
associate-*l/77.4%
associate-/l*77.4%
unsub-neg77.4%
associate-/r*81.4%
associate-*r*81.4%
associate-*r/86.0%
associate-*r*86.0%
Simplified86.7%
Taylor expanded in c around 0 95.0%
if -5.2000000000000001e-36 < z < 5.00000000000000004e-51Initial program 94.7%
+-commutative94.7%
associate-+r-94.7%
*-commutative94.7%
associate-*r*93.9%
*-commutative93.9%
associate-+r-93.9%
+-commutative93.9%
associate-*l*93.1%
associate-*l*91.5%
*-commutative91.5%
Simplified91.5%
Final simplification93.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -8.2e-36) (not (<= z 1.35e-49))) (/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -8.2e-36) || !(z <= 1.35e-49)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-8.2d-36)) .or. (.not. (z <= 1.35d-49))) then
tmp = (((-4.0d0) * (a * t)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -8.2e-36) || !(z <= 1.35e-49)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -8.2e-36) or not (z <= 1.35e-49): tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -8.2e-36) || !(z <= 1.35e-49)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -8.2e-36) || ~((z <= 1.35e-49)))
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -8.2e-36], N[Not[LessEqual[z, 1.35e-49]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{-36} \lor \neg \left(z \leq 1.35 \cdot 10^{-49}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -8.20000000000000025e-36 or 1.35e-49 < z Initial program 68.2%
+-commutative68.2%
associate-+r-68.2%
*-commutative68.2%
associate-*r*71.7%
*-commutative71.7%
associate-+r-71.7%
+-commutative71.7%
associate-*l*71.6%
associate-*l*73.8%
*-commutative73.8%
Simplified73.8%
Taylor expanded in t around inf 68.9%
Taylor expanded in t around 0 87.3%
+-commutative87.3%
associate-/r*84.0%
associate-*r/82.0%
*-commutative82.0%
associate-*r/77.4%
metadata-eval77.4%
distribute-lft-neg-in77.4%
associate-+l+77.4%
*-commutative77.4%
associate-*l/77.4%
associate-/l*77.4%
unsub-neg77.4%
associate-/r*81.4%
associate-*r*81.4%
associate-*r/86.0%
associate-*r*86.0%
Simplified86.7%
Taylor expanded in c around 0 95.0%
if -8.20000000000000025e-36 < z < 1.35e-49Initial program 94.7%
Final simplification94.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= (* y (* 9.0 x)) 1e+207) (/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c) (* 9.0 (* x (/ y (* z c))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y * (9.0 * x)) <= 1e+207) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = 9.0 * (x * (y / (z * c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((y * (9.0d0 * x)) <= 1d+207) then
tmp = (((-4.0d0) * (a * t)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c
else
tmp = 9.0d0 * (x * (y / (z * c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y * (9.0 * x)) <= 1e+207) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = 9.0 * (x * (y / (z * c)));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (y * (9.0 * x)) <= 1e+207: tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c else: tmp = 9.0 * (x * (y / (z * c))) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(y * Float64(9.0 * x)) <= 1e+207) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c); else tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((y * (9.0 * x)) <= 1e+207)
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
else
tmp = 9.0 * (x * (y / (z * c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision], 1e+207], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \cdot \left(9 \cdot x\right) \leq 10^{+207}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1e207Initial program 79.7%
+-commutative79.7%
associate-+r-79.7%
*-commutative79.7%
associate-*r*81.9%
*-commutative81.9%
associate-+r-81.9%
+-commutative81.9%
associate-*l*81.4%
associate-*l*82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in t around inf 78.5%
Taylor expanded in t around 0 85.1%
+-commutative85.1%
associate-/r*84.4%
associate-*r/82.8%
*-commutative82.8%
associate-*r/81.6%
metadata-eval81.6%
distribute-lft-neg-in81.6%
associate-+l+81.6%
*-commutative81.6%
associate-*l/81.6%
associate-/l*81.6%
unsub-neg81.6%
associate-/r*81.9%
associate-*r*81.9%
associate-*r/83.5%
associate-*r*83.5%
Simplified84.0%
Taylor expanded in c around 0 92.2%
if 1e207 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 83.1%
+-commutative83.1%
associate-+r-83.1%
*-commutative83.1%
associate-*r*79.9%
*-commutative79.9%
associate-+r-79.9%
+-commutative79.9%
associate-*l*79.9%
associate-*l*79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in x around inf 80.2%
associate-/l*89.9%
associate-/r*89.8%
Simplified89.8%
Taylor expanded in y around 0 89.9%
Final simplification91.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -4.2e+73)
(* -4.0 (* t (/ a c)))
(if (<= z 1.46e+113)
(/ (+ b (* 9.0 (* x y))) (* z c))
(/ -4.0 (/ c (* a t))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -4.2e+73) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 1.46e+113) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 / (c / (a * t));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-4.2d+73)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 1.46d+113) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = (-4.0d0) / (c / (a * t))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -4.2e+73) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 1.46e+113) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 / (c / (a * t));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -4.2e+73: tmp = -4.0 * (t * (a / c)) elif z <= 1.46e+113: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = -4.0 / (c / (a * t)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -4.2e+73) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 1.46e+113) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(-4.0 / Float64(c / Float64(a * t))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -4.2e+73)
tmp = -4.0 * (t * (a / c));
elseif (z <= 1.46e+113)
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = -4.0 / (c / (a * t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -4.2e+73], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.46e+113], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 / N[(c / N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+73}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 1.46 \cdot 10^{+113}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4}{\frac{c}{a \cdot t}}\\
\end{array}
\end{array}
if z < -4.2000000000000003e73Initial program 65.0%
+-commutative65.0%
associate-+r-65.0%
*-commutative65.0%
associate-*r*67.0%
*-commutative67.0%
associate-+r-67.0%
+-commutative67.0%
associate-*l*67.0%
associate-*l*71.1%
*-commutative71.1%
Simplified71.1%
Taylor expanded in t around inf 64.9%
Taylor expanded in t around 0 89.4%
+-commutative89.4%
associate-/r*85.7%
associate-*r/81.7%
*-commutative81.7%
associate-*r/77.6%
metadata-eval77.6%
distribute-lft-neg-in77.6%
associate-+l+77.6%
*-commutative77.6%
associate-*l/77.6%
associate-/l*77.7%
unsub-neg77.7%
associate-/r*81.7%
associate-*r*81.7%
associate-*r/85.8%
associate-*r*85.8%
Simplified85.8%
Taylor expanded in z around inf 67.5%
*-commutative67.5%
associate-/l*67.3%
Simplified67.3%
if -4.2000000000000003e73 < z < 1.46e113Initial program 93.4%
+-commutative93.4%
associate-+r-93.4%
*-commutative93.4%
associate-*r*92.8%
*-commutative92.8%
associate-+r-92.8%
+-commutative92.8%
associate-*l*92.2%
associate-*l*91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in x around inf 79.1%
if 1.46e113 < z Initial program 45.5%
+-commutative45.5%
associate-+r-45.5%
*-commutative45.5%
associate-*r*54.8%
*-commutative54.8%
associate-+r-54.8%
+-commutative54.8%
associate-*l*54.7%
associate-*l*57.1%
*-commutative57.1%
Simplified57.1%
Taylor expanded in z around inf 57.2%
Taylor expanded in z around inf 77.5%
associate-*r/77.5%
Simplified77.5%
clear-num77.6%
inv-pow77.6%
*-un-lft-identity77.6%
times-frac77.6%
metadata-eval77.6%
Applied egg-rr77.6%
unpow-177.6%
associate-/r*77.6%
metadata-eval77.6%
Simplified77.6%
Final simplification76.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -6.3e+22) (not (<= z 9.6e-82))) (* -4.0 (* t (/ a c))) (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -6.3e+22) || !(z <= 9.6e-82)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-6.3d+22)) .or. (.not. (z <= 9.6d-82))) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -6.3e+22) || !(z <= 9.6e-82)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -6.3e+22) or not (z <= 9.6e-82): tmp = -4.0 * (t * (a / c)) else: tmp = b / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -6.3e+22) || !(z <= 9.6e-82)) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -6.3e+22) || ~((z <= 9.6e-82)))
tmp = -4.0 * (t * (a / c));
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -6.3e+22], N[Not[LessEqual[z, 9.6e-82]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.3 \cdot 10^{+22} \lor \neg \left(z \leq 9.6 \cdot 10^{-82}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -6.30000000000000021e22 or 9.60000000000000033e-82 < z Initial program 66.3%
+-commutative66.3%
associate-+r-66.3%
*-commutative66.3%
associate-*r*69.9%
*-commutative69.9%
associate-+r-69.9%
+-commutative69.9%
associate-*l*69.9%
associate-*l*72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in t around inf 67.1%
Taylor expanded in t around 0 87.2%
+-commutative87.2%
associate-/r*83.9%
associate-*r/82.5%
*-commutative82.5%
associate-*r/77.9%
metadata-eval77.9%
distribute-lft-neg-in77.9%
associate-+l+77.9%
*-commutative77.9%
associate-*l/77.9%
associate-/l*77.9%
unsub-neg77.9%
associate-/r*81.2%
associate-*r*81.2%
associate-*r/85.8%
associate-*r*85.8%
Simplified86.5%
Taylor expanded in z around inf 61.6%
*-commutative61.6%
associate-/l*61.5%
Simplified61.5%
if -6.30000000000000021e22 < z < 9.60000000000000033e-82Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
*-commutative96.5%
associate-*r*95.7%
*-commutative95.7%
associate-+r-95.7%
+-commutative95.7%
associate-*l*94.8%
associate-*l*93.2%
*-commutative93.2%
Simplified93.2%
Taylor expanded in b around inf 50.5%
*-commutative50.5%
Simplified50.5%
Final simplification56.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= z -1.35e+23) (* -4.0 (* t (/ a c))) (if (<= z 2.4e-77) (/ b (* z c)) (* a (/ (* -4.0 t) c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.35e+23) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 2.4e-77) {
tmp = b / (z * c);
} else {
tmp = a * ((-4.0 * t) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-1.35d+23)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 2.4d-77) then
tmp = b / (z * c)
else
tmp = a * (((-4.0d0) * t) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.35e+23) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 2.4e-77) {
tmp = b / (z * c);
} else {
tmp = a * ((-4.0 * t) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -1.35e+23: tmp = -4.0 * (t * (a / c)) elif z <= 2.4e-77: tmp = b / (z * c) else: tmp = a * ((-4.0 * t) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -1.35e+23) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 2.4e-77) tmp = Float64(b / Float64(z * c)); else tmp = Float64(a * Float64(Float64(-4.0 * t) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -1.35e+23)
tmp = -4.0 * (t * (a / c));
elseif (z <= 2.4e-77)
tmp = b / (z * c);
else
tmp = a * ((-4.0 * t) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -1.35e+23], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e-77], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+23}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-77}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\end{array}
\end{array}
if z < -1.3499999999999999e23Initial program 71.9%
+-commutative71.9%
associate-+r-71.9%
*-commutative71.9%
associate-*r*73.3%
*-commutative73.3%
associate-+r-73.3%
+-commutative73.3%
associate-*l*73.3%
associate-*l*76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in t around inf 71.8%
Taylor expanded in t around 0 88.8%
+-commutative88.8%
associate-/r*86.0%
associate-*r/81.5%
*-commutative81.5%
associate-*r/76.7%
metadata-eval76.7%
distribute-lft-neg-in76.7%
associate-+l+76.7%
*-commutative76.7%
associate-*l/76.7%
associate-/l*76.7%
unsub-neg76.7%
associate-/r*81.3%
associate-*r*81.3%
associate-*r/86.1%
associate-*r*86.1%
Simplified86.1%
Taylor expanded in z around inf 59.8%
*-commutative59.8%
associate-/l*59.6%
Simplified59.6%
if -1.3499999999999999e23 < z < 2.3999999999999999e-77Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
*-commutative96.5%
associate-*r*95.7%
*-commutative95.7%
associate-+r-95.7%
+-commutative95.7%
associate-*l*94.8%
associate-*l*93.2%
*-commutative93.2%
Simplified93.2%
Taylor expanded in b around inf 50.5%
*-commutative50.5%
Simplified50.5%
if 2.3999999999999999e-77 < z Initial program 61.9%
+-commutative61.9%
associate-+r-61.9%
*-commutative61.9%
associate-*r*67.2%
*-commutative67.2%
associate-+r-67.2%
+-commutative67.2%
associate-*l*67.1%
associate-*l*68.4%
*-commutative68.4%
Simplified68.4%
Taylor expanded in z around inf 63.1%
*-commutative63.1%
associate-/l*60.8%
associate-*r*60.8%
associate-*l/60.8%
Simplified60.8%
Final simplification55.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= z -7.2e+22) (* -4.0 (* t (/ a c))) (if (<= z 3.3e-76) (/ b (* z c)) (/ -4.0 (/ c (* a t))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -7.2e+22) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 3.3e-76) {
tmp = b / (z * c);
} else {
tmp = -4.0 / (c / (a * t));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-7.2d+22)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 3.3d-76) then
tmp = b / (z * c)
else
tmp = (-4.0d0) / (c / (a * t))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -7.2e+22) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 3.3e-76) {
tmp = b / (z * c);
} else {
tmp = -4.0 / (c / (a * t));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -7.2e+22: tmp = -4.0 * (t * (a / c)) elif z <= 3.3e-76: tmp = b / (z * c) else: tmp = -4.0 / (c / (a * t)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -7.2e+22) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 3.3e-76) tmp = Float64(b / Float64(z * c)); else tmp = Float64(-4.0 / Float64(c / Float64(a * t))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -7.2e+22)
tmp = -4.0 * (t * (a / c));
elseif (z <= 3.3e-76)
tmp = b / (z * c);
else
tmp = -4.0 / (c / (a * t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -7.2e+22], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e-76], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 / N[(c / N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+22}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-76}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4}{\frac{c}{a \cdot t}}\\
\end{array}
\end{array}
if z < -7.2e22Initial program 71.9%
+-commutative71.9%
associate-+r-71.9%
*-commutative71.9%
associate-*r*73.3%
*-commutative73.3%
associate-+r-73.3%
+-commutative73.3%
associate-*l*73.3%
associate-*l*76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in t around inf 71.8%
Taylor expanded in t around 0 88.8%
+-commutative88.8%
associate-/r*86.0%
associate-*r/81.5%
*-commutative81.5%
associate-*r/76.7%
metadata-eval76.7%
distribute-lft-neg-in76.7%
associate-+l+76.7%
*-commutative76.7%
associate-*l/76.7%
associate-/l*76.7%
unsub-neg76.7%
associate-/r*81.3%
associate-*r*81.3%
associate-*r/86.1%
associate-*r*86.1%
Simplified86.1%
Taylor expanded in z around inf 59.8%
*-commutative59.8%
associate-/l*59.6%
Simplified59.6%
if -7.2e22 < z < 3.29999999999999984e-76Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
*-commutative96.5%
associate-*r*95.7%
*-commutative95.7%
associate-+r-95.7%
+-commutative95.7%
associate-*l*94.8%
associate-*l*93.2%
*-commutative93.2%
Simplified93.2%
Taylor expanded in b around inf 50.5%
*-commutative50.5%
Simplified50.5%
if 3.29999999999999984e-76 < z Initial program 61.9%
+-commutative61.9%
associate-+r-61.9%
*-commutative61.9%
associate-*r*67.2%
*-commutative67.2%
associate-+r-67.2%
+-commutative67.2%
associate-*l*67.1%
associate-*l*68.4%
*-commutative68.4%
Simplified68.4%
Taylor expanded in z around inf 67.2%
Taylor expanded in z around inf 63.1%
associate-*r/63.1%
Simplified63.1%
clear-num63.2%
inv-pow63.2%
*-un-lft-identity63.2%
times-frac63.2%
metadata-eval63.2%
Applied egg-rr63.2%
unpow-163.2%
associate-/r*63.2%
metadata-eval63.2%
Simplified63.2%
Final simplification56.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= c 1.35e-127) (/ b (* z c)) (/ (/ b c) z)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 1.35e-127) {
tmp = b / (z * c);
} else {
tmp = (b / c) / z;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= 1.35d-127) then
tmp = b / (z * c)
else
tmp = (b / c) / z
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 1.35e-127) {
tmp = b / (z * c);
} else {
tmp = (b / c) / z;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if c <= 1.35e-127: tmp = b / (z * c) else: tmp = (b / c) / z return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 1.35e-127) tmp = Float64(b / Float64(z * c)); else tmp = Float64(Float64(b / c) / z); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (c <= 1.35e-127)
tmp = b / (z * c);
else
tmp = (b / c) / z;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 1.35e-127], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq 1.35 \cdot 10^{-127}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if c < 1.35e-127Initial program 84.3%
+-commutative84.3%
associate-+r-84.3%
*-commutative84.3%
associate-*r*83.8%
*-commutative83.8%
associate-+r-83.8%
+-commutative83.8%
associate-*l*83.2%
associate-*l*83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in b around inf 35.7%
*-commutative35.7%
Simplified35.7%
if 1.35e-127 < c Initial program 71.1%
+-commutative71.1%
associate-+r-71.1%
*-commutative71.1%
associate-*r*77.1%
*-commutative77.1%
associate-+r-77.1%
+-commutative77.1%
associate-*l*77.1%
associate-*l*77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in b around inf 29.4%
associate-/r*32.2%
Simplified32.2%
Final simplification34.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 80.1%
+-commutative80.1%
associate-+r-80.1%
*-commutative80.1%
associate-*r*81.7%
*-commutative81.7%
associate-+r-81.7%
+-commutative81.7%
associate-*l*81.3%
associate-*l*81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in b around inf 33.7%
*-commutative33.7%
Simplified33.7%
Final simplification33.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024082
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))