
(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 18 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
(let* ((t_1 (* c (* z t))))
(if (<= z -4.1e+133)
(*
t
(- (/ (fma (/ 9.0 z) (* x (/ y c)) (/ b (* z c))) t) (* 4.0 (/ a c))))
(if (<= z 8.2e+176)
(/ (- b (- (* a (* t (* z 4.0))) (* y (* 9.0 x)))) (* z c))
(* t (+ (* (/ a c) -4.0) (+ (* 9.0 (/ (* x y) t_1)) (/ b t_1))))))))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 = c * (z * t);
double tmp;
if (z <= -4.1e+133) {
tmp = t * ((fma((9.0 / z), (x * (y / c)), (b / (z * c))) / t) - (4.0 * (a / c)));
} else if (z <= 8.2e+176) {
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
} else {
tmp = t * (((a / c) * -4.0) + ((9.0 * ((x * y) / t_1)) + (b / t_1)));
}
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(c * Float64(z * t)) tmp = 0.0 if (z <= -4.1e+133) tmp = Float64(t * Float64(Float64(fma(Float64(9.0 / z), Float64(x * Float64(y / c)), Float64(b / Float64(z * c))) / t) - Float64(4.0 * Float64(a / c)))); elseif (z <= 8.2e+176) tmp = Float64(Float64(b - Float64(Float64(a * Float64(t * Float64(z * 4.0))) - Float64(y * Float64(9.0 * x)))) / Float64(z * c)); else tmp = Float64(t * Float64(Float64(Float64(a / c) * -4.0) + Float64(Float64(9.0 * Float64(Float64(x * y) / t_1)) + Float64(b / t_1)))); 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_] := Block[{t$95$1 = N[(c * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e+133], N[(t * N[(N[(N[(N[(9.0 / z), $MachinePrecision] * N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - N[(4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e+176], N[(N[(b - N[(N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(a / c), $MachinePrecision] * -4.0), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(b / t$95$1), $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 := c \cdot \left(z \cdot t\right)\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+133}:\\
\;\;\;\;t \cdot \left(\frac{\mathsf{fma}\left(\frac{9}{z}, x \cdot \frac{y}{c}, \frac{b}{z \cdot c}\right)}{t} - 4 \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+176}:\\
\;\;\;\;\frac{b - \left(a \cdot \left(t \cdot \left(z \cdot 4\right)\right) - y \cdot \left(9 \cdot x\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{a}{c} \cdot -4 + \left(9 \cdot \frac{x \cdot y}{t\_1} + \frac{b}{t\_1}\right)\right)\\
\end{array}
\end{array}
if z < -4.10000000000000004e133Initial program 42.6%
Simplified49.7%
Taylor expanded in t around -inf 68.7%
mul-1-neg68.7%
*-commutative68.7%
distribute-rgt-neg-in68.7%
Simplified89.3%
if -4.10000000000000004e133 < z < 8.1999999999999998e176Initial program 91.4%
if 8.1999999999999998e176 < z Initial program 54.1%
Simplified65.6%
Taylor expanded in t around inf 94.0%
Final simplification91.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 (* c (* z t))))
(if (<= z -5.7e+82)
(/
(* b (- (+ (* 9.0 (/ (* x y) (* z b))) (/ 1.0 z)) (* 4.0 (/ (* a t) b))))
c)
(if (<= z 1.8e+97)
(/ (+ b (fma x (* 9.0 y) (* t (* a (* z -4.0))))) (* z c))
(* t (+ (* (/ a c) -4.0) (+ (* 9.0 (/ (* x y) t_1)) (/ b t_1))))))))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 = c * (z * t);
double tmp;
if (z <= -5.7e+82) {
tmp = (b * (((9.0 * ((x * y) / (z * b))) + (1.0 / z)) - (4.0 * ((a * t) / b)))) / c;
} else if (z <= 1.8e+97) {
tmp = (b + fma(x, (9.0 * y), (t * (a * (z * -4.0))))) / (z * c);
} else {
tmp = t * (((a / c) * -4.0) + ((9.0 * ((x * y) / t_1)) + (b / t_1)));
}
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(c * Float64(z * t)) tmp = 0.0 if (z <= -5.7e+82) tmp = Float64(Float64(b * Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / Float64(z * b))) + Float64(1.0 / z)) - Float64(4.0 * Float64(Float64(a * t) / b)))) / c); elseif (z <= 1.8e+97) tmp = Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c)); else tmp = Float64(t * Float64(Float64(Float64(a / c) * -4.0) + Float64(Float64(9.0 * Float64(Float64(x * y) / t_1)) + Float64(b / t_1)))); 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_] := Block[{t$95$1 = N[(c * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.7e+82], N[(N[(b * N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1.8e+97], 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], N[(t * N[(N[(N[(a / c), $MachinePrecision] * -4.0), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(b / t$95$1), $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 := c \cdot \left(z \cdot t\right)\\
\mathbf{if}\;z \leq -5.7 \cdot 10^{+82}:\\
\;\;\;\;\frac{b \cdot \left(\left(9 \cdot \frac{x \cdot y}{z \cdot b} + \frac{1}{z}\right) - 4 \cdot \frac{a \cdot t}{b}\right)}{c}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+97}:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{a}{c} \cdot -4 + \left(9 \cdot \frac{x \cdot y}{t\_1} + \frac{b}{t\_1}\right)\right)\\
\end{array}
\end{array}
if z < -5.70000000000000016e82Initial program 51.5%
associate-+l-51.5%
*-commutative51.5%
associate-*r*53.8%
*-commutative53.8%
associate-+l-53.8%
associate-*l*53.7%
associate-*l*55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in b around inf 63.0%
Taylor expanded in c around 0 75.5%
if -5.70000000000000016e82 < z < 1.79999999999999983e97Initial program 95.3%
Simplified94.8%
if 1.79999999999999983e97 < z Initial program 58.8%
Simplified69.7%
Taylor expanded in t around inf 88.8%
Final simplification90.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
(let* ((t_1 (* -4.0 (* a (/ t c)))))
(if (<= t -5.1e+213)
t_1
(if (<= t -1.65e+103)
(* -4.0 (/ (* a t) c))
(if (<= t -5.5e-102)
(* x (/ (/ (* 9.0 y) c) z))
(if (<= t -1.95e-186)
(* b (/ (/ 1.0 c) z))
(if (<= t -5.3e-284)
(* 9.0 (/ (* x y) (* z c)))
(if (<= t 4.1e-109) (/ b (* z c)) t_1))))))))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 = -4.0 * (a * (t / c));
double tmp;
if (t <= -5.1e+213) {
tmp = t_1;
} else if (t <= -1.65e+103) {
tmp = -4.0 * ((a * t) / c);
} else if (t <= -5.5e-102) {
tmp = x * (((9.0 * y) / c) / z);
} else if (t <= -1.95e-186) {
tmp = b * ((1.0 / c) / z);
} else if (t <= -5.3e-284) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (t <= 4.1e-109) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
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 = (-4.0d0) * (a * (t / c))
if (t <= (-5.1d+213)) then
tmp = t_1
else if (t <= (-1.65d+103)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (t <= (-5.5d-102)) then
tmp = x * (((9.0d0 * y) / c) / z)
else if (t <= (-1.95d-186)) then
tmp = b * ((1.0d0 / c) / z)
else if (t <= (-5.3d-284)) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (t <= 4.1d-109) then
tmp = b / (z * c)
else
tmp = t_1
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 = -4.0 * (a * (t / c));
double tmp;
if (t <= -5.1e+213) {
tmp = t_1;
} else if (t <= -1.65e+103) {
tmp = -4.0 * ((a * t) / c);
} else if (t <= -5.5e-102) {
tmp = x * (((9.0 * y) / c) / z);
} else if (t <= -1.95e-186) {
tmp = b * ((1.0 / c) / z);
} else if (t <= -5.3e-284) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (t <= 4.1e-109) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
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 = -4.0 * (a * (t / c)) tmp = 0 if t <= -5.1e+213: tmp = t_1 elif t <= -1.65e+103: tmp = -4.0 * ((a * t) / c) elif t <= -5.5e-102: tmp = x * (((9.0 * y) / c) / z) elif t <= -1.95e-186: tmp = b * ((1.0 / c) / z) elif t <= -5.3e-284: tmp = 9.0 * ((x * y) / (z * c)) elif t <= 4.1e-109: tmp = b / (z * c) else: tmp = t_1 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(-4.0 * Float64(a * Float64(t / c))) tmp = 0.0 if (t <= -5.1e+213) tmp = t_1; elseif (t <= -1.65e+103) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (t <= -5.5e-102) tmp = Float64(x * Float64(Float64(Float64(9.0 * y) / c) / z)); elseif (t <= -1.95e-186) tmp = Float64(b * Float64(Float64(1.0 / c) / z)); elseif (t <= -5.3e-284) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (t <= 4.1e-109) tmp = Float64(b / Float64(z * c)); else tmp = t_1; 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 = -4.0 * (a * (t / c));
tmp = 0.0;
if (t <= -5.1e+213)
tmp = t_1;
elseif (t <= -1.65e+103)
tmp = -4.0 * ((a * t) / c);
elseif (t <= -5.5e-102)
tmp = x * (((9.0 * y) / c) / z);
elseif (t <= -1.95e-186)
tmp = b * ((1.0 / c) / z);
elseif (t <= -5.3e-284)
tmp = 9.0 * ((x * y) / (z * c));
elseif (t <= 4.1e-109)
tmp = b / (z * c);
else
tmp = t_1;
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[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.1e+213], t$95$1, If[LessEqual[t, -1.65e+103], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.5e-102], N[(x * N[(N[(N[(9.0 * y), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.95e-186], N[(b * N[(N[(1.0 / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.3e-284], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e-109], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\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 := -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{if}\;t \leq -5.1 \cdot 10^{+213}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{+103}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-102}:\\
\;\;\;\;x \cdot \frac{\frac{9 \cdot y}{c}}{z}\\
\mathbf{elif}\;t \leq -1.95 \cdot 10^{-186}:\\
\;\;\;\;b \cdot \frac{\frac{1}{c}}{z}\\
\mathbf{elif}\;t \leq -5.3 \cdot 10^{-284}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{-109}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.1000000000000002e213 or 4.1000000000000002e-109 < t Initial program 81.1%
associate-+l-81.1%
*-commutative81.1%
associate-*r*82.2%
*-commutative82.2%
associate-+l-82.2%
associate-*l*82.2%
associate-*l*81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in z around inf 81.2%
Taylor expanded in z around inf 47.0%
associate-/l*53.9%
Simplified53.9%
if -5.1000000000000002e213 < t < -1.65000000000000004e103Initial program 73.6%
Simplified91.3%
Taylor expanded in t around inf 77.5%
if -1.65000000000000004e103 < t < -5.4999999999999997e-102Initial program 77.1%
Simplified79.1%
Taylor expanded in t around 0 67.8%
Taylor expanded in b around 0 53.5%
*-commutative53.5%
associate-/l*57.7%
associate-*r*57.8%
*-commutative57.8%
associate-*r/57.7%
associate-/r*53.5%
Simplified53.5%
if -5.4999999999999997e-102 < t < -1.95000000000000005e-186Initial program 82.9%
Simplified82.9%
Taylor expanded in b around inf 58.1%
*-commutative58.1%
Simplified58.1%
div-inv58.1%
*-commutative58.1%
associate-/r*58.1%
Applied egg-rr58.1%
if -1.95000000000000005e-186 < t < -5.2999999999999998e-284Initial program 87.6%
Simplified84.0%
Taylor expanded in x around inf 63.7%
*-commutative63.7%
Simplified63.7%
if -5.2999999999999998e-284 < t < 4.1000000000000002e-109Initial program 86.3%
Simplified86.1%
Taylor expanded in b around inf 47.6%
*-commutative47.6%
Simplified47.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 (* -4.0 (* a (/ t c)))))
(if (<= t -1.1e+214)
t_1
(if (<= t -5.2e+102)
(* -4.0 (/ (* a t) c))
(if (<= t -6e-102)
(* 9.0 (* x (/ (/ y c) z)))
(if (<= t -4.8e-188)
(* b (/ (/ 1.0 c) z))
(if (<= t -5.5e-284)
(* 9.0 (/ (* x y) (* z c)))
(if (<= t 2.35e-114) (/ b (* z c)) t_1))))))))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 = -4.0 * (a * (t / c));
double tmp;
if (t <= -1.1e+214) {
tmp = t_1;
} else if (t <= -5.2e+102) {
tmp = -4.0 * ((a * t) / c);
} else if (t <= -6e-102) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (t <= -4.8e-188) {
tmp = b * ((1.0 / c) / z);
} else if (t <= -5.5e-284) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (t <= 2.35e-114) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
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 = (-4.0d0) * (a * (t / c))
if (t <= (-1.1d+214)) then
tmp = t_1
else if (t <= (-5.2d+102)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (t <= (-6d-102)) then
tmp = 9.0d0 * (x * ((y / c) / z))
else if (t <= (-4.8d-188)) then
tmp = b * ((1.0d0 / c) / z)
else if (t <= (-5.5d-284)) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (t <= 2.35d-114) then
tmp = b / (z * c)
else
tmp = t_1
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 = -4.0 * (a * (t / c));
double tmp;
if (t <= -1.1e+214) {
tmp = t_1;
} else if (t <= -5.2e+102) {
tmp = -4.0 * ((a * t) / c);
} else if (t <= -6e-102) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (t <= -4.8e-188) {
tmp = b * ((1.0 / c) / z);
} else if (t <= -5.5e-284) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (t <= 2.35e-114) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
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 = -4.0 * (a * (t / c)) tmp = 0 if t <= -1.1e+214: tmp = t_1 elif t <= -5.2e+102: tmp = -4.0 * ((a * t) / c) elif t <= -6e-102: tmp = 9.0 * (x * ((y / c) / z)) elif t <= -4.8e-188: tmp = b * ((1.0 / c) / z) elif t <= -5.5e-284: tmp = 9.0 * ((x * y) / (z * c)) elif t <= 2.35e-114: tmp = b / (z * c) else: tmp = t_1 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(-4.0 * Float64(a * Float64(t / c))) tmp = 0.0 if (t <= -1.1e+214) tmp = t_1; elseif (t <= -5.2e+102) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (t <= -6e-102) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); elseif (t <= -4.8e-188) tmp = Float64(b * Float64(Float64(1.0 / c) / z)); elseif (t <= -5.5e-284) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (t <= 2.35e-114) tmp = Float64(b / Float64(z * c)); else tmp = t_1; 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 = -4.0 * (a * (t / c));
tmp = 0.0;
if (t <= -1.1e+214)
tmp = t_1;
elseif (t <= -5.2e+102)
tmp = -4.0 * ((a * t) / c);
elseif (t <= -6e-102)
tmp = 9.0 * (x * ((y / c) / z));
elseif (t <= -4.8e-188)
tmp = b * ((1.0 / c) / z);
elseif (t <= -5.5e-284)
tmp = 9.0 * ((x * y) / (z * c));
elseif (t <= 2.35e-114)
tmp = b / (z * c);
else
tmp = t_1;
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[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+214], t$95$1, If[LessEqual[t, -5.2e+102], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6e-102], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.8e-188], N[(b * N[(N[(1.0 / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.5e-284], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.35e-114], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\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 := -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{+214}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{+102}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-102}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{-188}:\\
\;\;\;\;b \cdot \frac{\frac{1}{c}}{z}\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-284}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{-114}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.10000000000000012e214 or 2.35000000000000003e-114 < t Initial program 81.1%
associate-+l-81.1%
*-commutative81.1%
associate-*r*82.2%
*-commutative82.2%
associate-+l-82.2%
associate-*l*82.2%
associate-*l*81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in z around inf 81.2%
Taylor expanded in z around inf 47.0%
associate-/l*53.9%
Simplified53.9%
if -1.10000000000000012e214 < t < -5.20000000000000013e102Initial program 73.6%
Simplified91.3%
Taylor expanded in t around inf 77.5%
if -5.20000000000000013e102 < t < -6e-102Initial program 77.1%
Simplified79.1%
Taylor expanded in t around 0 67.8%
Taylor expanded in b around 0 53.5%
associate-/l*57.7%
associate-/r*53.6%
Simplified53.6%
if -6e-102 < t < -4.8e-188Initial program 83.6%
Simplified83.6%
Taylor expanded in b around inf 59.8%
*-commutative59.8%
Simplified59.8%
div-inv59.9%
*-commutative59.9%
associate-/r*59.8%
Applied egg-rr59.8%
if -4.8e-188 < t < -5.4999999999999995e-284Initial program 87.1%
Simplified83.3%
Taylor expanded in x around inf 62.1%
*-commutative62.1%
Simplified62.1%
if -5.4999999999999995e-284 < t < 2.35000000000000003e-114Initial program 86.3%
Simplified86.1%
Taylor expanded in b around inf 47.6%
*-commutative47.6%
Simplified47.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 (* c (* z t))))
(if (<= z -2.75e+82)
(/
(* b (- (+ (* 9.0 (/ (* x y) (* z b))) (/ 1.0 z)) (* 4.0 (/ (* a t) b))))
c)
(if (<= z 3.5e+175)
(/ (- b (- (* a (* t (* z 4.0))) (* y (* 9.0 x)))) (* z c))
(* t (+ (* (/ a c) -4.0) (+ (* 9.0 (/ (* x y) t_1)) (/ b t_1))))))))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 = c * (z * t);
double tmp;
if (z <= -2.75e+82) {
tmp = (b * (((9.0 * ((x * y) / (z * b))) + (1.0 / z)) - (4.0 * ((a * t) / b)))) / c;
} else if (z <= 3.5e+175) {
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
} else {
tmp = t * (((a / c) * -4.0) + ((9.0 * ((x * y) / t_1)) + (b / t_1)));
}
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 = c * (z * t)
if (z <= (-2.75d+82)) then
tmp = (b * (((9.0d0 * ((x * y) / (z * b))) + (1.0d0 / z)) - (4.0d0 * ((a * t) / b)))) / c
else if (z <= 3.5d+175) then
tmp = (b - ((a * (t * (z * 4.0d0))) - (y * (9.0d0 * x)))) / (z * c)
else
tmp = t * (((a / c) * (-4.0d0)) + ((9.0d0 * ((x * y) / t_1)) + (b / t_1)))
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 = c * (z * t);
double tmp;
if (z <= -2.75e+82) {
tmp = (b * (((9.0 * ((x * y) / (z * b))) + (1.0 / z)) - (4.0 * ((a * t) / b)))) / c;
} else if (z <= 3.5e+175) {
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
} else {
tmp = t * (((a / c) * -4.0) + ((9.0 * ((x * y) / t_1)) + (b / t_1)));
}
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 = c * (z * t) tmp = 0 if z <= -2.75e+82: tmp = (b * (((9.0 * ((x * y) / (z * b))) + (1.0 / z)) - (4.0 * ((a * t) / b)))) / c elif z <= 3.5e+175: tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c) else: tmp = t * (((a / c) * -4.0) + ((9.0 * ((x * y) / t_1)) + (b / t_1))) 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(c * Float64(z * t)) tmp = 0.0 if (z <= -2.75e+82) tmp = Float64(Float64(b * Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / Float64(z * b))) + Float64(1.0 / z)) - Float64(4.0 * Float64(Float64(a * t) / b)))) / c); elseif (z <= 3.5e+175) tmp = Float64(Float64(b - Float64(Float64(a * Float64(t * Float64(z * 4.0))) - Float64(y * Float64(9.0 * x)))) / Float64(z * c)); else tmp = Float64(t * Float64(Float64(Float64(a / c) * -4.0) + Float64(Float64(9.0 * Float64(Float64(x * y) / t_1)) + Float64(b / t_1)))); 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 = c * (z * t);
tmp = 0.0;
if (z <= -2.75e+82)
tmp = (b * (((9.0 * ((x * y) / (z * b))) + (1.0 / z)) - (4.0 * ((a * t) / b)))) / c;
elseif (z <= 3.5e+175)
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
else
tmp = t * (((a / c) * -4.0) + ((9.0 * ((x * y) / t_1)) + (b / t_1)));
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[(c * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.75e+82], N[(N[(b * N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 3.5e+175], N[(N[(b - N[(N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(a / c), $MachinePrecision] * -4.0), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(b / t$95$1), $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 := c \cdot \left(z \cdot t\right)\\
\mathbf{if}\;z \leq -2.75 \cdot 10^{+82}:\\
\;\;\;\;\frac{b \cdot \left(\left(9 \cdot \frac{x \cdot y}{z \cdot b} + \frac{1}{z}\right) - 4 \cdot \frac{a \cdot t}{b}\right)}{c}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+175}:\\
\;\;\;\;\frac{b - \left(a \cdot \left(t \cdot \left(z \cdot 4\right)\right) - y \cdot \left(9 \cdot x\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{a}{c} \cdot -4 + \left(9 \cdot \frac{x \cdot y}{t\_1} + \frac{b}{t\_1}\right)\right)\\
\end{array}
\end{array}
if z < -2.74999999999999998e82Initial program 51.5%
associate-+l-51.5%
*-commutative51.5%
associate-*r*53.8%
*-commutative53.8%
associate-+l-53.8%
associate-*l*53.7%
associate-*l*55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in b around inf 63.0%
Taylor expanded in c around 0 75.5%
if -2.74999999999999998e82 < z < 3.5000000000000003e175Initial program 93.9%
if 3.5000000000000003e175 < z Initial program 54.1%
Simplified65.6%
Taylor expanded in t around inf 94.0%
Final simplification90.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 -5.7e+82)
(/
(* b (- (+ (* 9.0 (/ (* x y) (* z b))) (/ 1.0 z)) (* 4.0 (/ (* a t) b))))
c)
(if (<= z 1.8e+150)
(/ (- b (- (* a (* t (* z 4.0))) (* y (* 9.0 x)))) (* z c))
(/ (- (* 9.0 (/ (* x y) z)) (* 4.0 (* a 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 <= -5.7e+82) {
tmp = (b * (((9.0 * ((x * y) / (z * b))) + (1.0 / z)) - (4.0 * ((a * t) / b)))) / c;
} else if (z <= 1.8e+150) {
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
} else {
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * 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 <= (-5.7d+82)) then
tmp = (b * (((9.0d0 * ((x * y) / (z * b))) + (1.0d0 / z)) - (4.0d0 * ((a * t) / b)))) / c
else if (z <= 1.8d+150) then
tmp = (b - ((a * (t * (z * 4.0d0))) - (y * (9.0d0 * x)))) / (z * c)
else
tmp = ((9.0d0 * ((x * y) / z)) - (4.0d0 * (a * 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 <= -5.7e+82) {
tmp = (b * (((9.0 * ((x * y) / (z * b))) + (1.0 / z)) - (4.0 * ((a * t) / b)))) / c;
} else if (z <= 1.8e+150) {
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
} else {
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * 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 <= -5.7e+82: tmp = (b * (((9.0 * ((x * y) / (z * b))) + (1.0 / z)) - (4.0 * ((a * t) / b)))) / c elif z <= 1.8e+150: tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c) else: tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * 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 <= -5.7e+82) tmp = Float64(Float64(b * Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / Float64(z * b))) + Float64(1.0 / z)) - Float64(4.0 * Float64(Float64(a * t) / b)))) / c); elseif (z <= 1.8e+150) tmp = Float64(Float64(b - Float64(Float64(a * Float64(t * Float64(z * 4.0))) - Float64(y * Float64(9.0 * x)))) / Float64(z * c)); else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) - Float64(4.0 * Float64(a * 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 <= -5.7e+82)
tmp = (b * (((9.0 * ((x * y) / (z * b))) + (1.0 / z)) - (4.0 * ((a * t) / b)))) / c;
elseif (z <= 1.8e+150)
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (z * c);
else
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * 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, -5.7e+82], N[(N[(b * N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1.8e+150], N[(N[(b - N[(N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $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}
\mathbf{if}\;z \leq -5.7 \cdot 10^{+82}:\\
\;\;\;\;\frac{b \cdot \left(\left(9 \cdot \frac{x \cdot y}{z \cdot b} + \frac{1}{z}\right) - 4 \cdot \frac{a \cdot t}{b}\right)}{c}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+150}:\\
\;\;\;\;\frac{b - \left(a \cdot \left(t \cdot \left(z \cdot 4\right)\right) - y \cdot \left(9 \cdot x\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\end{array}
\end{array}
if z < -5.70000000000000016e82Initial program 51.5%
associate-+l-51.5%
*-commutative51.5%
associate-*r*53.8%
*-commutative53.8%
associate-+l-53.8%
associate-*l*53.7%
associate-*l*55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in b around inf 63.0%
Taylor expanded in c around 0 75.5%
if -5.70000000000000016e82 < z < 1.79999999999999993e150Initial program 94.3%
if 1.79999999999999993e150 < z Initial program 56.4%
associate-+l-56.4%
*-commutative56.4%
associate-*r*66.7%
*-commutative66.7%
associate-+l-66.7%
associate-*l*66.7%
associate-*l*66.6%
*-commutative66.6%
Simplified66.6%
Taylor expanded in z around inf 66.6%
Taylor expanded in b around 0 89.9%
Final simplification90.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 -4.2e+69) (not (<= z 1.8e+150))) (/ (- (* 9.0 (/ (* x y) z)) (* 4.0 (* a t))) c) (/ (- b (- (* a (* t (* z 4.0))) (* y (* 9.0 x)))) (* 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 <= -4.2e+69) || !(z <= 1.8e+150)) {
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
} else {
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (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 <= (-4.2d+69)) .or. (.not. (z <= 1.8d+150))) then
tmp = ((9.0d0 * ((x * y) / z)) - (4.0d0 * (a * t))) / c
else
tmp = (b - ((a * (t * (z * 4.0d0))) - (y * (9.0d0 * x)))) / (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 <= -4.2e+69) || !(z <= 1.8e+150)) {
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
} else {
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (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 <= -4.2e+69) or not (z <= 1.8e+150): tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c else: tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (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 <= -4.2e+69) || !(z <= 1.8e+150)) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b - Float64(Float64(a * Float64(t * Float64(z * 4.0))) - Float64(y * Float64(9.0 * x)))) / 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 <= -4.2e+69) || ~((z <= 1.8e+150)))
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
else
tmp = (b - ((a * (t * (z * 4.0))) - (y * (9.0 * x)))) / (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, -4.2e+69], N[Not[LessEqual[z, 1.8e+150]], $MachinePrecision]], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b - N[(N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * x), $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 -4.2 \cdot 10^{+69} \lor \neg \left(z \leq 1.8 \cdot 10^{+150}\right):\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b - \left(a \cdot \left(t \cdot \left(z \cdot 4\right)\right) - y \cdot \left(9 \cdot x\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -4.2000000000000003e69 or 1.79999999999999993e150 < z Initial program 54.9%
associate-+l-54.9%
*-commutative54.9%
associate-*r*60.7%
*-commutative60.7%
associate-+l-60.7%
associate-*l*60.7%
associate-*l*61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in z around inf 61.8%
Taylor expanded in b around 0 79.4%
if -4.2000000000000003e69 < z < 1.79999999999999993e150Initial program 94.3%
Final simplification89.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 -1.2e+62) (not (<= z 1.8e+150))) (/ (- (* 9.0 (/ (* x y) z)) (* 4.0 (* a t))) c) (/ (- b (- (* (* z 4.0) (* a t)) (* x (* 9.0 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 ((z <= -1.2e+62) || !(z <= 1.8e+150)) {
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
} else {
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * 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 ((z <= (-1.2d+62)) .or. (.not. (z <= 1.8d+150))) then
tmp = ((9.0d0 * ((x * y) / z)) - (4.0d0 * (a * t))) / c
else
tmp = (b - (((z * 4.0d0) * (a * t)) - (x * (9.0d0 * 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 ((z <= -1.2e+62) || !(z <= 1.8e+150)) {
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
} else {
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * 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 (z <= -1.2e+62) or not (z <= 1.8e+150): tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c else: tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * 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 ((z <= -1.2e+62) || !(z <= 1.8e+150)) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b - Float64(Float64(Float64(z * 4.0) * Float64(a * t)) - Float64(x * Float64(9.0 * 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 ((z <= -1.2e+62) || ~((z <= 1.8e+150)))
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
else
tmp = (b - (((z * 4.0) * (a * t)) - (x * (9.0 * 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[Or[LessEqual[z, -1.2e+62], N[Not[LessEqual[z, 1.8e+150]], $MachinePrecision]], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b - N[(N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $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 -1.2 \cdot 10^{+62} \lor \neg \left(z \leq 1.8 \cdot 10^{+150}\right):\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b - \left(\left(z \cdot 4\right) \cdot \left(a \cdot t\right) - x \cdot \left(9 \cdot y\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.2e62 or 1.79999999999999993e150 < z Initial program 55.4%
associate-+l-55.4%
*-commutative55.4%
associate-*r*61.2%
*-commutative61.2%
associate-+l-61.2%
associate-*l*61.2%
associate-*l*62.2%
*-commutative62.2%
Simplified62.2%
Taylor expanded in z around inf 62.2%
Taylor expanded in b around 0 79.6%
if -1.2e62 < z < 1.79999999999999993e150Initial program 94.2%
associate-+l-94.2%
*-commutative94.2%
associate-*r*94.3%
*-commutative94.3%
associate-+l-94.3%
associate-*l*94.3%
associate-*l*93.2%
*-commutative93.2%
Simplified93.2%
Final simplification88.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
(let* ((t_1 (* -4.0 (* a (/ t c)))))
(if (<= t -6e+213)
t_1
(if (<= t -1.55e+103)
(* -4.0 (/ (* a t) c))
(if (<= t -6e-102)
(* 9.0 (* x (/ (/ y c) z)))
(if (<= t 1.65e-109) (/ b (* z c)) t_1))))))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 = -4.0 * (a * (t / c));
double tmp;
if (t <= -6e+213) {
tmp = t_1;
} else if (t <= -1.55e+103) {
tmp = -4.0 * ((a * t) / c);
} else if (t <= -6e-102) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (t <= 1.65e-109) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
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 = (-4.0d0) * (a * (t / c))
if (t <= (-6d+213)) then
tmp = t_1
else if (t <= (-1.55d+103)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (t <= (-6d-102)) then
tmp = 9.0d0 * (x * ((y / c) / z))
else if (t <= 1.65d-109) then
tmp = b / (z * c)
else
tmp = t_1
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 = -4.0 * (a * (t / c));
double tmp;
if (t <= -6e+213) {
tmp = t_1;
} else if (t <= -1.55e+103) {
tmp = -4.0 * ((a * t) / c);
} else if (t <= -6e-102) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (t <= 1.65e-109) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
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 = -4.0 * (a * (t / c)) tmp = 0 if t <= -6e+213: tmp = t_1 elif t <= -1.55e+103: tmp = -4.0 * ((a * t) / c) elif t <= -6e-102: tmp = 9.0 * (x * ((y / c) / z)) elif t <= 1.65e-109: tmp = b / (z * c) else: tmp = t_1 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(-4.0 * Float64(a * Float64(t / c))) tmp = 0.0 if (t <= -6e+213) tmp = t_1; elseif (t <= -1.55e+103) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (t <= -6e-102) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); elseif (t <= 1.65e-109) tmp = Float64(b / Float64(z * c)); else tmp = t_1; 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 = -4.0 * (a * (t / c));
tmp = 0.0;
if (t <= -6e+213)
tmp = t_1;
elseif (t <= -1.55e+103)
tmp = -4.0 * ((a * t) / c);
elseif (t <= -6e-102)
tmp = 9.0 * (x * ((y / c) / z));
elseif (t <= 1.65e-109)
tmp = b / (z * c);
else
tmp = t_1;
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[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+213], t$95$1, If[LessEqual[t, -1.55e+103], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6e-102], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e-109], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\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 := -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{if}\;t \leq -6 \cdot 10^{+213}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{+103}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-102}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-109}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.0000000000000002e213 or 1.64999999999999995e-109 < t Initial program 81.1%
associate-+l-81.1%
*-commutative81.1%
associate-*r*82.2%
*-commutative82.2%
associate-+l-82.2%
associate-*l*82.2%
associate-*l*81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in z around inf 81.2%
Taylor expanded in z around inf 47.0%
associate-/l*53.9%
Simplified53.9%
if -6.0000000000000002e213 < t < -1.5500000000000001e103Initial program 73.6%
Simplified91.3%
Taylor expanded in t around inf 77.5%
if -1.5500000000000001e103 < t < -6e-102Initial program 77.1%
Simplified79.1%
Taylor expanded in t around 0 67.8%
Taylor expanded in b around 0 53.5%
associate-/l*57.7%
associate-/r*53.6%
Simplified53.6%
if -6e-102 < t < 1.64999999999999995e-109Initial program 85.7%
Simplified84.7%
Taylor expanded in b around inf 50.4%
*-commutative50.4%
Simplified50.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 (<= b -1.78e+208)
(/ (+ (* 9.0 (/ (* x y) c)) (/ b c)) z)
(if (<= b 2.25e+30)
(/ (- (* 9.0 (/ (* x y) z)) (* 4.0 (* a t))) c)
(* b (- (/ 1.0 (* z c)) (* 4.0 (/ (* a t) (* c b))))))))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 (b <= -1.78e+208) {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
} else if (b <= 2.25e+30) {
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
} else {
tmp = b * ((1.0 / (z * c)) - (4.0 * ((a * t) / (c * b))));
}
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 (b <= (-1.78d+208)) then
tmp = ((9.0d0 * ((x * y) / c)) + (b / c)) / z
else if (b <= 2.25d+30) then
tmp = ((9.0d0 * ((x * y) / z)) - (4.0d0 * (a * t))) / c
else
tmp = b * ((1.0d0 / (z * c)) - (4.0d0 * ((a * t) / (c * b))))
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 (b <= -1.78e+208) {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
} else if (b <= 2.25e+30) {
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
} else {
tmp = b * ((1.0 / (z * c)) - (4.0 * ((a * t) / (c * b))));
}
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 b <= -1.78e+208: tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z elif b <= 2.25e+30: tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c else: tmp = b * ((1.0 / (z * c)) - (4.0 * ((a * t) / (c * b)))) 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 (b <= -1.78e+208) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / c)) / z); elseif (b <= 2.25e+30) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(b * Float64(Float64(1.0 / Float64(z * c)) - Float64(4.0 * Float64(Float64(a * t) / Float64(c * b))))); 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 (b <= -1.78e+208)
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
elseif (b <= 2.25e+30)
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
else
tmp = b * ((1.0 / (z * c)) - (4.0 * ((a * t) / (c * b))));
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[b, -1.78e+208], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 2.25e+30], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(b * N[(N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / N[(c * b), $MachinePrecision]), $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}\;b \leq -1.78 \cdot 10^{+208}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}}{z}\\
\mathbf{elif}\;b \leq 2.25 \cdot 10^{+30}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\frac{1}{z \cdot c} - 4 \cdot \frac{a \cdot t}{c \cdot b}\right)\\
\end{array}
\end{array}
if b < -1.78000000000000004e208Initial program 81.2%
Simplified81.2%
Taylor expanded in z around 0 87.7%
Taylor expanded in a around 0 86.0%
if -1.78000000000000004e208 < b < 2.24999999999999997e30Initial program 79.8%
associate-+l-79.8%
*-commutative79.8%
associate-*r*81.9%
*-commutative81.9%
associate-+l-81.9%
associate-*l*81.9%
associate-*l*81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in z around inf 78.9%
Taylor expanded in b around 0 79.0%
if 2.24999999999999997e30 < b Initial program 86.9%
associate-+l-86.9%
*-commutative86.9%
associate-*r*88.9%
*-commutative88.9%
associate-+l-88.9%
associate-*l*88.9%
associate-*l*88.9%
*-commutative88.9%
Simplified88.9%
Taylor expanded in b around inf 79.2%
Taylor expanded in x around 0 85.0%
Final simplification80.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 (* -4.0 (* a (/ t c)))))
(if (<= t -3.4e+229)
t_1
(if (<= t -1.55e+62)
(/ (+ b (* t (* z (* a -4.0)))) (* z c))
(if (<= t 4.2e-109) (/ (+ b (* 9.0 (* x y))) (* z c)) t_1)))))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 = -4.0 * (a * (t / c));
double tmp;
if (t <= -3.4e+229) {
tmp = t_1;
} else if (t <= -1.55e+62) {
tmp = (b + (t * (z * (a * -4.0)))) / (z * c);
} else if (t <= 4.2e-109) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = t_1;
}
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 = (-4.0d0) * (a * (t / c))
if (t <= (-3.4d+229)) then
tmp = t_1
else if (t <= (-1.55d+62)) then
tmp = (b + (t * (z * (a * (-4.0d0))))) / (z * c)
else if (t <= 4.2d-109) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = t_1
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 = -4.0 * (a * (t / c));
double tmp;
if (t <= -3.4e+229) {
tmp = t_1;
} else if (t <= -1.55e+62) {
tmp = (b + (t * (z * (a * -4.0)))) / (z * c);
} else if (t <= 4.2e-109) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = t_1;
}
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 = -4.0 * (a * (t / c)) tmp = 0 if t <= -3.4e+229: tmp = t_1 elif t <= -1.55e+62: tmp = (b + (t * (z * (a * -4.0)))) / (z * c) elif t <= 4.2e-109: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = t_1 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(-4.0 * Float64(a * Float64(t / c))) tmp = 0.0 if (t <= -3.4e+229) tmp = t_1; elseif (t <= -1.55e+62) tmp = Float64(Float64(b + Float64(t * Float64(z * Float64(a * -4.0)))) / Float64(z * c)); elseif (t <= 4.2e-109) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = t_1; 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 = -4.0 * (a * (t / c));
tmp = 0.0;
if (t <= -3.4e+229)
tmp = t_1;
elseif (t <= -1.55e+62)
tmp = (b + (t * (z * (a * -4.0)))) / (z * c);
elseif (t <= 4.2e-109)
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = t_1;
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[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e+229], t$95$1, If[LessEqual[t, -1.55e+62], N[(N[(b + N[(t * N[(z * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-109], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\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 := -4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+229}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{+62}:\\
\;\;\;\;\frac{b + t \cdot \left(z \cdot \left(a \cdot -4\right)\right)}{z \cdot c}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-109}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.4000000000000001e229 or 4.19999999999999992e-109 < t Initial program 80.7%
associate-+l-80.7%
*-commutative80.7%
associate-*r*81.9%
*-commutative81.9%
associate-+l-81.9%
associate-*l*81.9%
associate-*l*81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in z around inf 81.8%
Taylor expanded in z around inf 46.9%
associate-/l*54.0%
Simplified54.0%
if -3.4000000000000001e229 < t < -1.55000000000000007e62Initial program 76.4%
associate-+l-76.4%
*-commutative76.4%
associate-*r*89.5%
*-commutative89.5%
associate-+l-89.5%
associate-*l*89.4%
associate-*l*84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in t around inf 89.4%
Taylor expanded in x around 0 81.9%
associate-*r*81.9%
Simplified81.9%
if -1.55000000000000007e62 < t < 4.19999999999999992e-109Initial program 83.3%
Simplified82.6%
Taylor expanded in t around 0 78.0%
Final simplification69.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 (<= b -1.78e+208)
(/ (+ (* 9.0 (/ (* x y) c)) (/ b c)) z)
(if (<= b 1.4e-50)
(/ (- (* 9.0 (/ (* x y) z)) (* 4.0 (* a t))) c)
(/ (+ b (* 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 (b <= -1.78e+208) {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
} else if (b <= 1.4e-50) {
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
} else {
tmp = (b + (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 (b <= (-1.78d+208)) then
tmp = ((9.0d0 * ((x * y) / c)) + (b / c)) / z
else if (b <= 1.4d-50) then
tmp = ((9.0d0 * ((x * y) / z)) - (4.0d0 * (a * t))) / c
else
tmp = (b + (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 (b <= -1.78e+208) {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
} else if (b <= 1.4e-50) {
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
} else {
tmp = (b + (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 b <= -1.78e+208: tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z elif b <= 1.4e-50: tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c else: tmp = (b + (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 (b <= -1.78e+208) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / c)) / z); elseif (b <= 1.4e-50) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * 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 (b <= -1.78e+208)
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
elseif (b <= 1.4e-50)
tmp = ((9.0 * ((x * y) / z)) - (4.0 * (a * t))) / c;
else
tmp = (b + (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[b, -1.78e+208], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 1.4e-50], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $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}\;b \leq -1.78 \cdot 10^{+208}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}}{z}\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{-50}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if b < -1.78000000000000004e208Initial program 81.2%
Simplified81.2%
Taylor expanded in z around 0 87.7%
Taylor expanded in a around 0 86.0%
if -1.78000000000000004e208 < b < 1.3999999999999999e-50Initial program 79.2%
associate-+l-79.2%
*-commutative79.2%
associate-*r*81.5%
*-commutative81.5%
associate-+l-81.5%
associate-*l*81.5%
associate-*l*80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in z around inf 78.2%
Taylor expanded in b around 0 80.5%
if 1.3999999999999999e-50 < b Initial program 86.9%
Simplified88.4%
Taylor expanded in t around 0 78.7%
Final simplification80.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 -5.7e+118) (not (<= z 3.7e+180))) (* -4.0 (/ (* a t) c)) (/ (+ b (* 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 ((z <= -5.7e+118) || !(z <= 3.7e+180)) {
tmp = -4.0 * ((a * t) / c);
} else {
tmp = (b + (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 ((z <= (-5.7d+118)) .or. (.not. (z <= 3.7d+180))) then
tmp = (-4.0d0) * ((a * t) / c)
else
tmp = (b + (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 ((z <= -5.7e+118) || !(z <= 3.7e+180)) {
tmp = -4.0 * ((a * t) / c);
} else {
tmp = (b + (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 (z <= -5.7e+118) or not (z <= 3.7e+180): tmp = -4.0 * ((a * t) / c) else: tmp = (b + (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 ((z <= -5.7e+118) || !(z <= 3.7e+180)) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * 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 ((z <= -5.7e+118) || ~((z <= 3.7e+180)))
tmp = -4.0 * ((a * t) / c);
else
tmp = (b + (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[Or[LessEqual[z, -5.7e+118], N[Not[LessEqual[z, 3.7e+180]], $MachinePrecision]], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $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.7 \cdot 10^{+118} \lor \neg \left(z \leq 3.7 \cdot 10^{+180}\right):\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -5.70000000000000002e118 or 3.7000000000000002e180 < z Initial program 50.6%
Simplified58.4%
Taylor expanded in t around inf 71.2%
if -5.70000000000000002e118 < z < 3.7000000000000002e180Initial program 91.3%
Simplified91.4%
Taylor expanded in t around 0 77.3%
Final simplification75.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 -2.2e+87)
(/ (* b (- (/ 1.0 z) (* 4.0 (/ (* a t) b)))) c)
(if (<= z 4.4e+179)
(/ (+ b (* 9.0 (* x y))) (* z c))
(* -4.0 (/ (* a 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 <= -2.2e+87) {
tmp = (b * ((1.0 / z) - (4.0 * ((a * t) / b)))) / c;
} else if (z <= 4.4e+179) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 * ((a * 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 <= (-2.2d+87)) then
tmp = (b * ((1.0d0 / z) - (4.0d0 * ((a * t) / b)))) / c
else if (z <= 4.4d+179) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = (-4.0d0) * ((a * 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 <= -2.2e+87) {
tmp = (b * ((1.0 / z) - (4.0 * ((a * t) / b)))) / c;
} else if (z <= 4.4e+179) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 * ((a * 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 <= -2.2e+87: tmp = (b * ((1.0 / z) - (4.0 * ((a * t) / b)))) / c elif z <= 4.4e+179: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = -4.0 * ((a * 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 <= -2.2e+87) tmp = Float64(Float64(b * Float64(Float64(1.0 / z) - Float64(4.0 * Float64(Float64(a * t) / b)))) / c); elseif (z <= 4.4e+179) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(Float64(a * 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 <= -2.2e+87)
tmp = (b * ((1.0 / z) - (4.0 * ((a * t) / b)))) / c;
elseif (z <= 4.4e+179)
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = -4.0 * ((a * 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, -2.2e+87], N[(N[(b * N[(N[(1.0 / z), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 4.4e+179], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(a * 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 -2.2 \cdot 10^{+87}:\\
\;\;\;\;\frac{b \cdot \left(\frac{1}{z} - 4 \cdot \frac{a \cdot t}{b}\right)}{c}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+179}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if z < -2.2000000000000001e87Initial program 51.5%
associate-+l-51.5%
*-commutative51.5%
associate-*r*53.9%
*-commutative53.9%
associate-+l-53.9%
associate-*l*53.9%
associate-*l*56.1%
*-commutative56.1%
Simplified56.1%
Taylor expanded in b around inf 63.5%
Taylor expanded in c around 0 74.3%
Taylor expanded in x around 0 63.7%
if -2.2000000000000001e87 < z < 4.4000000000000001e179Initial program 93.5%
Simplified93.5%
Taylor expanded in t around 0 79.0%
if 4.4000000000000001e179 < z Initial program 52.8%
Simplified64.6%
Taylor expanded in t around inf 82.5%
Final simplification76.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 (or (<= z -6e-18) (not (<= z 1.7e-62))) (* -4.0 (* a (/ t 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 <= -6e-18) || !(z <= 1.7e-62)) {
tmp = -4.0 * (a * (t / 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 <= (-6d-18)) .or. (.not. (z <= 1.7d-62))) then
tmp = (-4.0d0) * (a * (t / 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 <= -6e-18) || !(z <= 1.7e-62)) {
tmp = -4.0 * (a * (t / 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 <= -6e-18) or not (z <= 1.7e-62): tmp = -4.0 * (a * (t / 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 <= -6e-18) || !(z <= 1.7e-62)) tmp = Float64(-4.0 * Float64(a * Float64(t / 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 <= -6e-18) || ~((z <= 1.7e-62)))
tmp = -4.0 * (a * (t / 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, -6e-18], N[Not[LessEqual[z, 1.7e-62]], $MachinePrecision]], N[(-4.0 * N[(a * N[(t / 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 \cdot 10^{-18} \lor \neg \left(z \leq 1.7 \cdot 10^{-62}\right):\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -5.99999999999999966e-18 or 1.69999999999999994e-62 < z Initial program 68.9%
associate-+l-68.9%
*-commutative68.9%
associate-*r*73.3%
*-commutative73.3%
associate-+l-73.3%
associate-*l*73.3%
associate-*l*73.2%
*-commutative73.2%
Simplified73.2%
Taylor expanded in z around inf 73.2%
Taylor expanded in z around inf 52.1%
associate-/l*49.9%
Simplified49.9%
if -5.99999999999999966e-18 < z < 1.69999999999999994e-62Initial program 95.2%
Simplified94.5%
Taylor expanded in b around inf 57.5%
*-commutative57.5%
Simplified57.5%
Final simplification53.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 -6.5e-18) (* -4.0 (/ (* a t) c)) (if (<= z 4.2e-62) (* b (/ (/ 1.0 c) z)) (* -4.0 (* a (/ 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 <= -6.5e-18) {
tmp = -4.0 * ((a * t) / c);
} else if (z <= 4.2e-62) {
tmp = b * ((1.0 / c) / z);
} else {
tmp = -4.0 * (a * (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 <= (-6.5d-18)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (z <= 4.2d-62) then
tmp = b * ((1.0d0 / c) / z)
else
tmp = (-4.0d0) * (a * (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 <= -6.5e-18) {
tmp = -4.0 * ((a * t) / c);
} else if (z <= 4.2e-62) {
tmp = b * ((1.0 / c) / z);
} else {
tmp = -4.0 * (a * (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 <= -6.5e-18: tmp = -4.0 * ((a * t) / c) elif z <= 4.2e-62: tmp = b * ((1.0 / c) / z) else: tmp = -4.0 * (a * (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 <= -6.5e-18) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (z <= 4.2e-62) tmp = Float64(b * Float64(Float64(1.0 / c) / z)); else tmp = Float64(-4.0 * Float64(a * Float64(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 <= -6.5e-18)
tmp = -4.0 * ((a * t) / c);
elseif (z <= 4.2e-62)
tmp = b * ((1.0 / c) / z);
else
tmp = -4.0 * (a * (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, -6.5e-18], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-62], N[(b * N[(N[(1.0 / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a * N[(t / c), $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 -6.5 \cdot 10^{-18}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-62}:\\
\;\;\;\;b \cdot \frac{\frac{1}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if z < -6.50000000000000008e-18Initial program 64.9%
Simplified66.6%
Taylor expanded in t around inf 46.3%
if -6.50000000000000008e-18 < z < 4.1999999999999998e-62Initial program 95.2%
Simplified94.5%
Taylor expanded in b around inf 57.5%
*-commutative57.5%
Simplified57.5%
div-inv58.3%
*-commutative58.3%
associate-/r*58.3%
Applied egg-rr58.3%
if 4.1999999999999998e-62 < z Initial program 72.2%
associate-+l-72.2%
*-commutative72.2%
associate-*r*78.8%
*-commutative78.8%
associate-+l-78.8%
associate-*l*78.8%
associate-*l*77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in z around inf 77.4%
Taylor expanded in z around inf 56.9%
associate-/l*58.1%
Simplified58.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 (if (<= z -4.6e-18) (* -4.0 (/ (* a t) c)) (if (<= z 3.5e-62) (/ b (* z c)) (* -4.0 (* a (/ 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 <= -4.6e-18) {
tmp = -4.0 * ((a * t) / c);
} else if (z <= 3.5e-62) {
tmp = b / (z * c);
} else {
tmp = -4.0 * (a * (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 <= (-4.6d-18)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (z <= 3.5d-62) then
tmp = b / (z * c)
else
tmp = (-4.0d0) * (a * (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 <= -4.6e-18) {
tmp = -4.0 * ((a * t) / c);
} else if (z <= 3.5e-62) {
tmp = b / (z * c);
} else {
tmp = -4.0 * (a * (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 <= -4.6e-18: tmp = -4.0 * ((a * t) / c) elif z <= 3.5e-62: tmp = b / (z * c) else: tmp = -4.0 * (a * (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 <= -4.6e-18) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (z <= 3.5e-62) tmp = Float64(b / Float64(z * c)); else tmp = Float64(-4.0 * Float64(a * Float64(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 <= -4.6e-18)
tmp = -4.0 * ((a * t) / c);
elseif (z <= 3.5e-62)
tmp = b / (z * c);
else
tmp = -4.0 * (a * (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, -4.6e-18], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e-62], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a * N[(t / c), $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.6 \cdot 10^{-18}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-62}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if z < -4.6000000000000002e-18Initial program 64.9%
Simplified66.6%
Taylor expanded in t around inf 46.3%
if -4.6000000000000002e-18 < z < 3.5000000000000001e-62Initial program 95.2%
Simplified94.5%
Taylor expanded in b around inf 57.5%
*-commutative57.5%
Simplified57.5%
if 3.5000000000000001e-62 < z Initial program 72.2%
associate-+l-72.2%
*-commutative72.2%
associate-*r*78.8%
*-commutative78.8%
associate-+l-78.8%
associate-*l*78.8%
associate-*l*77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in z around inf 77.4%
Taylor expanded in z around inf 56.9%
associate-/l*58.1%
Simplified58.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 (/ 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 81.3%
Simplified83.3%
Taylor expanded in b around inf 39.4%
*-commutative39.4%
Simplified39.4%
(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 2024160
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -220031348160821/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 0) (/ (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 365902434742109/31250000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 28768236795461370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 138385150424563190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (- (+ (* 9 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4 (/ (* a t) c)))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))