
(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.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* z c))))
(if (<= z -4e+81)
(fma (* (/ a c) t) -4.0 (fma 9.0 (* (/ x z) (/ y c)) t_1))
(if (<= z 7.8e-38)
(/ 1.0 (/ z (/ (+ b (fma x (* 9.0 y) (* (* z a) (* t -4.0)))) c)))
(- (+ t_1 (* 9.0 (/ (* x y) (* z c)))) (* 4.0 (/ (* a t) 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 = b / (z * c);
double tmp;
if (z <= -4e+81) {
tmp = fma(((a / c) * t), -4.0, fma(9.0, ((x / z) * (y / c)), t_1));
} else if (z <= 7.8e-38) {
tmp = 1.0 / (z / ((b + fma(x, (9.0 * y), ((z * a) * (t * -4.0)))) / c));
} else {
tmp = (t_1 + (9.0 * ((x * y) / (z * c)))) - (4.0 * ((a * t) / c));
}
return tmp;
}
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(b / Float64(z * c)) tmp = 0.0 if (z <= -4e+81) tmp = fma(Float64(Float64(a / c) * t), -4.0, fma(9.0, Float64(Float64(x / z) * Float64(y / c)), t_1)); elseif (z <= 7.8e-38) tmp = Float64(1.0 / Float64(z / Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(Float64(z * a) * Float64(t * -4.0)))) / c))); else tmp = Float64(Float64(t_1 + Float64(9.0 * Float64(Float64(x * y) / Float64(z * c)))) - Float64(4.0 * Float64(Float64(a * t) / c))); end return tmp end
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[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+81], N[(N[(N[(a / c), $MachinePrecision] * t), $MachinePrecision] * -4.0 + N[(9.0 * N[(N[(x / z), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e-38], N[(1.0 / N[(z / N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+81}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{c} \cdot t, -4, \mathsf{fma}\left(9, \frac{x}{z} \cdot \frac{y}{c}, t\_1\right)\right)\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{-38}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{b + \mathsf{fma}\left(x, 9 \cdot y, \left(z \cdot a\right) \cdot \left(t \cdot -4\right)\right)}{c}}}\\
\mathbf{else}:\\
\;\;\;\;\left(t\_1 + 9 \cdot \frac{x \cdot y}{z \cdot c}\right) - 4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if z < -3.99999999999999969e81Initial program 54.2%
associate-+l-54.2%
*-commutative54.2%
associate-*r*53.9%
*-commutative53.9%
associate-+l-53.9%
*-commutative53.9%
associate-*r*54.2%
*-commutative54.2%
associate-*l*54.2%
associate-*l*59.9%
Simplified59.9%
Taylor expanded in x around 0 78.9%
cancel-sign-sub-inv78.9%
metadata-eval78.9%
+-commutative78.9%
*-commutative78.9%
fma-def78.9%
associate-/l*79.0%
associate-/r/77.1%
fma-def77.1%
*-commutative77.1%
times-frac86.7%
*-commutative86.7%
Simplified86.7%
if -3.99999999999999969e81 < z < 7.7999999999999998e-38Initial program 96.7%
associate-+l-96.7%
*-commutative96.7%
associate-*r*96.9%
*-commutative96.9%
associate-+l-96.9%
*-commutative96.9%
associate-*r*96.7%
*-commutative96.7%
associate-*l*96.7%
associate-*l*90.8%
Simplified90.8%
Applied egg-rr97.0%
*-commutative97.0%
clear-num96.9%
frac-times97.0%
metadata-eval97.0%
Applied egg-rr97.0%
*-commutative97.0%
clear-num97.0%
un-div-inv97.1%
associate-*r*97.1%
Applied egg-rr97.1%
if 7.7999999999999998e-38 < z Initial program 73.5%
associate-+l-73.5%
*-commutative73.5%
associate-*r*70.2%
*-commutative70.2%
associate-+l-70.2%
*-commutative70.2%
associate-*r*73.5%
*-commutative73.5%
associate-*l*73.4%
associate-*l*74.9%
Simplified74.9%
Taylor expanded in x around 0 91.1%
Final simplification93.5%
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 -8e+137)
(/ (+ (* -4.0 (* a t)) (/ b z)) c)
(if (<= z 7.6e-39)
(/ (/ (+ b (fma x (* 9.0 y) (* a (* z (* t -4.0))))) c) z)
(- (+ (/ b (* z c)) (* 9.0 (/ (* x y) (* z c)))) (* 4.0 (/ (* a t) 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 <= -8e+137) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else if (z <= 7.6e-39) {
tmp = ((b + fma(x, (9.0 * y), (a * (z * (t * -4.0))))) / c) / z;
} else {
tmp = ((b / (z * c)) + (9.0 * ((x * y) / (z * c)))) - (4.0 * ((a * t) / c));
}
return tmp;
}
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 <= -8e+137) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); elseif (z <= 7.6e-39) tmp = Float64(Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(a * Float64(z * Float64(t * -4.0))))) / c) / z); else tmp = Float64(Float64(Float64(b / Float64(z * c)) + Float64(9.0 * Float64(Float64(x * y) / Float64(z * c)))) - Float64(4.0 * Float64(Float64(a * t) / c))); end return tmp end
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, -8e+137], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 7.6e-39], N[(N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(a * N[(z * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+137}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-39}:\\
\;\;\;\;\frac{\frac{b + \mathsf{fma}\left(x, 9 \cdot y, a \cdot \left(z \cdot \left(t \cdot -4\right)\right)\right)}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{x \cdot y}{z \cdot c}\right) - 4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if z < -8.0000000000000003e137Initial program 44.7%
associate-+l-44.7%
*-commutative44.7%
associate-*r*41.6%
*-commutative41.6%
associate-+l-41.6%
*-commutative41.6%
associate-*r*44.7%
*-commutative44.7%
associate-*l*44.7%
associate-*l*49.9%
Simplified49.9%
Taylor expanded in x around 0 42.6%
Taylor expanded in b around 0 76.6%
Taylor expanded in c around 0 79.3%
if -8.0000000000000003e137 < z < 7.6000000000000004e-39Initial program 95.1%
associate-+l-95.1%
*-commutative95.1%
associate-*r*95.9%
*-commutative95.9%
associate-+l-95.9%
*-commutative95.9%
associate-*r*95.1%
*-commutative95.1%
associate-*l*95.1%
associate-*l*90.4%
Simplified90.4%
Applied egg-rr95.9%
associate-*l/96.0%
*-un-lft-identity96.0%
Applied egg-rr96.0%
if 7.6000000000000004e-39 < z Initial program 73.5%
associate-+l-73.5%
*-commutative73.5%
associate-*r*70.2%
*-commutative70.2%
associate-+l-70.2%
*-commutative70.2%
associate-*r*73.5%
*-commutative73.5%
associate-*l*73.4%
associate-*l*74.9%
Simplified74.9%
Taylor expanded in x around 0 91.1%
Final simplification92.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* (/ a c) t) -4.0)) (t_2 (* (* 9.0 x) (/ (/ y c) z))))
(if (<= a -5.4e-32)
t_1
(if (<= a -1.7e-203)
(/ (/ b z) c)
(if (<= a 2.8e-63)
t_2
(if (<= a 1.46e-36)
(/ b (* z c))
(if (<= a 3.5e-8)
(* 9.0 (/ (* x y) (* z c)))
(if (<= a 1.8e+52) (/ (/ b c) z) (if (<= a 8e+90) t_2 t_1)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((a / c) * t) * -4.0;
double t_2 = (9.0 * x) * ((y / c) / z);
double tmp;
if (a <= -5.4e-32) {
tmp = t_1;
} else if (a <= -1.7e-203) {
tmp = (b / z) / c;
} else if (a <= 2.8e-63) {
tmp = t_2;
} else if (a <= 1.46e-36) {
tmp = b / (z * c);
} else if (a <= 3.5e-8) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (a <= 1.8e+52) {
tmp = (b / c) / z;
} else if (a <= 8e+90) {
tmp = t_2;
} 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.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a / c) * t) * (-4.0d0)
t_2 = (9.0d0 * x) * ((y / c) / z)
if (a <= (-5.4d-32)) then
tmp = t_1
else if (a <= (-1.7d-203)) then
tmp = (b / z) / c
else if (a <= 2.8d-63) then
tmp = t_2
else if (a <= 1.46d-36) then
tmp = b / (z * c)
else if (a <= 3.5d-8) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (a <= 1.8d+52) then
tmp = (b / c) / z
else if (a <= 8d+90) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((a / c) * t) * -4.0;
double t_2 = (9.0 * x) * ((y / c) / z);
double tmp;
if (a <= -5.4e-32) {
tmp = t_1;
} else if (a <= -1.7e-203) {
tmp = (b / z) / c;
} else if (a <= 2.8e-63) {
tmp = t_2;
} else if (a <= 1.46e-36) {
tmp = b / (z * c);
} else if (a <= 3.5e-8) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (a <= 1.8e+52) {
tmp = (b / c) / z;
} else if (a <= 8e+90) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = ((a / c) * t) * -4.0 t_2 = (9.0 * x) * ((y / c) / z) tmp = 0 if a <= -5.4e-32: tmp = t_1 elif a <= -1.7e-203: tmp = (b / z) / c elif a <= 2.8e-63: tmp = t_2 elif a <= 1.46e-36: tmp = b / (z * c) elif a <= 3.5e-8: tmp = 9.0 * ((x * y) / (z * c)) elif a <= 1.8e+52: tmp = (b / c) / z elif a <= 8e+90: tmp = t_2 else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(a / c) * t) * -4.0) t_2 = Float64(Float64(9.0 * x) * Float64(Float64(y / c) / z)) tmp = 0.0 if (a <= -5.4e-32) tmp = t_1; elseif (a <= -1.7e-203) tmp = Float64(Float64(b / z) / c); elseif (a <= 2.8e-63) tmp = t_2; elseif (a <= 1.46e-36) tmp = Float64(b / Float64(z * c)); elseif (a <= 3.5e-8) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (a <= 1.8e+52) tmp = Float64(Float64(b / c) / z); elseif (a <= 8e+90) tmp = t_2; else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = ((a / c) * t) * -4.0;
t_2 = (9.0 * x) * ((y / c) / z);
tmp = 0.0;
if (a <= -5.4e-32)
tmp = t_1;
elseif (a <= -1.7e-203)
tmp = (b / z) / c;
elseif (a <= 2.8e-63)
tmp = t_2;
elseif (a <= 1.46e-36)
tmp = b / (z * c);
elseif (a <= 3.5e-8)
tmp = 9.0 * ((x * y) / (z * c));
elseif (a <= 1.8e+52)
tmp = (b / c) / z;
elseif (a <= 8e+90)
tmp = t_2;
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.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(a / c), $MachinePrecision] * t), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(9.0 * x), $MachinePrecision] * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.4e-32], t$95$1, If[LessEqual[a, -1.7e-203], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[a, 2.8e-63], t$95$2, If[LessEqual[a, 1.46e-36], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.5e-8], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.8e+52], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 8e+90], t$95$2, t$95$1]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \left(\frac{a}{c} \cdot t\right) \cdot -4\\
t_2 := \left(9 \cdot x\right) \cdot \frac{\frac{y}{c}}{z}\\
\mathbf{if}\;a \leq -5.4 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{-203}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-63}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.46 \cdot 10^{-36}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{-8}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{+52}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;a \leq 8 \cdot 10^{+90}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.39999999999999962e-32 or 7.99999999999999973e90 < a Initial program 79.1%
associate-+l-79.1%
*-commutative79.1%
associate-*r*73.9%
*-commutative73.9%
associate-+l-73.9%
*-commutative73.9%
associate-*r*79.1%
*-commutative79.1%
associate-*l*79.1%
associate-*l*72.6%
Simplified72.6%
Taylor expanded in z around inf 54.3%
*-commutative54.3%
associate-/l*60.0%
associate-/r/63.4%
Simplified63.4%
if -5.39999999999999962e-32 < a < -1.6999999999999999e-203Initial program 81.0%
associate-+l-81.0%
*-commutative81.0%
associate-*r*83.7%
*-commutative83.7%
associate-+l-83.7%
*-commutative83.7%
associate-*r*81.0%
*-commutative81.0%
associate-*l*81.0%
associate-*l*83.7%
Simplified83.7%
Applied egg-rr78.5%
Taylor expanded in b around inf 51.6%
associate-/l/54.0%
Simplified54.0%
if -1.6999999999999999e-203 < a < 2.8000000000000002e-63 or 1.8e52 < a < 7.99999999999999973e90Initial program 88.7%
associate-+l-88.7%
*-commutative88.7%
associate-*r*92.3%
*-commutative92.3%
associate-+l-92.3%
*-commutative92.3%
associate-*r*88.7%
*-commutative88.7%
associate-*l*88.6%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in x around inf 51.6%
associate-*r/51.6%
*-commutative51.6%
Applied egg-rr51.6%
Taylor expanded in x around 0 51.6%
associate-*r/51.6%
*-commutative51.6%
*-commutative51.6%
associate-*r*51.6%
associate-*l/48.1%
*-commutative48.1%
*-commutative48.1%
associate-/r*48.4%
Simplified48.4%
if 2.8000000000000002e-63 < a < 1.4599999999999999e-36Initial program 74.6%
associate-+l-74.6%
*-commutative74.6%
associate-*r*74.6%
*-commutative74.6%
associate-+l-74.6%
*-commutative74.6%
associate-*r*74.6%
*-commutative74.6%
associate-*l*74.6%
associate-*l*74.2%
Simplified74.2%
Taylor expanded in b around inf 32.9%
*-commutative32.9%
Simplified32.9%
if 1.4599999999999999e-36 < a < 3.50000000000000024e-8Initial program 68.5%
associate-+l-68.5%
*-commutative68.5%
associate-*r*68.3%
*-commutative68.3%
associate-+l-68.3%
*-commutative68.3%
associate-*r*68.5%
*-commutative68.5%
associate-*l*68.5%
associate-*l*68.5%
Simplified68.5%
Taylor expanded in x around inf 57.0%
if 3.50000000000000024e-8 < a < 1.8e52Initial program 85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*85.8%
*-commutative85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*85.8%
*-commutative85.8%
associate-*l*85.8%
associate-*l*85.9%
Simplified85.9%
Applied egg-rr79.2%
Taylor expanded in b around inf 72.7%
associate-/l/66.5%
Simplified66.5%
Taylor expanded in b around 0 72.7%
associate-/r*66.0%
Simplified66.0%
Final simplification56.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* (/ a c) t) -4.0)))
(if (<= a -1.92e-31)
t_1
(if (<= a -2.02e-218)
(/ (/ b z) c)
(if (<= a 2.1e-62)
(* (* 9.0 x) (/ (/ y z) c))
(if (<= a 3.15e-36)
(/ b (* z c))
(if (<= a 3.6e-8)
(* 9.0 (/ (* x y) (* z c)))
(if (<= a 4.2e+50)
(/ (/ b c) z)
(if (<= a 4.2e+90) (* (* 9.0 x) (/ (/ y c) z)) t_1)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((a / c) * t) * -4.0;
double tmp;
if (a <= -1.92e-31) {
tmp = t_1;
} else if (a <= -2.02e-218) {
tmp = (b / z) / c;
} else if (a <= 2.1e-62) {
tmp = (9.0 * x) * ((y / z) / c);
} else if (a <= 3.15e-36) {
tmp = b / (z * c);
} else if (a <= 3.6e-8) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (a <= 4.2e+50) {
tmp = (b / c) / z;
} else if (a <= 4.2e+90) {
tmp = (9.0 * x) * ((y / c) / z);
} 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.
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 = ((a / c) * t) * (-4.0d0)
if (a <= (-1.92d-31)) then
tmp = t_1
else if (a <= (-2.02d-218)) then
tmp = (b / z) / c
else if (a <= 2.1d-62) then
tmp = (9.0d0 * x) * ((y / z) / c)
else if (a <= 3.15d-36) then
tmp = b / (z * c)
else if (a <= 3.6d-8) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (a <= 4.2d+50) then
tmp = (b / c) / z
else if (a <= 4.2d+90) then
tmp = (9.0d0 * x) * ((y / c) / z)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((a / c) * t) * -4.0;
double tmp;
if (a <= -1.92e-31) {
tmp = t_1;
} else if (a <= -2.02e-218) {
tmp = (b / z) / c;
} else if (a <= 2.1e-62) {
tmp = (9.0 * x) * ((y / z) / c);
} else if (a <= 3.15e-36) {
tmp = b / (z * c);
} else if (a <= 3.6e-8) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (a <= 4.2e+50) {
tmp = (b / c) / z;
} else if (a <= 4.2e+90) {
tmp = (9.0 * x) * ((y / c) / z);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = ((a / c) * t) * -4.0 tmp = 0 if a <= -1.92e-31: tmp = t_1 elif a <= -2.02e-218: tmp = (b / z) / c elif a <= 2.1e-62: tmp = (9.0 * x) * ((y / z) / c) elif a <= 3.15e-36: tmp = b / (z * c) elif a <= 3.6e-8: tmp = 9.0 * ((x * y) / (z * c)) elif a <= 4.2e+50: tmp = (b / c) / z elif a <= 4.2e+90: tmp = (9.0 * x) * ((y / c) / z) else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(a / c) * t) * -4.0) tmp = 0.0 if (a <= -1.92e-31) tmp = t_1; elseif (a <= -2.02e-218) tmp = Float64(Float64(b / z) / c); elseif (a <= 2.1e-62) tmp = Float64(Float64(9.0 * x) * Float64(Float64(y / z) / c)); elseif (a <= 3.15e-36) tmp = Float64(b / Float64(z * c)); elseif (a <= 3.6e-8) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (a <= 4.2e+50) tmp = Float64(Float64(b / c) / z); elseif (a <= 4.2e+90) tmp = Float64(Float64(9.0 * x) * Float64(Float64(y / c) / z)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = ((a / c) * t) * -4.0;
tmp = 0.0;
if (a <= -1.92e-31)
tmp = t_1;
elseif (a <= -2.02e-218)
tmp = (b / z) / c;
elseif (a <= 2.1e-62)
tmp = (9.0 * x) * ((y / z) / c);
elseif (a <= 3.15e-36)
tmp = b / (z * c);
elseif (a <= 3.6e-8)
tmp = 9.0 * ((x * y) / (z * c));
elseif (a <= 4.2e+50)
tmp = (b / c) / z;
elseif (a <= 4.2e+90)
tmp = (9.0 * x) * ((y / c) / z);
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.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(a / c), $MachinePrecision] * t), $MachinePrecision] * -4.0), $MachinePrecision]}, If[LessEqual[a, -1.92e-31], t$95$1, If[LessEqual[a, -2.02e-218], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[a, 2.1e-62], N[(N[(9.0 * x), $MachinePrecision] * N[(N[(y / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.15e-36], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e-8], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.2e+50], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 4.2e+90], N[(N[(9.0 * x), $MachinePrecision] * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \left(\frac{a}{c} \cdot t\right) \cdot -4\\
\mathbf{if}\;a \leq -1.92 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.02 \cdot 10^{-218}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{-62}:\\
\;\;\;\;\left(9 \cdot x\right) \cdot \frac{\frac{y}{z}}{c}\\
\mathbf{elif}\;a \leq 3.15 \cdot 10^{-36}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-8}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{+50}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{+90}:\\
\;\;\;\;\left(9 \cdot x\right) \cdot \frac{\frac{y}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.9200000000000001e-31 or 4.19999999999999961e90 < a Initial program 79.1%
associate-+l-79.1%
*-commutative79.1%
associate-*r*73.9%
*-commutative73.9%
associate-+l-73.9%
*-commutative73.9%
associate-*r*79.1%
*-commutative79.1%
associate-*l*79.1%
associate-*l*72.6%
Simplified72.6%
Taylor expanded in z around inf 54.3%
*-commutative54.3%
associate-/l*60.0%
associate-/r/63.4%
Simplified63.4%
if -1.9200000000000001e-31 < a < -2.02e-218Initial program 83.3%
associate-+l-83.3%
*-commutative83.3%
associate-*r*85.7%
*-commutative85.7%
associate-+l-85.7%
*-commutative85.7%
associate-*r*83.3%
*-commutative83.3%
associate-*l*83.3%
associate-*l*85.7%
Simplified85.7%
Applied egg-rr81.0%
Taylor expanded in b around inf 50.6%
associate-/l/52.7%
Simplified52.7%
if -2.02e-218 < a < 2.0999999999999999e-62Initial program 87.7%
associate-+l-87.7%
*-commutative87.7%
associate-*r*92.1%
*-commutative92.1%
associate-+l-92.1%
*-commutative92.1%
associate-*r*87.7%
*-commutative87.7%
associate-*l*87.6%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in x around inf 51.4%
associate-*r/51.3%
*-commutative51.3%
Applied egg-rr51.3%
Taylor expanded in x around 0 51.4%
associate-*r/51.3%
*-commutative51.3%
*-commutative51.3%
associate-*r*51.4%
associate-*l/48.6%
*-commutative48.6%
*-commutative48.6%
associate-/r*50.4%
Simplified50.4%
Taylor expanded in y around 0 48.6%
*-commutative48.6%
associate-/r*49.2%
Simplified49.2%
if 2.0999999999999999e-62 < a < 3.15e-36Initial program 74.6%
associate-+l-74.6%
*-commutative74.6%
associate-*r*74.6%
*-commutative74.6%
associate-+l-74.6%
*-commutative74.6%
associate-*r*74.6%
*-commutative74.6%
associate-*l*74.6%
associate-*l*74.2%
Simplified74.2%
Taylor expanded in b around inf 32.9%
*-commutative32.9%
Simplified32.9%
if 3.15e-36 < a < 3.59999999999999981e-8Initial program 68.5%
associate-+l-68.5%
*-commutative68.5%
associate-*r*68.3%
*-commutative68.3%
associate-+l-68.3%
*-commutative68.3%
associate-*r*68.5%
*-commutative68.5%
associate-*l*68.5%
associate-*l*68.5%
Simplified68.5%
Taylor expanded in x around inf 57.0%
if 3.59999999999999981e-8 < a < 4.1999999999999999e50Initial program 85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*85.8%
*-commutative85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*85.8%
*-commutative85.8%
associate-*l*85.8%
associate-*l*85.9%
Simplified85.9%
Applied egg-rr79.2%
Taylor expanded in b around inf 72.7%
associate-/l/66.5%
Simplified66.5%
Taylor expanded in b around 0 72.7%
associate-/r*66.0%
Simplified66.0%
if 4.1999999999999999e50 < a < 4.19999999999999961e90Initial program 90.1%
associate-+l-90.1%
*-commutative90.1%
associate-*r*90.0%
*-commutative90.0%
associate-+l-90.0%
*-commutative90.0%
associate-*r*90.1%
*-commutative90.1%
associate-*l*90.2%
associate-*l*80.6%
Simplified80.6%
Taylor expanded in x around inf 48.6%
associate-*r/48.6%
*-commutative48.6%
Applied egg-rr48.6%
Taylor expanded in x around 0 48.6%
associate-*r/48.6%
*-commutative48.6%
*-commutative48.6%
associate-*r*48.5%
associate-*l/38.5%
*-commutative38.5%
*-commutative38.5%
associate-/r*28.9%
Simplified28.9%
Final simplification56.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* (/ a c) t) -4.0)) (t_2 (* 9.0 (* (/ x z) (/ y c)))))
(if (<= a -5.2e-32)
t_1
(if (<= a -2.05e-257)
(/ (/ b z) c)
(if (<= a 3.2e-63)
t_2
(if (<= a 1.2e-37)
(/ b (* z c))
(if (<= a 5.8e-9) t_2 (if (<= a 7.4e+49) (/ (/ b c) z) t_1))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((a / c) * t) * -4.0;
double t_2 = 9.0 * ((x / z) * (y / c));
double tmp;
if (a <= -5.2e-32) {
tmp = t_1;
} else if (a <= -2.05e-257) {
tmp = (b / z) / c;
} else if (a <= 3.2e-63) {
tmp = t_2;
} else if (a <= 1.2e-37) {
tmp = b / (z * c);
} else if (a <= 5.8e-9) {
tmp = t_2;
} else if (a <= 7.4e+49) {
tmp = (b / c) / z;
} 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.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a / c) * t) * (-4.0d0)
t_2 = 9.0d0 * ((x / z) * (y / c))
if (a <= (-5.2d-32)) then
tmp = t_1
else if (a <= (-2.05d-257)) then
tmp = (b / z) / c
else if (a <= 3.2d-63) then
tmp = t_2
else if (a <= 1.2d-37) then
tmp = b / (z * c)
else if (a <= 5.8d-9) then
tmp = t_2
else if (a <= 7.4d+49) then
tmp = (b / c) / z
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((a / c) * t) * -4.0;
double t_2 = 9.0 * ((x / z) * (y / c));
double tmp;
if (a <= -5.2e-32) {
tmp = t_1;
} else if (a <= -2.05e-257) {
tmp = (b / z) / c;
} else if (a <= 3.2e-63) {
tmp = t_2;
} else if (a <= 1.2e-37) {
tmp = b / (z * c);
} else if (a <= 5.8e-9) {
tmp = t_2;
} else if (a <= 7.4e+49) {
tmp = (b / c) / z;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = ((a / c) * t) * -4.0 t_2 = 9.0 * ((x / z) * (y / c)) tmp = 0 if a <= -5.2e-32: tmp = t_1 elif a <= -2.05e-257: tmp = (b / z) / c elif a <= 3.2e-63: tmp = t_2 elif a <= 1.2e-37: tmp = b / (z * c) elif a <= 5.8e-9: tmp = t_2 elif a <= 7.4e+49: tmp = (b / c) / z else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(a / c) * t) * -4.0) t_2 = Float64(9.0 * Float64(Float64(x / z) * Float64(y / c))) tmp = 0.0 if (a <= -5.2e-32) tmp = t_1; elseif (a <= -2.05e-257) tmp = Float64(Float64(b / z) / c); elseif (a <= 3.2e-63) tmp = t_2; elseif (a <= 1.2e-37) tmp = Float64(b / Float64(z * c)); elseif (a <= 5.8e-9) tmp = t_2; elseif (a <= 7.4e+49) tmp = Float64(Float64(b / c) / z); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = ((a / c) * t) * -4.0;
t_2 = 9.0 * ((x / z) * (y / c));
tmp = 0.0;
if (a <= -5.2e-32)
tmp = t_1;
elseif (a <= -2.05e-257)
tmp = (b / z) / c;
elseif (a <= 3.2e-63)
tmp = t_2;
elseif (a <= 1.2e-37)
tmp = b / (z * c);
elseif (a <= 5.8e-9)
tmp = t_2;
elseif (a <= 7.4e+49)
tmp = (b / c) / z;
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.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(a / c), $MachinePrecision] * t), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(N[(x / z), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.2e-32], t$95$1, If[LessEqual[a, -2.05e-257], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[a, 3.2e-63], t$95$2, If[LessEqual[a, 1.2e-37], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.8e-9], t$95$2, If[LessEqual[a, 7.4e+49], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \left(\frac{a}{c} \cdot t\right) \cdot -4\\
t_2 := 9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\
\mathbf{if}\;a \leq -5.2 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.05 \cdot 10^{-257}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-63}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-37}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-9}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 7.4 \cdot 10^{+49}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.1999999999999995e-32 or 7.40000000000000036e49 < a Initial program 80.0%
associate-+l-80.0%
*-commutative80.0%
associate-*r*75.2%
*-commutative75.2%
associate-+l-75.2%
*-commutative75.2%
associate-*r*80.0%
*-commutative80.0%
associate-*l*80.0%
associate-*l*73.3%
Simplified73.3%
Taylor expanded in z around inf 52.4%
*-commutative52.4%
associate-/l*58.5%
associate-/r/61.6%
Simplified61.6%
if -5.1999999999999995e-32 < a < -2.0499999999999998e-257Initial program 86.5%
associate-+l-86.5%
*-commutative86.5%
associate-*r*88.4%
*-commutative88.4%
associate-+l-88.4%
*-commutative88.4%
associate-*r*86.5%
*-commutative86.5%
associate-*l*86.5%
associate-*l*88.4%
Simplified88.4%
Applied egg-rr85.3%
Taylor expanded in b around inf 54.0%
associate-/l/56.1%
Simplified56.1%
if -2.0499999999999998e-257 < a < 3.19999999999999989e-63 or 1.19999999999999995e-37 < a < 5.79999999999999982e-9Initial program 82.8%
associate-+l-82.8%
*-commutative82.8%
associate-*r*87.5%
*-commutative87.5%
associate-+l-87.5%
*-commutative87.5%
associate-*r*82.8%
*-commutative82.8%
associate-*l*82.7%
associate-*l*87.4%
Simplified87.4%
Taylor expanded in x around inf 51.4%
*-commutative51.4%
frac-times52.9%
Applied egg-rr52.9%
if 3.19999999999999989e-63 < a < 1.19999999999999995e-37Initial program 74.6%
associate-+l-74.6%
*-commutative74.6%
associate-*r*74.6%
*-commutative74.6%
associate-+l-74.6%
*-commutative74.6%
associate-*r*74.6%
*-commutative74.6%
associate-*l*74.6%
associate-*l*74.2%
Simplified74.2%
Taylor expanded in b around inf 32.9%
*-commutative32.9%
Simplified32.9%
if 5.79999999999999982e-9 < a < 7.40000000000000036e49Initial program 86.6%
associate-+l-86.6%
*-commutative86.6%
associate-*r*86.6%
*-commutative86.6%
associate-+l-86.6%
*-commutative86.6%
associate-*r*86.6%
*-commutative86.6%
associate-*l*86.6%
associate-*l*86.7%
Simplified86.7%
Applied egg-rr80.5%
Taylor expanded in b around inf 68.1%
associate-/l/62.3%
Simplified62.3%
Taylor expanded in b around 0 68.1%
associate-/r*61.8%
Simplified61.8%
Final simplification57.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* (/ a c) t) -4.0)))
(if (<= a -1.55e-29)
t_1
(if (<= a -2.9e-257)
(/ (/ b z) c)
(if (<= a 1e-62)
(* 9.0 (* (/ x z) (/ y c)))
(if (<= a 3.6e-36)
(/ b (* z c))
(if (<= a 1.6e-8)
(* 9.0 (/ (* x y) (* z c)))
(if (<= a 3.5e+48) (/ (/ b c) z) t_1))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((a / c) * t) * -4.0;
double tmp;
if (a <= -1.55e-29) {
tmp = t_1;
} else if (a <= -2.9e-257) {
tmp = (b / z) / c;
} else if (a <= 1e-62) {
tmp = 9.0 * ((x / z) * (y / c));
} else if (a <= 3.6e-36) {
tmp = b / (z * c);
} else if (a <= 1.6e-8) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (a <= 3.5e+48) {
tmp = (b / c) / z;
} 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.
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 = ((a / c) * t) * (-4.0d0)
if (a <= (-1.55d-29)) then
tmp = t_1
else if (a <= (-2.9d-257)) then
tmp = (b / z) / c
else if (a <= 1d-62) then
tmp = 9.0d0 * ((x / z) * (y / c))
else if (a <= 3.6d-36) then
tmp = b / (z * c)
else if (a <= 1.6d-8) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (a <= 3.5d+48) then
tmp = (b / c) / z
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((a / c) * t) * -4.0;
double tmp;
if (a <= -1.55e-29) {
tmp = t_1;
} else if (a <= -2.9e-257) {
tmp = (b / z) / c;
} else if (a <= 1e-62) {
tmp = 9.0 * ((x / z) * (y / c));
} else if (a <= 3.6e-36) {
tmp = b / (z * c);
} else if (a <= 1.6e-8) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (a <= 3.5e+48) {
tmp = (b / c) / z;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = ((a / c) * t) * -4.0 tmp = 0 if a <= -1.55e-29: tmp = t_1 elif a <= -2.9e-257: tmp = (b / z) / c elif a <= 1e-62: tmp = 9.0 * ((x / z) * (y / c)) elif a <= 3.6e-36: tmp = b / (z * c) elif a <= 1.6e-8: tmp = 9.0 * ((x * y) / (z * c)) elif a <= 3.5e+48: tmp = (b / c) / z else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(a / c) * t) * -4.0) tmp = 0.0 if (a <= -1.55e-29) tmp = t_1; elseif (a <= -2.9e-257) tmp = Float64(Float64(b / z) / c); elseif (a <= 1e-62) tmp = Float64(9.0 * Float64(Float64(x / z) * Float64(y / c))); elseif (a <= 3.6e-36) tmp = Float64(b / Float64(z * c)); elseif (a <= 1.6e-8) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (a <= 3.5e+48) tmp = Float64(Float64(b / c) / z); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = ((a / c) * t) * -4.0;
tmp = 0.0;
if (a <= -1.55e-29)
tmp = t_1;
elseif (a <= -2.9e-257)
tmp = (b / z) / c;
elseif (a <= 1e-62)
tmp = 9.0 * ((x / z) * (y / c));
elseif (a <= 3.6e-36)
tmp = b / (z * c);
elseif (a <= 1.6e-8)
tmp = 9.0 * ((x * y) / (z * c));
elseif (a <= 3.5e+48)
tmp = (b / c) / z;
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.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(a / c), $MachinePrecision] * t), $MachinePrecision] * -4.0), $MachinePrecision]}, If[LessEqual[a, -1.55e-29], t$95$1, If[LessEqual[a, -2.9e-257], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[a, 1e-62], N[(9.0 * N[(N[(x / z), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e-36], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e-8], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.5e+48], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \left(\frac{a}{c} \cdot t\right) \cdot -4\\
\mathbf{if}\;a \leq -1.55 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.9 \cdot 10^{-257}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;a \leq 10^{-62}:\\
\;\;\;\;9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-36}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-8}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{+48}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.55000000000000013e-29 or 3.4999999999999997e48 < a Initial program 80.0%
associate-+l-80.0%
*-commutative80.0%
associate-*r*75.2%
*-commutative75.2%
associate-+l-75.2%
*-commutative75.2%
associate-*r*80.0%
*-commutative80.0%
associate-*l*80.0%
associate-*l*73.3%
Simplified73.3%
Taylor expanded in z around inf 52.4%
*-commutative52.4%
associate-/l*58.5%
associate-/r/61.6%
Simplified61.6%
if -1.55000000000000013e-29 < a < -2.9000000000000002e-257Initial program 86.5%
associate-+l-86.5%
*-commutative86.5%
associate-*r*88.4%
*-commutative88.4%
associate-+l-88.4%
*-commutative88.4%
associate-*r*86.5%
*-commutative86.5%
associate-*l*86.5%
associate-*l*88.4%
Simplified88.4%
Applied egg-rr85.3%
Taylor expanded in b around inf 54.0%
associate-/l/56.1%
Simplified56.1%
if -2.9000000000000002e-257 < a < 1e-62Initial program 85.5%
associate-+l-85.5%
*-commutative85.5%
associate-*r*90.9%
*-commutative90.9%
associate-+l-90.9%
*-commutative90.9%
associate-*r*85.5%
*-commutative85.5%
associate-*l*85.3%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in x around inf 51.3%
*-commutative51.3%
frac-times54.7%
Applied egg-rr54.7%
if 1e-62 < a < 3.60000000000000032e-36Initial program 74.6%
associate-+l-74.6%
*-commutative74.6%
associate-*r*74.6%
*-commutative74.6%
associate-+l-74.6%
*-commutative74.6%
associate-*r*74.6%
*-commutative74.6%
associate-*l*74.6%
associate-*l*74.2%
Simplified74.2%
Taylor expanded in b around inf 32.9%
*-commutative32.9%
Simplified32.9%
if 3.60000000000000032e-36 < a < 1.6000000000000001e-8Initial program 68.5%
associate-+l-68.5%
*-commutative68.5%
associate-*r*68.3%
*-commutative68.3%
associate-+l-68.3%
*-commutative68.3%
associate-*r*68.5%
*-commutative68.5%
associate-*l*68.5%
associate-*l*68.5%
Simplified68.5%
Taylor expanded in x around inf 57.0%
if 1.6000000000000001e-8 < a < 3.4999999999999997e48Initial program 85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*85.8%
*-commutative85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*85.8%
*-commutative85.8%
associate-*l*85.8%
associate-*l*85.9%
Simplified85.9%
Applied egg-rr79.2%
Taylor expanded in b around inf 72.7%
associate-/l/66.5%
Simplified66.5%
Taylor expanded in b around 0 72.7%
associate-/r*66.0%
Simplified66.0%
Final simplification58.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -1.15e+139)
(/ (+ (* -4.0 (* a t)) (/ b z)) c)
(if (<= z 20.0)
(/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))
(- (+ (/ b (* z c)) (* 9.0 (/ (* x y) (* z c)))) (* 4.0 (/ (* a t) 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.15e+139) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else if (z <= 20.0) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = ((b / (z * c)) + (9.0 * ((x * y) / (z * c)))) - (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.
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.15d+139)) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else if (z <= 20.0d0) then
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
else
tmp = ((b / (z * c)) + (9.0d0 * ((x * y) / (z * c)))) - (4.0d0 * ((a * t) / c))
end if
code = tmp
end function
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.15e+139) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else if (z <= 20.0) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = ((b / (z * c)) + (9.0 * ((x * y) / (z * c)))) - (4.0 * ((a * t) / c));
}
return tmp;
}
[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.15e+139: tmp = ((-4.0 * (a * t)) + (b / z)) / c elif z <= 20.0: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) else: tmp = ((b / (z * c)) + (9.0 * ((x * y) / (z * c)))) - (4.0 * ((a * t) / c)) return tmp
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.15e+139) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); elseif (z <= 20.0) tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(Float64(Float64(b / Float64(z * c)) + Float64(9.0 * Float64(Float64(x * y) / Float64(z * c)))) - 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -1.15e+139)
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
elseif (z <= 20.0)
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
else
tmp = ((b / (z * c)) + (9.0 * ((x * y) / (z * c)))) - (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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -1.15e+139], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 20.0], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+139}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{elif}\;z \leq 20:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{x \cdot y}{z \cdot c}\right) - 4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if z < -1.15e139Initial program 44.7%
associate-+l-44.7%
*-commutative44.7%
associate-*r*41.6%
*-commutative41.6%
associate-+l-41.6%
*-commutative41.6%
associate-*r*44.7%
*-commutative44.7%
associate-*l*44.7%
associate-*l*49.9%
Simplified49.9%
Taylor expanded in x around 0 42.6%
Taylor expanded in b around 0 76.6%
Taylor expanded in c around 0 79.3%
if -1.15e139 < z < 20Initial program 95.3%
if 20 < z Initial program 70.8%
associate-+l-70.8%
*-commutative70.8%
associate-*r*67.2%
*-commutative67.2%
associate-+l-67.2%
*-commutative67.2%
associate-*r*70.8%
*-commutative70.8%
associate-*l*70.7%
associate-*l*72.3%
Simplified72.3%
Taylor expanded in x around 0 90.2%
Final simplification91.8%
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)) (/ b z)) c)))
(if (<= z -6e+136)
t_1
(if (<= z -4.9e+57)
(/ (- (* 9.0 (* x y)) (* 4.0 (* a (* z t)))) (* z c))
(if (or (<= z -200000.0) (not (<= z 3.2e-33)))
t_1
(/ (+ b (* y (* 9.0 x))) (* z 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)) + (b / z)) / c;
double tmp;
if (z <= -6e+136) {
tmp = t_1;
} else if (z <= -4.9e+57) {
tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c);
} else if ((z <= -200000.0) || !(z <= 3.2e-33)) {
tmp = t_1;
} else {
tmp = (b + (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.
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)) + (b / z)) / c
if (z <= (-6d+136)) then
tmp = t_1
else if (z <= (-4.9d+57)) then
tmp = ((9.0d0 * (x * y)) - (4.0d0 * (a * (z * t)))) / (z * c)
else if ((z <= (-200000.0d0)) .or. (.not. (z <= 3.2d-33))) then
tmp = t_1
else
tmp = (b + (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;
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)) + (b / z)) / c;
double tmp;
if (z <= -6e+136) {
tmp = t_1;
} else if (z <= -4.9e+57) {
tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c);
} else if ((z <= -200000.0) || !(z <= 3.2e-33)) {
tmp = t_1;
} else {
tmp = (b + (y * (9.0 * x))) / (z * c);
}
return tmp;
}
[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)) + (b / z)) / c tmp = 0 if z <= -6e+136: tmp = t_1 elif z <= -4.9e+57: tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c) elif (z <= -200000.0) or not (z <= 3.2e-33): tmp = t_1 else: tmp = (b + (y * (9.0 * x))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c) tmp = 0.0 if (z <= -6e+136) tmp = t_1; elseif (z <= -4.9e+57) tmp = Float64(Float64(Float64(9.0 * Float64(x * y)) - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(z * c)); elseif ((z <= -200000.0) || !(z <= 3.2e-33)) tmp = t_1; else tmp = Float64(Float64(b + 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = ((-4.0 * (a * t)) + (b / z)) / c;
tmp = 0.0;
if (z <= -6e+136)
tmp = t_1;
elseif (z <= -4.9e+57)
tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c);
elseif ((z <= -200000.0) || ~((z <= 3.2e-33)))
tmp = t_1;
else
tmp = (b + (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.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -6e+136], t$95$1, If[LessEqual[z, -4.9e+57], N[(N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -200000.0], N[Not[LessEqual[z, 3.2e-33]], $MachinePrecision]], t$95$1, N[(N[(b + N[(y * N[(9.0 * x), $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])\\
\\
\begin{array}{l}
t_1 := \frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{+57}:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq -200000 \lor \neg \left(z \leq 3.2 \cdot 10^{-33}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -5.99999999999999958e136 or -4.8999999999999999e57 < z < -2e5 or 3.19999999999999977e-33 < z Initial program 62.8%
associate-+l-62.8%
*-commutative62.8%
associate-*r*59.7%
*-commutative59.7%
associate-+l-59.7%
*-commutative59.7%
associate-*r*62.8%
*-commutative62.8%
associate-*l*62.8%
associate-*l*65.6%
Simplified65.6%
Taylor expanded in x around 0 57.1%
Taylor expanded in b around 0 81.2%
Taylor expanded in c around 0 84.9%
if -5.99999999999999958e136 < z < -4.8999999999999999e57Initial program 83.8%
associate-+l-83.8%
*-commutative83.8%
associate-*r*89.2%
*-commutative89.2%
associate-+l-89.2%
*-commutative89.2%
associate-*r*83.8%
*-commutative83.8%
associate-*l*83.8%
associate-*l*89.2%
Simplified89.2%
Taylor expanded in b around 0 78.6%
if -2e5 < z < 3.19999999999999977e-33Initial program 97.3%
associate-+l-97.3%
*-commutative97.3%
associate-*r*97.5%
*-commutative97.5%
associate-+l-97.5%
*-commutative97.5%
associate-*r*97.3%
*-commutative97.3%
associate-*l*97.2%
associate-*l*91.1%
Simplified91.1%
Applied egg-rr97.5%
Taylor expanded in z around 0 84.3%
associate-*r*84.3%
Simplified84.3%
Final simplification84.1%
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.8e+138) (not (<= z 4.5e+196))) (/ (+ (* -4.0 (* a t)) (/ b z)) c) (/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -4.8e+138) || !(z <= 4.5e+196)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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.8d+138)) .or. (.not. (z <= 4.5d+196))) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else
tmp = (b + ((x * (9.0d0 * y)) - ((a * t) * (z * 4.0d0)))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -4.8e+138) || !(z <= 4.5e+196)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -4.8e+138) or not (z <= 4.5e+196): tmp = ((-4.0 * (a * t)) + (b / z)) / c else: tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -4.8e+138) || !(z <= 4.5e+196)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -4.8e+138) || ~((z <= 4.5e+196)))
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
else
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -4.8e+138], N[Not[LessEqual[z, 4.5e+196]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+138} \lor \neg \left(z \leq 4.5 \cdot 10^{+196}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -4.8000000000000002e138 or 4.49999999999999978e196 < z Initial program 45.7%
associate-+l-45.7%
*-commutative45.7%
associate-*r*41.9%
*-commutative41.9%
associate-+l-41.9%
*-commutative41.9%
associate-*r*45.7%
*-commutative45.7%
associate-*l*45.7%
associate-*l*49.0%
Simplified49.0%
Taylor expanded in x around 0 44.3%
Taylor expanded in b around 0 80.4%
Taylor expanded in c around 0 85.3%
if -4.8000000000000002e138 < z < 4.49999999999999978e196Initial program 93.3%
associate-+l-93.3%
*-commutative93.3%
associate-*r*93.4%
*-commutative93.4%
associate-+l-93.4%
*-commutative93.4%
associate-*r*93.3%
*-commutative93.3%
associate-*l*93.3%
associate-*l*90.1%
Simplified90.1%
Final simplification89.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -8.2e+136) (not (<= z 6e+60))) (/ (+ (* -4.0 (* a t)) (/ b z)) c) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -8.2e+136) || !(z <= 6e+60)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-8.2d+136)) .or. (.not. (z <= 6d+60))) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -8.2e+136) || !(z <= 6e+60)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -8.2e+136) or not (z <= 6e+60): tmp = ((-4.0 * (a * t)) + (b / z)) / c else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -8.2e+136) || !(z <= 6e+60)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -8.2e+136) || ~((z <= 6e+60)))
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -8.2e+136], N[Not[LessEqual[z, 6e+60]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+136} \lor \neg \left(z \leq 6 \cdot 10^{+60}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -8.1999999999999995e136 or 5.9999999999999997e60 < z Initial program 57.7%
associate-+l-57.7%
*-commutative57.7%
associate-*r*54.0%
*-commutative54.0%
associate-+l-54.0%
*-commutative54.0%
associate-*r*57.7%
*-commutative57.7%
associate-*l*57.7%
associate-*l*61.0%
Simplified61.0%
Taylor expanded in x around 0 53.5%
Taylor expanded in b around 0 81.2%
Taylor expanded in c around 0 85.6%
if -8.1999999999999995e136 < z < 5.9999999999999997e60Initial program 95.0%
Final simplification91.8%
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 (<= a -2.35e-29) (not (<= a 1.5e+90))) (* (* (/ a c) t) -4.0) (/ (+ b (* 9.0 (* x y))) (* z 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 ((a <= -2.35e-29) || !(a <= 1.5e+90)) {
tmp = ((a / c) * t) * -4.0;
} 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.
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 ((a <= (-2.35d-29)) .or. (.not. (a <= 1.5d+90))) then
tmp = ((a / c) * t) * (-4.0d0)
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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -2.35e-29) || !(a <= 1.5e+90)) {
tmp = ((a / c) * t) * -4.0;
} 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]) def code(x, y, z, t, a, b, c): tmp = 0 if (a <= -2.35e-29) or not (a <= 1.5e+90): tmp = ((a / c) * t) * -4.0 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]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((a <= -2.35e-29) || !(a <= 1.5e+90)) tmp = Float64(Float64(Float64(a / c) * t) * -4.0); 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((a <= -2.35e-29) || ~((a <= 1.5e+90)))
tmp = ((a / c) * t) * -4.0;
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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -2.35e-29], N[Not[LessEqual[a, 1.5e+90]], $MachinePrecision]], N[(N[(N[(a / c), $MachinePrecision] * t), $MachinePrecision] * -4.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.35 \cdot 10^{-29} \lor \neg \left(a \leq 1.5 \cdot 10^{+90}\right):\\
\;\;\;\;\left(\frac{a}{c} \cdot t\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if a < -2.3499999999999999e-29 or 1.49999999999999989e90 < a Initial program 79.1%
associate-+l-79.1%
*-commutative79.1%
associate-*r*73.9%
*-commutative73.9%
associate-+l-73.9%
*-commutative73.9%
associate-*r*79.1%
*-commutative79.1%
associate-*l*79.1%
associate-*l*72.6%
Simplified72.6%
Taylor expanded in z around inf 54.3%
*-commutative54.3%
associate-/l*60.0%
associate-/r/63.4%
Simplified63.4%
if -2.3499999999999999e-29 < a < 1.49999999999999989e90Initial program 84.8%
associate-+l-84.8%
*-commutative84.8%
associate-*r*87.5%
*-commutative87.5%
associate-+l-87.5%
Simplified86.9%
Taylor expanded in z around 0 74.4%
Final simplification69.6%
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 (<= a -9e-31) (not (<= a 1.8e+90))) (* (* (/ a c) t) -4.0) (/ (+ b (* y (* 9.0 x))) (* z 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 ((a <= -9e-31) || !(a <= 1.8e+90)) {
tmp = ((a / c) * t) * -4.0;
} else {
tmp = (b + (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.
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 ((a <= (-9d-31)) .or. (.not. (a <= 1.8d+90))) then
tmp = ((a / c) * t) * (-4.0d0)
else
tmp = (b + (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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((a <= -9e-31) || !(a <= 1.8e+90)) {
tmp = ((a / c) * t) * -4.0;
} else {
tmp = (b + (y * (9.0 * x))) / (z * c);
}
return tmp;
}
[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 (a <= -9e-31) or not (a <= 1.8e+90): tmp = ((a / c) * t) * -4.0 else: tmp = (b + (y * (9.0 * x))) / (z * c) return tmp
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 ((a <= -9e-31) || !(a <= 1.8e+90)) tmp = Float64(Float64(Float64(a / c) * t) * -4.0); else tmp = Float64(Float64(b + 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((a <= -9e-31) || ~((a <= 1.8e+90)))
tmp = ((a / c) * t) * -4.0;
else
tmp = (b + (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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -9e-31], N[Not[LessEqual[a, 1.8e+90]], $MachinePrecision]], N[(N[(N[(a / c), $MachinePrecision] * t), $MachinePrecision] * -4.0), $MachinePrecision], N[(N[(b + N[(y * N[(9.0 * x), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9 \cdot 10^{-31} \lor \neg \left(a \leq 1.8 \cdot 10^{+90}\right):\\
\;\;\;\;\left(\frac{a}{c} \cdot t\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
\end{array}
\end{array}
if a < -9.0000000000000008e-31 or 1.8e90 < a Initial program 79.1%
associate-+l-79.1%
*-commutative79.1%
associate-*r*73.9%
*-commutative73.9%
associate-+l-73.9%
*-commutative73.9%
associate-*r*79.1%
*-commutative79.1%
associate-*l*79.1%
associate-*l*72.6%
Simplified72.6%
Taylor expanded in z around inf 54.3%
*-commutative54.3%
associate-/l*60.0%
associate-/r/63.4%
Simplified63.4%
if -9.0000000000000008e-31 < a < 1.8e90Initial program 84.8%
associate-+l-84.8%
*-commutative84.8%
associate-*r*87.5%
*-commutative87.5%
associate-+l-87.5%
*-commutative87.5%
associate-*r*84.8%
*-commutative84.8%
associate-*l*84.8%
associate-*l*86.8%
Simplified86.8%
Applied egg-rr83.7%
Taylor expanded in z around 0 74.4%
associate-*r*74.4%
Simplified74.4%
Final simplification69.6%
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.52e+26) (not (<= z 1.18e-26))) (/ (+ (* -4.0 (* a t)) (/ b z)) c) (/ (+ b (* y (* 9.0 x))) (* z 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.52e+26) || !(z <= 1.18e-26)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + (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.
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.52d+26)) .or. (.not. (z <= 1.18d-26))) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else
tmp = (b + (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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.52e+26) || !(z <= 1.18e-26)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + (y * (9.0 * x))) / (z * c);
}
return tmp;
}
[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.52e+26) or not (z <= 1.18e-26): tmp = ((-4.0 * (a * t)) + (b / z)) / c else: tmp = (b + (y * (9.0 * x))) / (z * c) return tmp
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.52e+26) || !(z <= 1.18e-26)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); else tmp = Float64(Float64(b + 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.52e+26) || ~((z <= 1.18e-26)))
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
else
tmp = (b + (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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.52e+26], N[Not[LessEqual[z, 1.18e-26]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(y * N[(9.0 * x), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.52 \cdot 10^{+26} \lor \neg \left(z \leq 1.18 \cdot 10^{-26}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.52e26 or 1.17999999999999996e-26 < z Initial program 65.9%
associate-+l-65.9%
*-commutative65.9%
associate-*r*64.1%
*-commutative64.1%
associate-+l-64.1%
*-commutative64.1%
associate-*r*65.9%
*-commutative65.9%
associate-*l*65.9%
associate-*l*69.1%
Simplified69.1%
Taylor expanded in x around 0 55.7%
Taylor expanded in b around 0 76.2%
Taylor expanded in c around 0 80.1%
if -1.52e26 < z < 1.17999999999999996e-26Initial program 97.3%
associate-+l-97.3%
*-commutative97.3%
associate-*r*97.5%
*-commutative97.5%
associate-+l-97.5%
*-commutative97.5%
associate-*r*97.3%
*-commutative97.3%
associate-*l*97.2%
associate-*l*91.1%
Simplified91.1%
Applied egg-rr97.5%
Taylor expanded in z around 0 84.3%
associate-*r*84.3%
Simplified84.3%
Final simplification82.3%
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 (<= b -5.5e-24) (not (<= b 1.2e+98))) (/ (/ b c) z) (* -4.0 (/ (* a t) 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 <= -5.5e-24) || !(b <= 1.2e+98)) {
tmp = (b / 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.
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 <= (-5.5d-24)) .or. (.not. (b <= 1.2d+98))) then
tmp = (b / 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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -5.5e-24) || !(b <= 1.2e+98)) {
tmp = (b / 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]) def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -5.5e-24) or not (b <= 1.2e+98): tmp = (b / 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]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -5.5e-24) || !(b <= 1.2e+98)) tmp = Float64(Float64(b / c) / z); 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((b <= -5.5e-24) || ~((b <= 1.2e+98)))
tmp = (b / 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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -5.5e-24], N[Not[LessEqual[b, 1.2e+98]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{-24} \lor \neg \left(b \leq 1.2 \cdot 10^{+98}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if b < -5.4999999999999999e-24 or 1.1999999999999999e98 < b Initial program 80.6%
associate-+l-80.6%
*-commutative80.6%
associate-*r*80.4%
*-commutative80.4%
associate-+l-80.4%
*-commutative80.4%
associate-*r*80.6%
*-commutative80.6%
associate-*l*80.6%
associate-*l*80.6%
Simplified80.6%
Applied egg-rr81.6%
Taylor expanded in b around inf 55.7%
associate-/l/56.5%
Simplified56.5%
Taylor expanded in b around 0 55.7%
associate-/r*59.8%
Simplified59.8%
if -5.4999999999999999e-24 < b < 1.1999999999999999e98Initial program 83.8%
associate-+l-83.8%
*-commutative83.8%
associate-*r*82.5%
*-commutative82.5%
associate-+l-82.5%
*-commutative82.5%
associate-*r*83.8%
*-commutative83.8%
associate-*l*83.7%
associate-*l*80.6%
Simplified80.6%
Taylor expanded in z around inf 45.4%
Final simplification51.9%
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 (<= a -2.4e-30) (not (<= a 3.6e+48))) (* (* (/ a c) t) -4.0) (/ (/ b z) 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 ((a <= -2.4e-30) || !(a <= 3.6e+48)) {
tmp = ((a / c) * t) * -4.0;
} 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.
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 ((a <= (-2.4d-30)) .or. (.not. (a <= 3.6d+48))) then
tmp = ((a / c) * t) * (-4.0d0)
else
tmp = (b / z) / c
end if
code = tmp
end function
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 ((a <= -2.4e-30) || !(a <= 3.6e+48)) {
tmp = ((a / c) * t) * -4.0;
} else {
tmp = (b / z) / c;
}
return tmp;
}
[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 (a <= -2.4e-30) or not (a <= 3.6e+48): tmp = ((a / c) * t) * -4.0 else: tmp = (b / z) / c return tmp
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 ((a <= -2.4e-30) || !(a <= 3.6e+48)) tmp = Float64(Float64(Float64(a / c) * t) * -4.0); else tmp = Float64(Float64(b / z) / c); end return tmp end
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 ((a <= -2.4e-30) || ~((a <= 3.6e+48)))
tmp = ((a / c) * t) * -4.0;
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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -2.4e-30], N[Not[LessEqual[a, 3.6e+48]], $MachinePrecision]], N[(N[(N[(a / c), $MachinePrecision] * t), $MachinePrecision] * -4.0), $MachinePrecision], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{-30} \lor \neg \left(a \leq 3.6 \cdot 10^{+48}\right):\\
\;\;\;\;\left(\frac{a}{c} \cdot t\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\end{array}
\end{array}
if a < -2.39999999999999985e-30 or 3.59999999999999983e48 < a Initial program 80.0%
associate-+l-80.0%
*-commutative80.0%
associate-*r*75.2%
*-commutative75.2%
associate-+l-75.2%
*-commutative75.2%
associate-*r*80.0%
*-commutative80.0%
associate-*l*80.0%
associate-*l*73.3%
Simplified73.3%
Taylor expanded in z around inf 52.4%
*-commutative52.4%
associate-/l*58.5%
associate-/r/61.6%
Simplified61.6%
if -2.39999999999999985e-30 < a < 3.59999999999999983e48Initial program 84.4%
associate-+l-84.4%
*-commutative84.4%
associate-*r*87.4%
*-commutative87.4%
associate-+l-87.4%
*-commutative87.4%
associate-*r*84.4%
*-commutative84.4%
associate-*l*84.4%
associate-*l*87.3%
Simplified87.3%
Applied egg-rr83.3%
Taylor expanded in b around inf 44.2%
associate-/l/43.0%
Simplified43.0%
Final simplification51.9%
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 (<= b -6.2e-13) (not (<= b 3.7e+100))) (/ (/ b c) z) (* -4.0 (/ a (/ c t)))))
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 <= -6.2e-13) || !(b <= 3.7e+100)) {
tmp = (b / c) / z;
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
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 <= (-6.2d-13)) .or. (.not. (b <= 3.7d+100))) then
tmp = (b / c) / z
else
tmp = (-4.0d0) * (a / (c / t))
end if
code = tmp
end function
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 <= -6.2e-13) || !(b <= 3.7e+100)) {
tmp = (b / c) / z;
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
[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 <= -6.2e-13) or not (b <= 3.7e+100): tmp = (b / c) / z else: tmp = -4.0 * (a / (c / t)) return tmp
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 <= -6.2e-13) || !(b <= 3.7e+100)) tmp = Float64(Float64(b / c) / z); else tmp = Float64(-4.0 * Float64(a / Float64(c / t))); end return tmp end
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 <= -6.2e-13) || ~((b <= 3.7e+100)))
tmp = (b / c) / z;
else
tmp = -4.0 * (a / (c / t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -6.2e-13], N[Not[LessEqual[b, 3.7e+100]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.2 \cdot 10^{-13} \lor \neg \left(b \leq 3.7 \cdot 10^{+100}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\end{array}
\end{array}
if b < -6.1999999999999998e-13 or 3.70000000000000019e100 < b Initial program 79.9%
associate-+l-79.9%
*-commutative79.9%
associate-*r*79.8%
*-commutative79.8%
associate-+l-79.8%
*-commutative79.8%
associate-*r*79.9%
*-commutative79.9%
associate-*l*79.9%
associate-*l*80.8%
Simplified80.8%
Applied egg-rr81.9%
Taylor expanded in b around inf 55.9%
associate-/l/56.7%
Simplified56.7%
Taylor expanded in b around 0 55.9%
associate-/r*60.1%
Simplified60.1%
if -6.1999999999999998e-13 < b < 3.70000000000000019e100Initial program 84.2%
associate-+l-84.2%
*-commutative84.2%
associate-*r*82.9%
*-commutative82.9%
associate-+l-82.9%
*-commutative82.9%
associate-*r*84.2%
*-commutative84.2%
associate-*l*84.2%
associate-*l*80.5%
Simplified80.5%
Taylor expanded in z around inf 44.9%
*-commutative44.9%
associate-/l*49.3%
Simplified49.3%
Final simplification54.0%
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);
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.
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;
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]) 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]) 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])){:}
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. 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])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 82.3%
associate-+l-82.3%
*-commutative82.3%
associate-*r*81.6%
*-commutative81.6%
associate-+l-81.6%
*-commutative81.6%
associate-*r*82.3%
*-commutative82.3%
associate-*l*82.3%
associate-*l*80.6%
Simplified80.6%
Taylor expanded in b around inf 34.5%
*-commutative34.5%
Simplified34.5%
Final simplification34.5%
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 c) z))
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 / c) / z;
}
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 / c) / z
end function
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 / c) / z;
}
[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 / c) / z
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(Float64(b / c) / z) end
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 / c) / z;
end
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[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{\frac{b}{c}}{z}
\end{array}
Initial program 82.3%
associate-+l-82.3%
*-commutative82.3%
associate-*r*81.6%
*-commutative81.6%
associate-+l-81.6%
*-commutative81.6%
associate-*r*82.3%
*-commutative82.3%
associate-*l*82.3%
associate-*l*80.6%
Simplified80.6%
Applied egg-rr83.8%
Taylor expanded in b around inf 34.5%
associate-/l/33.8%
Simplified33.8%
Taylor expanded in b around 0 34.5%
associate-/r*35.3%
Simplified35.3%
Final simplification35.3%
(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 2024027
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:herbie-target
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))