
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -10000000000.0) (not (<= z 4.1e-91))) (/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c) (/ (+ b (fma x (* 9.0 y) (* t (* a (* z -4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -10000000000.0) || !(z <= 4.1e-91)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + fma(x, (9.0 * y), (t * (a * (z * -4.0))))) / (z * c);
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -10000000000.0) || !(z <= 4.1e-91)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c); else tmp = Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c)); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -10000000000.0], N[Not[LessEqual[z, 4.1e-91]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -10000000000 \lor \neg \left(z \leq 4.1 \cdot 10^{-91}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1e10 or 4.10000000000000024e-91 < z Initial program 67.1%
+-commutative67.1%
associate-+r-67.1%
*-commutative67.1%
associate-*r*67.2%
*-commutative67.2%
associate-+r-67.2%
+-commutative67.2%
associate-*l*67.2%
associate-*l*70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in x around 0 82.9%
associate--l+82.9%
fma-define82.9%
times-frac78.8%
cancel-sign-sub-inv78.8%
metadata-eval78.8%
+-commutative78.8%
*-commutative78.8%
fma-define78.8%
associate-/r*79.7%
Simplified79.7%
Taylor expanded in c around 0 91.3%
if -1e10 < z < 4.10000000000000024e-91Initial program 93.3%
Simplified94.9%
Final simplification92.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (* a t))))
(if (<= x -1.32e+101)
(/ (+ t_1 (* 9.0 (/ (* x y) z))) c)
(if (<= x -3.4e+54)
(* t (+ (* -4.0 (/ a c)) (/ b (* c (* z t)))))
(if (<= x -1.12e+30)
(* b (+ (* -4.0 (/ (* a t) (* b c))) (/ 1.0 (* z c))))
(if (<= x 5.2e-33)
(/ (+ t_1 (/ b z)) c)
(/ (+ (* 9.0 (/ (* x y) c)) (/ b c)) z)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a * t);
double tmp;
if (x <= -1.32e+101) {
tmp = (t_1 + (9.0 * ((x * y) / z))) / c;
} else if (x <= -3.4e+54) {
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
} else if (x <= -1.12e+30) {
tmp = b * ((-4.0 * ((a * t) / (b * c))) + (1.0 / (z * c)));
} else if (x <= 5.2e-33) {
tmp = (t_1 + (b / z)) / c;
} else {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (a * t)
if (x <= (-1.32d+101)) then
tmp = (t_1 + (9.0d0 * ((x * y) / z))) / c
else if (x <= (-3.4d+54)) then
tmp = t * (((-4.0d0) * (a / c)) + (b / (c * (z * t))))
else if (x <= (-1.12d+30)) then
tmp = b * (((-4.0d0) * ((a * t) / (b * c))) + (1.0d0 / (z * c)))
else if (x <= 5.2d-33) then
tmp = (t_1 + (b / z)) / c
else
tmp = ((9.0d0 * ((x * y) / c)) + (b / c)) / z
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a * t);
double tmp;
if (x <= -1.32e+101) {
tmp = (t_1 + (9.0 * ((x * y) / z))) / c;
} else if (x <= -3.4e+54) {
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
} else if (x <= -1.12e+30) {
tmp = b * ((-4.0 * ((a * t) / (b * c))) + (1.0 / (z * c)));
} else if (x <= 5.2e-33) {
tmp = (t_1 + (b / z)) / c;
} else {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a * t) tmp = 0 if x <= -1.32e+101: tmp = (t_1 + (9.0 * ((x * y) / z))) / c elif x <= -3.4e+54: tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t)))) elif x <= -1.12e+30: tmp = b * ((-4.0 * ((a * t) / (b * c))) + (1.0 / (z * c))) elif x <= 5.2e-33: tmp = (t_1 + (b / z)) / c else: tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a * t)) tmp = 0.0 if (x <= -1.32e+101) tmp = Float64(Float64(t_1 + Float64(9.0 * Float64(Float64(x * y) / z))) / c); elseif (x <= -3.4e+54) tmp = Float64(t * Float64(Float64(-4.0 * Float64(a / c)) + Float64(b / Float64(c * Float64(z * t))))); elseif (x <= -1.12e+30) tmp = Float64(b * Float64(Float64(-4.0 * Float64(Float64(a * t) / Float64(b * c))) + Float64(1.0 / Float64(z * c)))); elseif (x <= 5.2e-33) tmp = Float64(Float64(t_1 + Float64(b / z)) / c); else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / c)) / z); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a * t);
tmp = 0.0;
if (x <= -1.32e+101)
tmp = (t_1 + (9.0 * ((x * y) / z))) / c;
elseif (x <= -3.4e+54)
tmp = t * ((-4.0 * (a / c)) + (b / (c * (z * t))));
elseif (x <= -1.12e+30)
tmp = b * ((-4.0 * ((a * t) / (b * c))) + (1.0 / (z * c)));
elseif (x <= 5.2e-33)
tmp = (t_1 + (b / z)) / c;
else
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.32e+101], N[(N[(t$95$1 + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[x, -3.4e+54], N[(t * N[(N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.12e+30], N[(b * N[(N[(-4.0 * N[(N[(a * t), $MachinePrecision] / N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.2e-33], N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot t\right)\\
\mathbf{if}\;x \leq -1.32 \cdot 10^{+101}:\\
\;\;\;\;\frac{t\_1 + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\mathbf{elif}\;x \leq -3.4 \cdot 10^{+54}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c} + \frac{b}{c \cdot \left(z \cdot t\right)}\right)\\
\mathbf{elif}\;x \leq -1.12 \cdot 10^{+30}:\\
\;\;\;\;b \cdot \left(-4 \cdot \frac{a \cdot t}{b \cdot c} + \frac{1}{z \cdot c}\right)\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{-33}:\\
\;\;\;\;\frac{t\_1 + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}}{z}\\
\end{array}
\end{array}
if x < -1.32e101Initial program 78.6%
+-commutative78.6%
associate-+r-78.6%
*-commutative78.6%
associate-*r*80.5%
*-commutative80.5%
associate-+r-80.5%
+-commutative80.5%
associate-*l*80.5%
associate-*l*82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in x around 0 82.7%
associate--l+82.7%
fma-define82.7%
times-frac77.8%
cancel-sign-sub-inv77.8%
metadata-eval77.8%
+-commutative77.8%
*-commutative77.8%
fma-define77.8%
associate-/r*80.1%
Simplified80.1%
Taylor expanded in c around 0 87.2%
Taylor expanded in b around 0 80.7%
if -1.32e101 < x < -3.4000000000000001e54Initial program 63.5%
+-commutative63.5%
associate-+r-63.5%
*-commutative63.5%
associate-*r*63.5%
*-commutative63.5%
associate-+r-63.5%
+-commutative63.5%
associate-*l*63.5%
associate-*l*51.0%
*-commutative51.0%
Simplified51.0%
Taylor expanded in x around 0 38.7%
Taylor expanded in t around inf 75.0%
if -3.4000000000000001e54 < x < -1.12e30Initial program 100.0%
+-commutative100.0%
associate-+r-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+r-100.0%
+-commutative100.0%
associate-*l*100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 52.0%
Taylor expanded in b around inf 100.0%
if -1.12e30 < x < 5.19999999999999988e-33Initial program 81.2%
+-commutative81.2%
associate-+r-81.2%
*-commutative81.2%
associate-*r*82.7%
*-commutative82.7%
associate-+r-82.7%
+-commutative82.7%
associate-*l*82.6%
associate-*l*83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in x around 0 88.1%
associate--l+88.1%
fma-define88.1%
times-frac83.5%
cancel-sign-sub-inv83.5%
metadata-eval83.5%
+-commutative83.5%
*-commutative83.5%
fma-define83.5%
associate-/r*83.8%
Simplified83.8%
Taylor expanded in c around 0 95.3%
Taylor expanded in x around 0 86.5%
if 5.19999999999999988e-33 < x Initial program 74.8%
+-commutative74.8%
associate-+r-74.8%
*-commutative74.8%
associate-*r*73.7%
*-commutative73.7%
associate-+r-73.7%
+-commutative73.7%
associate-*l*73.7%
associate-*l*74.8%
*-commutative74.8%
Simplified74.8%
Taylor expanded in x around 0 77.4%
associate--l+77.4%
fma-define77.4%
times-frac72.4%
cancel-sign-sub-inv72.4%
metadata-eval72.4%
+-commutative72.4%
*-commutative72.4%
fma-define72.4%
associate-/r*72.3%
Simplified72.3%
Taylor expanded in z around 0 49.0%
Final simplification74.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ b (* 9.0 (* x y))) (* z c))))
(if (<= a -9.5e-202)
(* a (* -4.0 (/ t c)))
(if (<= a 8e+93)
t_1
(if (<= a 4.4e+167)
(* t (/ (* -4.0 a) c))
(if (<= a 4.9e+181) t_1 (* t (* a (/ -4.0 c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (9.0 * (x * y))) / (z * c);
double tmp;
if (a <= -9.5e-202) {
tmp = a * (-4.0 * (t / c));
} else if (a <= 8e+93) {
tmp = t_1;
} else if (a <= 4.4e+167) {
tmp = t * ((-4.0 * a) / c);
} else if (a <= 4.9e+181) {
tmp = t_1;
} else {
tmp = t * (a * (-4.0 / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (b + (9.0d0 * (x * y))) / (z * c)
if (a <= (-9.5d-202)) then
tmp = a * ((-4.0d0) * (t / c))
else if (a <= 8d+93) then
tmp = t_1
else if (a <= 4.4d+167) then
tmp = t * (((-4.0d0) * a) / c)
else if (a <= 4.9d+181) then
tmp = t_1
else
tmp = t * (a * ((-4.0d0) / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + (9.0 * (x * y))) / (z * c);
double tmp;
if (a <= -9.5e-202) {
tmp = a * (-4.0 * (t / c));
} else if (a <= 8e+93) {
tmp = t_1;
} else if (a <= 4.4e+167) {
tmp = t * ((-4.0 * a) / c);
} else if (a <= 4.9e+181) {
tmp = t_1;
} else {
tmp = t * (a * (-4.0 / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b + (9.0 * (x * y))) / (z * c) tmp = 0 if a <= -9.5e-202: tmp = a * (-4.0 * (t / c)) elif a <= 8e+93: tmp = t_1 elif a <= 4.4e+167: tmp = t * ((-4.0 * a) / c) elif a <= 4.9e+181: tmp = t_1 else: tmp = t * (a * (-4.0 / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)) tmp = 0.0 if (a <= -9.5e-202) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); elseif (a <= 8e+93) tmp = t_1; elseif (a <= 4.4e+167) tmp = Float64(t * Float64(Float64(-4.0 * a) / c)); elseif (a <= 4.9e+181) tmp = t_1; else tmp = Float64(t * Float64(a * Float64(-4.0 / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b + (9.0 * (x * y))) / (z * c);
tmp = 0.0;
if (a <= -9.5e-202)
tmp = a * (-4.0 * (t / c));
elseif (a <= 8e+93)
tmp = t_1;
elseif (a <= 4.4e+167)
tmp = t * ((-4.0 * a) / c);
elseif (a <= 4.9e+181)
tmp = t_1;
else
tmp = t * (a * (-4.0 / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.5e-202], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8e+93], t$95$1, If[LessEqual[a, 4.4e+167], N[(t * N[(N[(-4.0 * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.9e+181], t$95$1, N[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{if}\;a \leq -9.5 \cdot 10^{-202}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;a \leq 8 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{+167}:\\
\;\;\;\;t \cdot \frac{-4 \cdot a}{c}\\
\mathbf{elif}\;a \leq 4.9 \cdot 10^{+181}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\end{array}
\end{array}
if a < -9.5000000000000001e-202Initial program 76.2%
+-commutative76.2%
associate-+r-76.2%
*-commutative76.2%
associate-*r*74.2%
*-commutative74.2%
associate-+r-74.2%
+-commutative74.2%
associate-*l*74.2%
associate-*l*74.2%
*-commutative74.2%
Simplified74.2%
Taylor expanded in z around inf 48.1%
associate-/l*51.5%
associate-*r*51.5%
*-commutative51.5%
associate-*r*51.5%
Simplified51.5%
if -9.5000000000000001e-202 < a < 8.00000000000000035e93 or 4.40000000000000007e167 < a < 4.89999999999999981e181Initial program 84.5%
+-commutative84.5%
associate-+r-84.5%
*-commutative84.5%
associate-*r*88.0%
*-commutative88.0%
associate-+r-88.0%
+-commutative88.0%
associate-*l*88.0%
associate-*l*88.8%
*-commutative88.8%
Simplified88.8%
Taylor expanded in z around 0 70.4%
if 8.00000000000000035e93 < a < 4.40000000000000007e167Initial program 65.5%
+-commutative65.5%
associate-+r-65.5%
*-commutative65.5%
associate-*r*58.5%
*-commutative58.5%
associate-+r-58.5%
+-commutative58.5%
associate-*l*58.5%
associate-*l*65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in x around 0 58.5%
Taylor expanded in b around 0 58.3%
associate-*r/58.3%
associate-*r*58.3%
*-commutative58.3%
associate-*r/78.7%
Simplified78.7%
if 4.89999999999999981e181 < a Initial program 70.6%
+-commutative70.6%
associate-+r-70.6%
*-commutative70.6%
associate-*r*72.9%
*-commutative72.9%
associate-+r-72.9%
+-commutative72.9%
associate-*l*72.9%
associate-*l*72.9%
*-commutative72.9%
Simplified72.9%
Taylor expanded in z around inf 58.0%
associate-*l/68.4%
associate-*l*68.4%
*-commutative68.4%
associate-*r/68.4%
*-commutative68.4%
associate-/l*68.4%
Simplified68.4%
Final simplification63.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (* -4.0 (/ t c)))))
(if (<= x -1.08e+164)
(* 9.0 (/ y (* z (/ c x))))
(if (<= x -6.2e-241)
t_1
(if (<= x 1.32e-298)
(/ b (* z c))
(if (<= x 1.25e-131) t_1 (* 9.0 (* x (/ y (* z c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double tmp;
if (x <= -1.08e+164) {
tmp = 9.0 * (y / (z * (c / x)));
} else if (x <= -6.2e-241) {
tmp = t_1;
} else if (x <= 1.32e-298) {
tmp = b / (z * c);
} else if (x <= 1.25e-131) {
tmp = t_1;
} else {
tmp = 9.0 * (x * (y / (z * c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((-4.0d0) * (t / c))
if (x <= (-1.08d+164)) then
tmp = 9.0d0 * (y / (z * (c / x)))
else if (x <= (-6.2d-241)) then
tmp = t_1
else if (x <= 1.32d-298) then
tmp = b / (z * c)
else if (x <= 1.25d-131) then
tmp = t_1
else
tmp = 9.0d0 * (x * (y / (z * c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double tmp;
if (x <= -1.08e+164) {
tmp = 9.0 * (y / (z * (c / x)));
} else if (x <= -6.2e-241) {
tmp = t_1;
} else if (x <= 1.32e-298) {
tmp = b / (z * c);
} else if (x <= 1.25e-131) {
tmp = t_1;
} else {
tmp = 9.0 * (x * (y / (z * c)));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = a * (-4.0 * (t / c)) tmp = 0 if x <= -1.08e+164: tmp = 9.0 * (y / (z * (c / x))) elif x <= -6.2e-241: tmp = t_1 elif x <= 1.32e-298: tmp = b / (z * c) elif x <= 1.25e-131: tmp = t_1 else: tmp = 9.0 * (x * (y / (z * c))) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(-4.0 * Float64(t / c))) tmp = 0.0 if (x <= -1.08e+164) tmp = Float64(9.0 * Float64(y / Float64(z * Float64(c / x)))); elseif (x <= -6.2e-241) tmp = t_1; elseif (x <= 1.32e-298) tmp = Float64(b / Float64(z * c)); elseif (x <= 1.25e-131) tmp = t_1; else tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * (-4.0 * (t / c));
tmp = 0.0;
if (x <= -1.08e+164)
tmp = 9.0 * (y / (z * (c / x)));
elseif (x <= -6.2e-241)
tmp = t_1;
elseif (x <= 1.32e-298)
tmp = b / (z * c);
elseif (x <= 1.25e-131)
tmp = t_1;
else
tmp = 9.0 * (x * (y / (z * c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.08e+164], N[(9.0 * N[(y / N[(z * N[(c / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.2e-241], t$95$1, If[LessEqual[x, 1.32e-298], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.25e-131], t$95$1, N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{if}\;x \leq -1.08 \cdot 10^{+164}:\\
\;\;\;\;9 \cdot \frac{y}{z \cdot \frac{c}{x}}\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{-241}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.32 \cdot 10^{-298}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\end{array}
\end{array}
if x < -1.08e164Initial program 77.1%
+-commutative77.1%
associate-+r-77.1%
*-commutative77.1%
associate-*r*79.3%
*-commutative79.3%
associate-+r-79.3%
+-commutative79.3%
associate-*l*79.4%
associate-*l*82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in x around inf 64.5%
times-frac66.5%
Simplified66.5%
clear-num66.4%
frac-times69.4%
*-un-lft-identity69.4%
Applied egg-rr69.4%
if -1.08e164 < x < -6.1999999999999998e-241 or 1.3200000000000001e-298 < x < 1.2500000000000001e-131Initial program 83.7%
+-commutative83.7%
associate-+r-83.7%
*-commutative83.7%
associate-*r*84.6%
*-commutative84.6%
associate-+r-84.6%
+-commutative84.6%
associate-*l*84.5%
associate-*l*84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in z around inf 54.5%
associate-/l*56.3%
associate-*r*56.3%
*-commutative56.3%
associate-*r*56.3%
Simplified56.3%
if -6.1999999999999998e-241 < x < 1.3200000000000001e-298Initial program 73.4%
+-commutative73.4%
associate-+r-73.4%
*-commutative73.4%
associate-*r*84.1%
*-commutative84.1%
associate-+r-84.1%
+-commutative84.1%
associate-*l*84.1%
associate-*l*84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in b around inf 68.2%
*-commutative68.2%
Simplified68.2%
if 1.2500000000000001e-131 < x Initial program 74.3%
+-commutative74.3%
associate-+r-74.3%
*-commutative74.3%
associate-*r*72.4%
*-commutative72.4%
associate-+r-72.4%
+-commutative72.4%
associate-*l*72.4%
associate-*l*73.3%
*-commutative73.3%
Simplified73.3%
Taylor expanded in x around inf 40.5%
times-frac41.9%
Simplified41.9%
Taylor expanded in x around 0 40.5%
associate-/l*40.5%
Simplified40.5%
Final simplification53.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (* -4.0 (/ t c)))))
(if (<= x -9.2e+163)
(* 9.0 (* (/ x c) (/ y z)))
(if (<= x -1.36e-242)
t_1
(if (<= x 8e-299)
(/ b (* z c))
(if (<= x 1.25e-131) t_1 (* 9.0 (* x (/ y (* z c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double tmp;
if (x <= -9.2e+163) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (x <= -1.36e-242) {
tmp = t_1;
} else if (x <= 8e-299) {
tmp = b / (z * c);
} else if (x <= 1.25e-131) {
tmp = t_1;
} else {
tmp = 9.0 * (x * (y / (z * c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((-4.0d0) * (t / c))
if (x <= (-9.2d+163)) then
tmp = 9.0d0 * ((x / c) * (y / z))
else if (x <= (-1.36d-242)) then
tmp = t_1
else if (x <= 8d-299) then
tmp = b / (z * c)
else if (x <= 1.25d-131) then
tmp = t_1
else
tmp = 9.0d0 * (x * (y / (z * c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double tmp;
if (x <= -9.2e+163) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (x <= -1.36e-242) {
tmp = t_1;
} else if (x <= 8e-299) {
tmp = b / (z * c);
} else if (x <= 1.25e-131) {
tmp = t_1;
} else {
tmp = 9.0 * (x * (y / (z * c)));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = a * (-4.0 * (t / c)) tmp = 0 if x <= -9.2e+163: tmp = 9.0 * ((x / c) * (y / z)) elif x <= -1.36e-242: tmp = t_1 elif x <= 8e-299: tmp = b / (z * c) elif x <= 1.25e-131: tmp = t_1 else: tmp = 9.0 * (x * (y / (z * c))) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(-4.0 * Float64(t / c))) tmp = 0.0 if (x <= -9.2e+163) tmp = Float64(9.0 * Float64(Float64(x / c) * Float64(y / z))); elseif (x <= -1.36e-242) tmp = t_1; elseif (x <= 8e-299) tmp = Float64(b / Float64(z * c)); elseif (x <= 1.25e-131) tmp = t_1; else tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * (-4.0 * (t / c));
tmp = 0.0;
if (x <= -9.2e+163)
tmp = 9.0 * ((x / c) * (y / z));
elseif (x <= -1.36e-242)
tmp = t_1;
elseif (x <= 8e-299)
tmp = b / (z * c);
elseif (x <= 1.25e-131)
tmp = t_1;
else
tmp = 9.0 * (x * (y / (z * c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9.2e+163], N[(9.0 * N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.36e-242], t$95$1, If[LessEqual[x, 8e-299], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.25e-131], t$95$1, N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{if}\;x \leq -9.2 \cdot 10^{+163}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;x \leq -1.36 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-299}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\end{array}
\end{array}
if x < -9.20000000000000007e163Initial program 77.1%
+-commutative77.1%
associate-+r-77.1%
*-commutative77.1%
associate-*r*79.3%
*-commutative79.3%
associate-+r-79.3%
+-commutative79.3%
associate-*l*79.4%
associate-*l*82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in x around inf 64.5%
times-frac66.5%
Simplified66.5%
if -9.20000000000000007e163 < x < -1.35999999999999998e-242 or 7.99999999999999994e-299 < x < 1.2500000000000001e-131Initial program 83.7%
+-commutative83.7%
associate-+r-83.7%
*-commutative83.7%
associate-*r*84.6%
*-commutative84.6%
associate-+r-84.6%
+-commutative84.6%
associate-*l*84.5%
associate-*l*84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in z around inf 54.5%
associate-/l*56.3%
associate-*r*56.3%
*-commutative56.3%
associate-*r*56.3%
Simplified56.3%
if -1.35999999999999998e-242 < x < 7.99999999999999994e-299Initial program 73.4%
+-commutative73.4%
associate-+r-73.4%
*-commutative73.4%
associate-*r*84.1%
*-commutative84.1%
associate-+r-84.1%
+-commutative84.1%
associate-*l*84.1%
associate-*l*84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in b around inf 68.2%
*-commutative68.2%
Simplified68.2%
if 1.2500000000000001e-131 < x Initial program 74.3%
+-commutative74.3%
associate-+r-74.3%
*-commutative74.3%
associate-*r*72.4%
*-commutative72.4%
associate-+r-72.4%
+-commutative72.4%
associate-*l*72.4%
associate-*l*73.3%
*-commutative73.3%
Simplified73.3%
Taylor expanded in x around inf 40.5%
times-frac41.9%
Simplified41.9%
Taylor expanded in x around 0 40.5%
associate-/l*40.5%
Simplified40.5%
Final simplification52.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (* -4.0 (/ t c)))) (t_2 (* 9.0 (* x (/ y (* z c))))))
(if (<= x -1e+164)
t_2
(if (<= x -5.8e-243)
t_1
(if (<= x 8.4e-299) (/ b (* z c)) (if (<= x 7.8e-132) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double t_2 = 9.0 * (x * (y / (z * c)));
double tmp;
if (x <= -1e+164) {
tmp = t_2;
} else if (x <= -5.8e-243) {
tmp = t_1;
} else if (x <= 8.4e-299) {
tmp = b / (z * c);
} else if (x <= 7.8e-132) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * ((-4.0d0) * (t / c))
t_2 = 9.0d0 * (x * (y / (z * c)))
if (x <= (-1d+164)) then
tmp = t_2
else if (x <= (-5.8d-243)) then
tmp = t_1
else if (x <= 8.4d-299) then
tmp = b / (z * c)
else if (x <= 7.8d-132) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double t_2 = 9.0 * (x * (y / (z * c)));
double tmp;
if (x <= -1e+164) {
tmp = t_2;
} else if (x <= -5.8e-243) {
tmp = t_1;
} else if (x <= 8.4e-299) {
tmp = b / (z * c);
} else if (x <= 7.8e-132) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = a * (-4.0 * (t / c)) t_2 = 9.0 * (x * (y / (z * c))) tmp = 0 if x <= -1e+164: tmp = t_2 elif x <= -5.8e-243: tmp = t_1 elif x <= 8.4e-299: tmp = b / (z * c) elif x <= 7.8e-132: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(-4.0 * Float64(t / c))) t_2 = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))) tmp = 0.0 if (x <= -1e+164) tmp = t_2; elseif (x <= -5.8e-243) tmp = t_1; elseif (x <= 8.4e-299) tmp = Float64(b / Float64(z * c)); elseif (x <= 7.8e-132) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * (-4.0 * (t / c));
t_2 = 9.0 * (x * (y / (z * c)));
tmp = 0.0;
if (x <= -1e+164)
tmp = t_2;
elseif (x <= -5.8e-243)
tmp = t_1;
elseif (x <= 8.4e-299)
tmp = b / (z * c);
elseif (x <= 7.8e-132)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1e+164], t$95$2, If[LessEqual[x, -5.8e-243], t$95$1, If[LessEqual[x, 8.4e-299], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e-132], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
t_2 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{if}\;x \leq -1 \cdot 10^{+164}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{-243}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8.4 \cdot 10^{-299}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1e164 or 7.79999999999999964e-132 < x Initial program 75.1%
+-commutative75.1%
associate-+r-75.1%
*-commutative75.1%
associate-*r*74.4%
*-commutative74.4%
associate-+r-74.4%
+-commutative74.4%
associate-*l*74.3%
associate-*l*75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in x around inf 47.3%
times-frac48.9%
Simplified48.9%
Taylor expanded in x around 0 47.3%
associate-/l*47.9%
Simplified47.9%
if -1e164 < x < -5.79999999999999953e-243 or 8.40000000000000041e-299 < x < 7.79999999999999964e-132Initial program 83.7%
+-commutative83.7%
associate-+r-83.7%
*-commutative83.7%
associate-*r*84.6%
*-commutative84.6%
associate-+r-84.6%
+-commutative84.6%
associate-*l*84.5%
associate-*l*84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in z around inf 54.5%
associate-/l*56.3%
associate-*r*56.3%
*-commutative56.3%
associate-*r*56.3%
Simplified56.3%
if -5.79999999999999953e-243 < x < 8.40000000000000041e-299Initial program 73.4%
+-commutative73.4%
associate-+r-73.4%
*-commutative73.4%
associate-*r*84.1%
*-commutative84.1%
associate-+r-84.1%
+-commutative84.1%
associate-*l*84.1%
associate-*l*84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in b around inf 68.2%
*-commutative68.2%
Simplified68.2%
Final simplification52.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.9e-27) (not (<= z 4.1e-91))) (/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.9e-27) || !(z <= 4.1e-91)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-1.9d-27)) .or. (.not. (z <= 4.1d-91))) then
tmp = (((-4.0d0) * (a * t)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.9e-27) || !(z <= 4.1e-91)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.9e-27) or not (z <= 4.1e-91): tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.9e-27) || !(z <= 4.1e-91)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.9e-27) || ~((z <= 4.1e-91)))
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.9e-27], N[Not[LessEqual[z, 4.1e-91]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-27} \lor \neg \left(z \leq 4.1 \cdot 10^{-91}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.9e-27 or 4.10000000000000024e-91 < z Initial program 68.6%
+-commutative68.6%
associate-+r-68.6%
*-commutative68.6%
associate-*r*68.7%
*-commutative68.7%
associate-+r-68.7%
+-commutative68.7%
associate-*l*68.7%
associate-*l*71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in x around 0 83.3%
associate--l+83.3%
fma-define83.3%
times-frac78.9%
cancel-sign-sub-inv78.9%
metadata-eval78.9%
+-commutative78.9%
*-commutative78.9%
fma-define78.9%
associate-/r*79.7%
Simplified79.7%
Taylor expanded in c around 0 91.2%
if -1.9e-27 < z < 4.10000000000000024e-91Initial program 93.6%
Final simplification92.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -12000000000.0) (not (<= z 4.3e-95))) (/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c) (/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -12000000000.0) || !(z <= 4.3e-95)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-12000000000.0d0)) .or. (.not. (z <= 4.3d-95))) then
tmp = (((-4.0d0) * (a * t)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c
else
tmp = (b + ((x * (9.0d0 * y)) - ((a * t) * (z * 4.0d0)))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -12000000000.0) || !(z <= 4.3e-95)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -12000000000.0) or not (z <= 4.3e-95): tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c else: tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -12000000000.0) || !(z <= 4.3e-95)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -12000000000.0) || ~((z <= 4.3e-95)))
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
else
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -12000000000.0], N[Not[LessEqual[z, 4.3e-95]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12000000000 \lor \neg \left(z \leq 4.3 \cdot 10^{-95}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.2e10 or 4.29999999999999997e-95 < z Initial program 67.3%
+-commutative67.3%
associate-+r-67.3%
*-commutative67.3%
associate-*r*67.4%
*-commutative67.4%
associate-+r-67.4%
+-commutative67.4%
associate-*l*67.4%
associate-*l*70.1%
*-commutative70.1%
Simplified70.1%
Taylor expanded in x around 0 82.3%
associate--l+82.3%
fma-define82.3%
times-frac78.3%
cancel-sign-sub-inv78.3%
metadata-eval78.3%
+-commutative78.3%
*-commutative78.3%
fma-define78.3%
associate-/r*79.2%
Simplified79.2%
Taylor expanded in c around 0 90.7%
if -1.2e10 < z < 4.29999999999999997e-95Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
*-commutative93.2%
associate-*r*94.9%
*-commutative94.9%
associate-+r-94.9%
+-commutative94.9%
associate-*l*94.8%
associate-*l*93.0%
*-commutative93.0%
Simplified93.0%
Final simplification91.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= x -3.3e+91) (not (<= x 7e-20))) (/ (+ (* 9.0 (/ (* x y) c)) (/ b c)) z) (/ (+ (* -4.0 (* a t)) (/ b z)) c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x <= -3.3e+91) || !(x <= 7e-20)) {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
} else {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((x <= (-3.3d+91)) .or. (.not. (x <= 7d-20))) then
tmp = ((9.0d0 * ((x * y) / c)) + (b / c)) / z
else
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x <= -3.3e+91) || !(x <= 7e-20)) {
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
} else {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (x <= -3.3e+91) or not (x <= 7e-20): tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z else: tmp = ((-4.0 * (a * t)) + (b / z)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((x <= -3.3e+91) || !(x <= 7e-20)) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c)) + Float64(b / c)) / z); else tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((x <= -3.3e+91) || ~((x <= 7e-20)))
tmp = ((9.0 * ((x * y) / c)) + (b / c)) / z;
else
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[x, -3.3e+91], N[Not[LessEqual[x, 7e-20]], $MachinePrecision]], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{+91} \lor \neg \left(x \leq 7 \cdot 10^{-20}\right):\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c} + \frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if x < -3.30000000000000017e91 or 7.00000000000000007e-20 < x Initial program 76.0%
+-commutative76.0%
associate-+r-76.0%
*-commutative76.0%
associate-*r*76.1%
*-commutative76.1%
associate-+r-76.1%
+-commutative76.1%
associate-*l*76.1%
associate-*l*76.8%
*-commutative76.8%
Simplified76.8%
Taylor expanded in x around 0 78.4%
associate--l+78.4%
fma-define78.4%
times-frac73.4%
cancel-sign-sub-inv73.4%
metadata-eval73.4%
+-commutative73.4%
*-commutative73.4%
fma-define73.4%
associate-/r*74.2%
Simplified74.2%
Taylor expanded in z around 0 59.8%
if -3.30000000000000017e91 < x < 7.00000000000000007e-20Initial program 80.5%
+-commutative80.5%
associate-+r-80.5%
*-commutative80.5%
associate-*r*81.9%
*-commutative81.9%
associate-+r-81.9%
+-commutative81.9%
associate-*l*81.9%
associate-*l*82.7%
*-commutative82.7%
Simplified82.7%
Taylor expanded in x around 0 87.6%
associate--l+87.6%
fma-define87.6%
times-frac83.4%
cancel-sign-sub-inv83.4%
metadata-eval83.4%
+-commutative83.4%
*-commutative83.4%
fma-define83.4%
associate-/r*83.7%
Simplified83.7%
Taylor expanded in c around 0 94.3%
Taylor expanded in x around 0 84.8%
Final simplification73.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= x -1.2e+164) (not (<= x 7.2e-20))) (/ (+ b (* 9.0 (* x y))) (* z c)) (/ (+ (* -4.0 (* a t)) (/ b z)) c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x <= -1.2e+164) || !(x <= 7.2e-20)) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((x <= (-1.2d+164)) .or. (.not. (x <= 7.2d-20))) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x <= -1.2e+164) || !(x <= 7.2e-20)) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (x <= -1.2e+164) or not (x <= 7.2e-20): tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = ((-4.0 * (a * t)) + (b / z)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((x <= -1.2e+164) || !(x <= 7.2e-20)) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((x <= -1.2e+164) || ~((x <= 7.2e-20)))
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[x, -1.2e+164], N[Not[LessEqual[x, 7.2e-20]], $MachinePrecision]], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+164} \lor \neg \left(x \leq 7.2 \cdot 10^{-20}\right):\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if x < -1.20000000000000005e164 or 7.19999999999999948e-20 < x Initial program 75.1%
+-commutative75.1%
associate-+r-75.1%
*-commutative75.1%
associate-*r*75.2%
*-commutative75.2%
associate-+r-75.2%
+-commutative75.2%
associate-*l*75.2%
associate-*l*76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in z around 0 64.6%
if -1.20000000000000005e164 < x < 7.19999999999999948e-20Initial program 81.0%
+-commutative81.0%
associate-+r-81.0%
*-commutative81.0%
associate-*r*82.3%
*-commutative82.3%
associate-+r-82.3%
+-commutative82.3%
associate-*l*82.2%
associate-*l*82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in x around 0 85.6%
associate--l+85.6%
fma-define85.6%
times-frac82.2%
cancel-sign-sub-inv82.2%
metadata-eval82.2%
+-commutative82.2%
*-commutative82.2%
fma-define82.2%
associate-/r*82.5%
Simplified82.5%
Taylor expanded in c around 0 93.9%
Taylor expanded in x around 0 83.0%
Final simplification75.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (* a t))))
(if (<= a -8.6e-230)
(/ (+ t_1 (* 9.0 (/ (* x y) z))) c)
(if (<= a 4.2e-52)
(/ (+ b (* 9.0 (* x y))) (* z c))
(/ (+ t_1 (/ b z)) c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a * t);
double tmp;
if (a <= -8.6e-230) {
tmp = (t_1 + (9.0 * ((x * y) / z))) / c;
} else if (a <= 4.2e-52) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = (t_1 + (b / z)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (a * t)
if (a <= (-8.6d-230)) then
tmp = (t_1 + (9.0d0 * ((x * y) / z))) / c
else if (a <= 4.2d-52) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = (t_1 + (b / z)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a * t);
double tmp;
if (a <= -8.6e-230) {
tmp = (t_1 + (9.0 * ((x * y) / z))) / c;
} else if (a <= 4.2e-52) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = (t_1 + (b / z)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a * t) tmp = 0 if a <= -8.6e-230: tmp = (t_1 + (9.0 * ((x * y) / z))) / c elif a <= 4.2e-52: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = (t_1 + (b / z)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a * t)) tmp = 0.0 if (a <= -8.6e-230) tmp = Float64(Float64(t_1 + Float64(9.0 * Float64(Float64(x * y) / z))) / c); elseif (a <= 4.2e-52) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(Float64(t_1 + Float64(b / z)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a * t);
tmp = 0.0;
if (a <= -8.6e-230)
tmp = (t_1 + (9.0 * ((x * y) / z))) / c;
elseif (a <= 4.2e-52)
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = (t_1 + (b / z)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.6e-230], N[(N[(t$95$1 + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[a, 4.2e-52], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot t\right)\\
\mathbf{if}\;a \leq -8.6 \cdot 10^{-230}:\\
\;\;\;\;\frac{t\_1 + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-52}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1 + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if a < -8.6000000000000002e-230Initial program 77.2%
+-commutative77.2%
associate-+r-77.2%
*-commutative77.2%
associate-*r*75.3%
*-commutative75.3%
associate-+r-75.3%
+-commutative75.3%
associate-*l*75.3%
associate-*l*75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in x around 0 78.6%
associate--l+78.6%
fma-define78.6%
times-frac75.6%
cancel-sign-sub-inv75.6%
metadata-eval75.6%
+-commutative75.6%
*-commutative75.6%
fma-define75.6%
associate-/r*76.9%
Simplified76.9%
Taylor expanded in c around 0 85.0%
Taylor expanded in b around 0 71.0%
if -8.6000000000000002e-230 < a < 4.1999999999999997e-52Initial program 82.7%
+-commutative82.7%
associate-+r-82.7%
*-commutative82.7%
associate-*r*89.6%
*-commutative89.6%
associate-+r-89.6%
+-commutative89.6%
associate-*l*89.5%
associate-*l*89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in z around 0 77.0%
if 4.1999999999999997e-52 < a Initial program 76.3%
+-commutative76.3%
associate-+r-76.3%
*-commutative76.3%
associate-*r*75.0%
*-commutative75.0%
associate-+r-75.0%
+-commutative75.0%
associate-*l*75.0%
associate-*l*77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in x around 0 82.7%
associate--l+82.7%
fma-define82.7%
times-frac78.3%
cancel-sign-sub-inv78.3%
metadata-eval78.3%
+-commutative78.3%
*-commutative78.3%
fma-define78.3%
associate-/r*79.5%
Simplified79.5%
Taylor expanded in c around 0 84.4%
Taylor expanded in x around 0 76.5%
Final simplification74.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= a -3.8e-130)
(* a (+ (* -4.0 (/ t c)) (/ b (* a (* z c)))))
(if (<= a 7.8e-53)
(/ (+ b (* 9.0 (* x y))) (* z c))
(/ (+ (* -4.0 (* a t)) (/ b z)) c))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -3.8e-130) {
tmp = a * ((-4.0 * (t / c)) + (b / (a * (z * c))));
} else if (a <= 7.8e-53) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (a <= (-3.8d-130)) then
tmp = a * (((-4.0d0) * (t / c)) + (b / (a * (z * c))))
else if (a <= 7.8d-53) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= -3.8e-130) {
tmp = a * ((-4.0 * (t / c)) + (b / (a * (z * c))));
} else if (a <= 7.8e-53) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if a <= -3.8e-130: tmp = a * ((-4.0 * (t / c)) + (b / (a * (z * c)))) elif a <= 7.8e-53: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = ((-4.0 * (a * t)) + (b / z)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= -3.8e-130) tmp = Float64(a * Float64(Float64(-4.0 * Float64(t / c)) + Float64(b / Float64(a * Float64(z * c))))); elseif (a <= 7.8e-53) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (a <= -3.8e-130)
tmp = a * ((-4.0 * (t / c)) + (b / (a * (z * c))));
elseif (a <= 7.8e-53)
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, -3.8e-130], N[(a * N[(N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(a * N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.8e-53], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-130}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c} + \frac{b}{a \cdot \left(z \cdot c\right)}\right)\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{-53}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if a < -3.7999999999999998e-130Initial program 75.7%
+-commutative75.7%
associate-+r-75.7%
*-commutative75.7%
associate-*r*73.6%
*-commutative73.6%
associate-+r-73.6%
+-commutative73.6%
associate-*l*73.5%
associate-*l*73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in x around 0 56.9%
Taylor expanded in a around inf 68.0%
if -3.7999999999999998e-130 < a < 7.8000000000000004e-53Initial program 83.6%
+-commutative83.6%
associate-+r-83.6%
*-commutative83.6%
associate-*r*89.7%
*-commutative89.7%
associate-+r-89.7%
+-commutative89.7%
associate-*l*89.6%
associate-*l*89.6%
*-commutative89.6%
Simplified89.6%
Taylor expanded in z around 0 77.5%
if 7.8000000000000004e-53 < a Initial program 76.3%
+-commutative76.3%
associate-+r-76.3%
*-commutative76.3%
associate-*r*75.0%
*-commutative75.0%
associate-+r-75.0%
+-commutative75.0%
associate-*l*75.0%
associate-*l*77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in x around 0 82.7%
associate--l+82.7%
fma-define82.7%
times-frac78.3%
cancel-sign-sub-inv78.3%
metadata-eval78.3%
+-commutative78.3%
*-commutative78.3%
fma-define78.3%
associate-/r*79.5%
Simplified79.5%
Taylor expanded in c around 0 84.4%
Taylor expanded in x around 0 76.5%
Final simplification73.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (((-4.0d0) * (a * t)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}
\end{array}
Initial program 78.4%
+-commutative78.4%
associate-+r-78.4%
*-commutative78.4%
associate-*r*79.2%
*-commutative79.2%
associate-+r-79.2%
+-commutative79.2%
associate-*l*79.2%
associate-*l*79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in x around 0 83.3%
associate--l+83.3%
fma-define83.3%
times-frac78.7%
cancel-sign-sub-inv78.7%
metadata-eval78.7%
+-commutative78.7%
*-commutative78.7%
fma-define78.7%
associate-/r*79.3%
Simplified79.3%
Taylor expanded in c around 0 86.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -9e-94) (not (<= z 3.15e-52))) (* a (* -4.0 (/ t c))) (* b (/ (/ 1.0 c) z))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -9e-94) || !(z <= 3.15e-52)) {
tmp = a * (-4.0 * (t / c));
} else {
tmp = b * ((1.0 / c) / z);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-9d-94)) .or. (.not. (z <= 3.15d-52))) then
tmp = a * ((-4.0d0) * (t / c))
else
tmp = b * ((1.0d0 / c) / z)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -9e-94) || !(z <= 3.15e-52)) {
tmp = a * (-4.0 * (t / c));
} else {
tmp = b * ((1.0 / c) / z);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -9e-94) or not (z <= 3.15e-52): tmp = a * (-4.0 * (t / c)) else: tmp = b * ((1.0 / c) / z) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -9e-94) || !(z <= 3.15e-52)) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); else tmp = Float64(b * Float64(Float64(1.0 / c) / z)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -9e-94) || ~((z <= 3.15e-52)))
tmp = a * (-4.0 * (t / c));
else
tmp = b * ((1.0 / c) / z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -9e-94], N[Not[LessEqual[z, 3.15e-52]], $MachinePrecision]], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(1.0 / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{-94} \lor \neg \left(z \leq 3.15 \cdot 10^{-52}\right):\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{\frac{1}{c}}{z}\\
\end{array}
\end{array}
if z < -9.0000000000000004e-94 or 3.1500000000000002e-52 < z Initial program 69.9%
+-commutative69.9%
associate-+r-69.9%
*-commutative69.9%
associate-*r*70.0%
*-commutative70.0%
associate-+r-70.0%
+-commutative70.0%
associate-*l*70.0%
associate-*l*73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in z around inf 56.6%
associate-/l*59.1%
associate-*r*59.1%
*-commutative59.1%
associate-*r*59.1%
Simplified59.1%
if -9.0000000000000004e-94 < z < 3.1500000000000002e-52Initial program 93.1%
+-commutative93.1%
associate-+r-93.1%
*-commutative93.1%
associate-*r*95.0%
*-commutative95.0%
associate-+r-95.0%
+-commutative95.0%
associate-*l*95.0%
associate-*l*91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in b around inf 70.4%
Simplified67.7%
Taylor expanded in b around inf 57.7%
associate-/r*57.7%
Simplified57.7%
Final simplification58.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.7e-93) (not (<= z 6.6e-54))) (* a (* -4.0 (/ t c))) (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.7e-93) || !(z <= 6.6e-54)) {
tmp = a * (-4.0 * (t / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-2.7d-93)) .or. (.not. (z <= 6.6d-54))) then
tmp = a * ((-4.0d0) * (t / c))
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.7e-93) || !(z <= 6.6e-54)) {
tmp = a * (-4.0 * (t / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.7e-93) or not (z <= 6.6e-54): tmp = a * (-4.0 * (t / c)) else: tmp = b / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.7e-93) || !(z <= 6.6e-54)) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2.7e-93) || ~((z <= 6.6e-54)))
tmp = a * (-4.0 * (t / c));
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.7e-93], N[Not[LessEqual[z, 6.6e-54]], $MachinePrecision]], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-93} \lor \neg \left(z \leq 6.6 \cdot 10^{-54}\right):\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.7000000000000001e-93 or 6.59999999999999986e-54 < z Initial program 69.9%
+-commutative69.9%
associate-+r-69.9%
*-commutative69.9%
associate-*r*70.0%
*-commutative70.0%
associate-+r-70.0%
+-commutative70.0%
associate-*l*70.0%
associate-*l*73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in z around inf 56.6%
associate-/l*59.1%
associate-*r*59.1%
*-commutative59.1%
associate-*r*59.1%
Simplified59.1%
if -2.7000000000000001e-93 < z < 6.59999999999999986e-54Initial program 93.1%
+-commutative93.1%
associate-+r-93.1%
*-commutative93.1%
associate-*r*95.0%
*-commutative95.0%
associate-+r-95.0%
+-commutative95.0%
associate-*l*95.0%
associate-*l*91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in b around inf 57.7%
*-commutative57.7%
Simplified57.7%
Final simplification58.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -3.9e-93) (not (<= z 5.5e-54))) (* -4.0 (/ (* a t) c)) (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.9e-93) || !(z <= 5.5e-54)) {
tmp = -4.0 * ((a * t) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-3.9d-93)) .or. (.not. (z <= 5.5d-54))) then
tmp = (-4.0d0) * ((a * t) / c)
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.9e-93) || !(z <= 5.5e-54)) {
tmp = -4.0 * ((a * t) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -3.9e-93) or not (z <= 5.5e-54): tmp = -4.0 * ((a * t) / c) else: tmp = b / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -3.9e-93) || !(z <= 5.5e-54)) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -3.9e-93) || ~((z <= 5.5e-54)))
tmp = -4.0 * ((a * t) / c);
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -3.9e-93], N[Not[LessEqual[z, 5.5e-54]], $MachinePrecision]], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{-93} \lor \neg \left(z \leq 5.5 \cdot 10^{-54}\right):\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -3.90000000000000018e-93 or 5.50000000000000046e-54 < z Initial program 69.9%
+-commutative69.9%
associate-+r-69.9%
*-commutative69.9%
associate-*r*70.0%
*-commutative70.0%
associate-+r-70.0%
+-commutative70.0%
associate-*l*70.0%
associate-*l*73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in z around inf 56.6%
if -3.90000000000000018e-93 < z < 5.50000000000000046e-54Initial program 93.1%
+-commutative93.1%
associate-+r-93.1%
*-commutative93.1%
associate-*r*95.0%
*-commutative95.0%
associate-+r-95.0%
+-commutative95.0%
associate-*l*95.0%
associate-*l*91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in b around inf 57.7%
*-commutative57.7%
Simplified57.7%
Final simplification57.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 78.4%
+-commutative78.4%
associate-+r-78.4%
*-commutative78.4%
associate-*r*79.2%
*-commutative79.2%
associate-+r-79.2%
+-commutative79.2%
associate-*l*79.2%
associate-*l*79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in b around inf 34.4%
*-commutative34.4%
Simplified34.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024111
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))