
(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 16 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 -8.2e+134) (not (<= z 7.5e+19)))
(*
y
(- (/ (fma -4.0 (* a (/ t c)) (/ b (* c z))) y) (* (/ x z) (/ -9.0 c))))
(/ (+ b (fma x (* 9.0 y) (* t (* a (* z -4.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 <= -8.2e+134) || !(z <= 7.5e+19)) {
tmp = y * ((fma(-4.0, (a * (t / c)), (b / (c * z))) / y) - ((x / z) * (-9.0 / c)));
} else {
tmp = (b + fma(x, (9.0 * y), (t * (a * (z * -4.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 <= -8.2e+134) || !(z <= 7.5e+19)) tmp = Float64(y * Float64(Float64(fma(-4.0, Float64(a * Float64(t / c)), Float64(b / Float64(c * z))) / y) - Float64(Float64(x / z) * Float64(-9.0 / c)))); else tmp = Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(c * z)); 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, -8.2e+134], N[Not[LessEqual[z, 7.5e+19]], $MachinePrecision]], N[(y * N[(N[(N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] - N[(N[(x / z), $MachinePrecision] * N[(-9.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(c * 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 -8.2 \cdot 10^{+134} \lor \neg \left(z \leq 7.5 \cdot 10^{+19}\right):\\
\;\;\;\;y \cdot \left(\frac{\mathsf{fma}\left(-4, a \cdot \frac{t}{c}, \frac{b}{c \cdot z}\right)}{y} - \frac{x}{z} \cdot \frac{-9}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{c \cdot z}\\
\end{array}
\end{array}
if z < -8.2000000000000007e134 or 7.5e19 < z Initial program 50.7%
Simplified54.3%
Taylor expanded in y around -inf 73.5%
Simplified77.3%
if -8.2000000000000007e134 < z < 7.5e19Initial program 93.7%
Simplified93.8%
Final simplification88.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 (<= c 2.8e+43) (/ (- b (- (* (* z 4.0) (* t a)) (* x (* 9.0 y)))) (* c z)) (/ (fma -4.0 (* a (* t (/ z c))) (fma 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 tmp;
if (c <= 2.8e+43) {
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c * z);
} else {
tmp = fma(-4.0, (a * (t * (z / c))), fma(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) tmp = 0.0 if (c <= 2.8e+43) tmp = Float64(Float64(b - Float64(Float64(Float64(z * 4.0) * Float64(t * a)) - Float64(x * Float64(9.0 * y)))) / Float64(c * z)); else tmp = Float64(fma(-4.0, Float64(a * Float64(t * Float64(z / c))), fma(9.0, Float64(x * Float64(y / c)), Float64(b / c))) / z); 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[LessEqual[c, 2.8e+43], N[(N[(b - N[(N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(a * N[(t * N[(z / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $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}
\mathbf{if}\;c \leq 2.8 \cdot 10^{+43}:\\
\;\;\;\;\frac{b - \left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - x \cdot \left(9 \cdot y\right)\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4, a \cdot \left(t \cdot \frac{z}{c}\right), \mathsf{fma}\left(9, x \cdot \frac{y}{c}, \frac{b}{c}\right)\right)}{z}\\
\end{array}
\end{array}
if c < 2.80000000000000019e43Initial program 83.4%
+-commutative83.4%
associate-+r-83.4%
*-commutative83.4%
associate-*r*85.3%
*-commutative85.3%
associate-+r-85.3%
+-commutative85.3%
associate-*l*85.3%
associate-*l*86.3%
*-commutative86.3%
Simplified86.3%
if 2.80000000000000019e43 < c Initial program 68.7%
Simplified67.3%
Taylor expanded in z around 0 72.6%
fma-define72.6%
associate-/l*79.4%
associate-/l*77.9%
fma-define77.9%
associate-/l*84.6%
Simplified84.6%
Final simplification85.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -2.1e+128)
(/ (* y (+ (* -4.0 (/ (* t a) y)) (* 9.0 (/ x z)))) c)
(if (<= z 2.25e+20)
(/ (+ b (fma x (* 9.0 y) (* t (* a (* z -4.0))))) (* c z))
(*
y
(-
(/ (- (/ b (* c z)) (* 4.0 (/ (* t a) c))) y)
(* -9.0 (/ x (* 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 <= -2.1e+128) {
tmp = (y * ((-4.0 * ((t * a) / y)) + (9.0 * (x / z)))) / c;
} else if (z <= 2.25e+20) {
tmp = (b + fma(x, (9.0 * y), (t * (a * (z * -4.0))))) / (c * z);
} else {
tmp = y * ((((b / (c * z)) - (4.0 * ((t * a) / c))) / y) - (-9.0 * (x / (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 <= -2.1e+128) tmp = Float64(Float64(y * Float64(Float64(-4.0 * Float64(Float64(t * a) / y)) + Float64(9.0 * Float64(x / z)))) / c); elseif (z <= 2.25e+20) tmp = Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(c * z)); else tmp = Float64(y * Float64(Float64(Float64(Float64(b / Float64(c * z)) - Float64(4.0 * Float64(Float64(t * a) / c))) / y) - Float64(-9.0 * Float64(x / Float64(c * z))))); 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[LessEqual[z, -2.1e+128], N[(N[(y * N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 2.25e+20], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] - N[(-9.0 * N[(x / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+128}:\\
\;\;\;\;\frac{y \cdot \left(-4 \cdot \frac{t \cdot a}{y} + 9 \cdot \frac{x}{z}\right)}{c}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+20}:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{\frac{b}{c \cdot z} - 4 \cdot \frac{t \cdot a}{c}}{y} - -9 \cdot \frac{x}{c \cdot z}\right)\\
\end{array}
\end{array}
if z < -2.1e128Initial program 45.2%
+-commutative45.2%
associate-+r-45.2%
*-commutative45.2%
associate-*r*51.2%
*-commutative51.2%
associate-+r-51.2%
+-commutative51.2%
associate-*l*51.2%
associate-*l*56.6%
*-commutative56.6%
Simplified56.6%
Taylor expanded in y around inf 67.9%
Taylor expanded in b around 0 60.2%
times-frac54.7%
cancel-sign-sub-inv54.7%
metadata-eval54.7%
times-frac60.2%
times-frac54.7%
associate-*r/65.5%
Simplified65.5%
Taylor expanded in c around 0 78.5%
if -2.1e128 < z < 2.25e20Initial program 94.2%
Simplified94.3%
if 2.25e20 < z Initial program 54.8%
+-commutative54.8%
associate-+r-54.8%
*-commutative54.8%
associate-*r*56.8%
*-commutative56.8%
associate-+r-56.8%
+-commutative56.8%
associate-*l*56.7%
associate-*l*59.3%
*-commutative59.3%
Simplified59.3%
Taylor expanded in y around -inf 74.8%
Final simplification88.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= y -3.4e-12)
(* x (* (/ y c) (/ 9.0 z)))
(if (<= y 5e-285)
(* b (/ (+ (* 9.0 (* x (/ y b))) 1.0) (* c z)))
(if (<= y 3.6e+67)
(/ (+ (/ b c) (/ (* -4.0 (* z (* t a))) c)) z)
(/ (/ (+ b (* 9.0 (* x y))) 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 (y <= -3.4e-12) {
tmp = x * ((y / c) * (9.0 / z));
} else if (y <= 5e-285) {
tmp = b * (((9.0 * (x * (y / b))) + 1.0) / (c * z));
} else if (y <= 3.6e+67) {
tmp = ((b / c) + ((-4.0 * (z * (t * a))) / c)) / z;
} else {
tmp = ((b + (9.0 * (x * y))) / 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 (y <= (-3.4d-12)) then
tmp = x * ((y / c) * (9.0d0 / z))
else if (y <= 5d-285) then
tmp = b * (((9.0d0 * (x * (y / b))) + 1.0d0) / (c * z))
else if (y <= 3.6d+67) then
tmp = ((b / c) + (((-4.0d0) * (z * (t * a))) / c)) / z
else
tmp = ((b + (9.0d0 * (x * y))) / 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 (y <= -3.4e-12) {
tmp = x * ((y / c) * (9.0 / z));
} else if (y <= 5e-285) {
tmp = b * (((9.0 * (x * (y / b))) + 1.0) / (c * z));
} else if (y <= 3.6e+67) {
tmp = ((b / c) + ((-4.0 * (z * (t * a))) / c)) / z;
} else {
tmp = ((b + (9.0 * (x * y))) / 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 y <= -3.4e-12: tmp = x * ((y / c) * (9.0 / z)) elif y <= 5e-285: tmp = b * (((9.0 * (x * (y / b))) + 1.0) / (c * z)) elif y <= 3.6e+67: tmp = ((b / c) + ((-4.0 * (z * (t * a))) / c)) / z else: tmp = ((b + (9.0 * (x * y))) / 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 (y <= -3.4e-12) tmp = Float64(x * Float64(Float64(y / c) * Float64(9.0 / z))); elseif (y <= 5e-285) tmp = Float64(b * Float64(Float64(Float64(9.0 * Float64(x * Float64(y / b))) + 1.0) / Float64(c * z))); elseif (y <= 3.6e+67) tmp = Float64(Float64(Float64(b / c) + Float64(Float64(-4.0 * Float64(z * Float64(t * a))) / c)) / z); else tmp = Float64(Float64(Float64(b + Float64(9.0 * Float64(x * y))) / 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 (y <= -3.4e-12)
tmp = x * ((y / c) * (9.0 / z));
elseif (y <= 5e-285)
tmp = b * (((9.0 * (x * (y / b))) + 1.0) / (c * z));
elseif (y <= 3.6e+67)
tmp = ((b / c) + ((-4.0 * (z * (t * a))) / c)) / z;
else
tmp = ((b + (9.0 * (x * y))) / c) / z;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, -3.4e-12], N[(x * N[(N[(y / c), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e-285], N[(b * N[(N[(N[(9.0 * N[(x * N[(y / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+67], N[(N[(N[(b / c), $MachinePrecision] + N[(N[(-4.0 * N[(z * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{-12}:\\
\;\;\;\;x \cdot \left(\frac{y}{c} \cdot \frac{9}{z}\right)\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-285}:\\
\;\;\;\;b \cdot \frac{9 \cdot \left(x \cdot \frac{y}{b}\right) + 1}{c \cdot z}\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+67}:\\
\;\;\;\;\frac{\frac{b}{c} + \frac{-4 \cdot \left(z \cdot \left(t \cdot a\right)\right)}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}\\
\end{array}
\end{array}
if y < -3.4000000000000001e-12Initial program 66.0%
Simplified67.5%
Taylor expanded in x around inf 40.2%
*-commutative40.2%
*-commutative40.2%
*-commutative40.2%
times-frac51.6%
Simplified51.6%
Taylor expanded in y around 0 40.2%
associate-/l*48.2%
associate-*r*48.2%
*-commutative48.2%
associate-*r*48.2%
associate-*r/48.2%
*-commutative48.2%
times-frac51.2%
Simplified51.2%
if -3.4000000000000001e-12 < y < 5.00000000000000018e-285Initial program 85.6%
Simplified85.8%
Taylor expanded in b around inf 79.6%
Taylor expanded in a around 0 64.1%
associate-/l*65.5%
associate-*r/65.5%
Simplified65.5%
if 5.00000000000000018e-285 < y < 3.5999999999999999e67Initial program 83.7%
Simplified83.9%
Taylor expanded in z around 0 77.8%
associate-*r/77.8%
associate-*r*82.7%
Applied egg-rr82.7%
Taylor expanded in x around 0 71.0%
if 3.5999999999999999e67 < y Initial program 86.3%
Simplified90.1%
Taylor expanded in z around 0 84.0%
Taylor expanded in a around 0 84.0%
Taylor expanded in c around 0 84.2%
Final simplification67.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -6.4e+134)
(/ (* y (+ (* -4.0 (/ (* t a) y)) (* 9.0 (/ x z)))) c)
(if (<= z 8e+205)
(/ (+ b (- (* y (* x 9.0)) (* a (* (* z 4.0) t)))) (* c z))
(* y (+ (* 9.0 (/ x (* c z))) (* -4.0 (/ (* t (/ a c)) y)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -6.4e+134) {
tmp = (y * ((-4.0 * ((t * a) / y)) + (9.0 * (x / z)))) / c;
} else if (z <= 8e+205) {
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c * z);
} else {
tmp = y * ((9.0 * (x / (c * z))) + (-4.0 * ((t * (a / c)) / y)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-6.4d+134)) then
tmp = (y * (((-4.0d0) * ((t * a) / y)) + (9.0d0 * (x / z)))) / c
else if (z <= 8d+205) then
tmp = (b + ((y * (x * 9.0d0)) - (a * ((z * 4.0d0) * t)))) / (c * z)
else
tmp = y * ((9.0d0 * (x / (c * z))) + ((-4.0d0) * ((t * (a / c)) / y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -6.4e+134) {
tmp = (y * ((-4.0 * ((t * a) / y)) + (9.0 * (x / z)))) / c;
} else if (z <= 8e+205) {
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c * z);
} else {
tmp = y * ((9.0 * (x / (c * z))) + (-4.0 * ((t * (a / c)) / y)));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -6.4e+134: tmp = (y * ((-4.0 * ((t * a) / y)) + (9.0 * (x / z)))) / c elif z <= 8e+205: tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c * z) else: tmp = y * ((9.0 * (x / (c * z))) + (-4.0 * ((t * (a / c)) / y))) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -6.4e+134) tmp = Float64(Float64(y * Float64(Float64(-4.0 * Float64(Float64(t * a) / y)) + Float64(9.0 * Float64(x / z)))) / c); elseif (z <= 8e+205) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(Float64(z * 4.0) * t)))) / Float64(c * z)); else tmp = Float64(y * Float64(Float64(9.0 * Float64(x / Float64(c * z))) + Float64(-4.0 * Float64(Float64(t * Float64(a / c)) / y)))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -6.4e+134)
tmp = (y * ((-4.0 * ((t * a) / y)) + (9.0 * (x / z)))) / c;
elseif (z <= 8e+205)
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c * z);
else
tmp = y * ((9.0 * (x / (c * z))) + (-4.0 * ((t * (a / c)) / y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -6.4e+134], N[(N[(y * N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 8e+205], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(9.0 * N[(x / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{+134}:\\
\;\;\;\;\frac{y \cdot \left(-4 \cdot \frac{t \cdot a}{y} + 9 \cdot \frac{x}{z}\right)}{c}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+205}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(\left(z \cdot 4\right) \cdot t\right)\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(9 \cdot \frac{x}{c \cdot z} + -4 \cdot \frac{t \cdot \frac{a}{c}}{y}\right)\\
\end{array}
\end{array}
if z < -6.4000000000000001e134Initial program 45.0%
+-commutative45.0%
associate-+r-45.0%
*-commutative45.0%
associate-*r*51.1%
*-commutative51.1%
associate-+r-51.1%
+-commutative51.1%
associate-*l*51.1%
associate-*l*56.8%
*-commutative56.8%
Simplified56.8%
Taylor expanded in y around inf 69.0%
Taylor expanded in b around 0 60.8%
times-frac58.0%
cancel-sign-sub-inv58.0%
metadata-eval58.0%
times-frac60.8%
times-frac58.0%
associate-*r/66.3%
Simplified66.3%
Taylor expanded in c around 0 80.2%
if -6.4000000000000001e134 < z < 8.00000000000000013e205Initial program 90.5%
if 8.00000000000000013e205 < z Initial program 25.3%
+-commutative25.3%
associate-+r-25.3%
*-commutative25.3%
associate-*r*31.0%
*-commutative31.0%
associate-+r-31.0%
+-commutative31.0%
associate-*l*31.0%
associate-*l*31.3%
*-commutative31.3%
Simplified31.3%
Taylor expanded in y around inf 70.4%
Taylor expanded in b around 0 53.5%
times-frac70.3%
cancel-sign-sub-inv70.3%
metadata-eval70.3%
times-frac53.5%
times-frac70.3%
associate-*r/70.3%
Simplified70.3%
Final simplification87.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -8.2e+135)
(/ (* y (+ (* -4.0 (/ (* t a) y)) (* 9.0 (/ x z)))) c)
(if (<= z 2.2e+205)
(/ (- b (- (* (* z 4.0) (* t a)) (* x (* 9.0 y)))) (* c z))
(* y (+ (* 9.0 (/ x (* c z))) (* -4.0 (/ (* t (/ a c)) y)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -8.2e+135) {
tmp = (y * ((-4.0 * ((t * a) / y)) + (9.0 * (x / z)))) / c;
} else if (z <= 2.2e+205) {
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c * z);
} else {
tmp = y * ((9.0 * (x / (c * z))) + (-4.0 * ((t * (a / c)) / y)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-8.2d+135)) then
tmp = (y * (((-4.0d0) * ((t * a) / y)) + (9.0d0 * (x / z)))) / c
else if (z <= 2.2d+205) then
tmp = (b - (((z * 4.0d0) * (t * a)) - (x * (9.0d0 * y)))) / (c * z)
else
tmp = y * ((9.0d0 * (x / (c * z))) + ((-4.0d0) * ((t * (a / c)) / y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -8.2e+135) {
tmp = (y * ((-4.0 * ((t * a) / y)) + (9.0 * (x / z)))) / c;
} else if (z <= 2.2e+205) {
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c * z);
} else {
tmp = y * ((9.0 * (x / (c * z))) + (-4.0 * ((t * (a / c)) / y)));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -8.2e+135: tmp = (y * ((-4.0 * ((t * a) / y)) + (9.0 * (x / z)))) / c elif z <= 2.2e+205: tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c * z) else: tmp = y * ((9.0 * (x / (c * z))) + (-4.0 * ((t * (a / c)) / y))) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -8.2e+135) tmp = Float64(Float64(y * Float64(Float64(-4.0 * Float64(Float64(t * a) / y)) + Float64(9.0 * Float64(x / z)))) / c); elseif (z <= 2.2e+205) tmp = Float64(Float64(b - Float64(Float64(Float64(z * 4.0) * Float64(t * a)) - Float64(x * Float64(9.0 * y)))) / Float64(c * z)); else tmp = Float64(y * Float64(Float64(9.0 * Float64(x / Float64(c * z))) + Float64(-4.0 * Float64(Float64(t * Float64(a / c)) / y)))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -8.2e+135)
tmp = (y * ((-4.0 * ((t * a) / y)) + (9.0 * (x / z)))) / c;
elseif (z <= 2.2e+205)
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c * z);
else
tmp = y * ((9.0 * (x / (c * z))) + (-4.0 * ((t * (a / c)) / y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -8.2e+135], N[(N[(y * N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 2.2e+205], N[(N[(b - N[(N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(9.0 * N[(x / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+135}:\\
\;\;\;\;\frac{y \cdot \left(-4 \cdot \frac{t \cdot a}{y} + 9 \cdot \frac{x}{z}\right)}{c}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+205}:\\
\;\;\;\;\frac{b - \left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - x \cdot \left(9 \cdot y\right)\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(9 \cdot \frac{x}{c \cdot z} + -4 \cdot \frac{t \cdot \frac{a}{c}}{y}\right)\\
\end{array}
\end{array}
if z < -8.2e135Initial program 45.0%
+-commutative45.0%
associate-+r-45.0%
*-commutative45.0%
associate-*r*51.1%
*-commutative51.1%
associate-+r-51.1%
+-commutative51.1%
associate-*l*51.1%
associate-*l*56.8%
*-commutative56.8%
Simplified56.8%
Taylor expanded in y around inf 69.0%
Taylor expanded in b around 0 60.8%
times-frac58.0%
cancel-sign-sub-inv58.0%
metadata-eval58.0%
times-frac60.8%
times-frac58.0%
associate-*r/66.3%
Simplified66.3%
Taylor expanded in c around 0 80.2%
if -8.2e135 < z < 2.1999999999999998e205Initial program 90.5%
+-commutative90.5%
associate-+r-90.5%
*-commutative90.5%
associate-*r*90.0%
*-commutative90.0%
associate-+r-90.0%
+-commutative90.0%
associate-*l*90.5%
associate-*l*90.5%
*-commutative90.5%
Simplified90.5%
if 2.1999999999999998e205 < z Initial program 25.3%
+-commutative25.3%
associate-+r-25.3%
*-commutative25.3%
associate-*r*31.0%
*-commutative31.0%
associate-+r-31.0%
+-commutative31.0%
associate-*l*31.0%
associate-*l*31.3%
*-commutative31.3%
Simplified31.3%
Taylor expanded in y around inf 70.4%
Taylor expanded in b around 0 53.5%
times-frac70.3%
cancel-sign-sub-inv70.3%
metadata-eval70.3%
times-frac53.5%
times-frac70.3%
associate-*r/70.3%
Simplified70.3%
Final simplification87.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 (<= c 6.2e+42) (/ (- b (- (* (* z 4.0) (* t a)) (* x (* 9.0 y)))) (* c z)) (/ (+ (* -4.0 (/ (* a (* z t)) c)) (+ (/ b c) (* 9.0 (* x (/ y c))))) z)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 6.2e+42) {
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c * z);
} else {
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((b / c) + (9.0 * (x * (y / c))))) / z;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (c <= 6.2d+42) then
tmp = (b - (((z * 4.0d0) * (t * a)) - (x * (9.0d0 * y)))) / (c * z)
else
tmp = (((-4.0d0) * ((a * (z * t)) / c)) + ((b / c) + (9.0d0 * (x * (y / c))))) / z
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (c <= 6.2e+42) {
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c * z);
} else {
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((b / c) + (9.0 * (x * (y / c))))) / z;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if c <= 6.2e+42: tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c * z) else: tmp = ((-4.0 * ((a * (z * t)) / c)) + ((b / c) + (9.0 * (x * (y / c))))) / z return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (c <= 6.2e+42) tmp = Float64(Float64(b - Float64(Float64(Float64(z * 4.0) * Float64(t * a)) - Float64(x * Float64(9.0 * y)))) / Float64(c * z)); else tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(z * t)) / c)) + Float64(Float64(b / c) + Float64(9.0 * Float64(x * Float64(y / c))))) / z); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (c <= 6.2e+42)
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c * z);
else
tmp = ((-4.0 * ((a * (z * t)) / c)) + ((b / c) + (9.0 * (x * (y / c))))) / z;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 6.2e+42], N[(N[(b - N[(N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-4.0 * N[(N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(N[(b / c), $MachinePrecision] + N[(9.0 * N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}
\mathbf{if}\;c \leq 6.2 \cdot 10^{+42}:\\
\;\;\;\;\frac{b - \left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - x \cdot \left(9 \cdot y\right)\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c} + \left(\frac{b}{c} + 9 \cdot \left(x \cdot \frac{y}{c}\right)\right)}{z}\\
\end{array}
\end{array}
if c < 6.2000000000000003e42Initial program 83.4%
+-commutative83.4%
associate-+r-83.4%
*-commutative83.4%
associate-*r*85.3%
*-commutative85.3%
associate-+r-85.3%
+-commutative85.3%
associate-*l*85.3%
associate-*l*86.3%
*-commutative86.3%
Simplified86.3%
if 6.2000000000000003e42 < c Initial program 68.7%
Simplified67.3%
Taylor expanded in z around 0 72.6%
associate-/l*75.8%
Applied egg-rr75.8%
Final simplification84.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 (if (or (<= b -4.5e-30) (not (<= b 2.8e-54))) (* b (/ (+ (* 9.0 (* x (/ y b))) 1.0) (* c z))) (/ (* y (+ (* -4.0 (/ (* t a) y)) (* 9.0 (/ x z)))) c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -4.5e-30) || !(b <= 2.8e-54)) {
tmp = b * (((9.0 * (x * (y / b))) + 1.0) / (c * z));
} else {
tmp = (y * ((-4.0 * ((t * a) / y)) + (9.0 * (x / z)))) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b <= (-4.5d-30)) .or. (.not. (b <= 2.8d-54))) then
tmp = b * (((9.0d0 * (x * (y / b))) + 1.0d0) / (c * z))
else
tmp = (y * (((-4.0d0) * ((t * a) / y)) + (9.0d0 * (x / z)))) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -4.5e-30) || !(b <= 2.8e-54)) {
tmp = b * (((9.0 * (x * (y / b))) + 1.0) / (c * z));
} else {
tmp = (y * ((-4.0 * ((t * a) / y)) + (9.0 * (x / z)))) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -4.5e-30) or not (b <= 2.8e-54): tmp = b * (((9.0 * (x * (y / b))) + 1.0) / (c * z)) else: tmp = (y * ((-4.0 * ((t * a) / y)) + (9.0 * (x / z)))) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -4.5e-30) || !(b <= 2.8e-54)) tmp = Float64(b * Float64(Float64(Float64(9.0 * Float64(x * Float64(y / b))) + 1.0) / Float64(c * z))); else tmp = Float64(Float64(y * Float64(Float64(-4.0 * Float64(Float64(t * a) / y)) + Float64(9.0 * Float64(x / z)))) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((b <= -4.5e-30) || ~((b <= 2.8e-54)))
tmp = b * (((9.0 * (x * (y / b))) + 1.0) / (c * z));
else
tmp = (y * ((-4.0 * ((t * a) / y)) + (9.0 * (x / z)))) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -4.5e-30], N[Not[LessEqual[b, 2.8e-54]], $MachinePrecision]], N[(b * N[(N[(N[(9.0 * N[(x * N[(y / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.5 \cdot 10^{-30} \lor \neg \left(b \leq 2.8 \cdot 10^{-54}\right):\\
\;\;\;\;b \cdot \frac{9 \cdot \left(x \cdot \frac{y}{b}\right) + 1}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(-4 \cdot \frac{t \cdot a}{y} + 9 \cdot \frac{x}{z}\right)}{c}\\
\end{array}
\end{array}
if b < -4.49999999999999967e-30 or 2.8000000000000002e-54 < b Initial program 83.0%
Simplified85.6%
Taylor expanded in b around inf 83.6%
Taylor expanded in a around 0 78.5%
associate-/l*78.4%
associate-*r/81.0%
Simplified81.0%
if -4.49999999999999967e-30 < b < 2.8000000000000002e-54Initial program 76.1%
+-commutative76.1%
associate-+r-76.1%
*-commutative76.1%
associate-*r*75.3%
*-commutative75.3%
associate-+r-75.3%
+-commutative75.3%
associate-*l*75.3%
associate-*l*78.1%
*-commutative78.1%
Simplified78.1%
Taylor expanded in y around inf 69.0%
Taylor expanded in b around 0 69.8%
times-frac67.7%
cancel-sign-sub-inv67.7%
metadata-eval67.7%
times-frac69.8%
times-frac67.7%
associate-*r/75.9%
Simplified75.9%
Taylor expanded in c around 0 80.2%
Final simplification80.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 (<= b -1.4e-23)
(/ 1.0 (* z (/ c b)))
(if (<= b 3.7e-233)
(* -4.0 (* t (/ a c)))
(if (<= b 1.3e-97) (/ (* y (* x 9.0)) (* c z)) (/ b (* c z))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -1.4e-23) {
tmp = 1.0 / (z * (c / b));
} else if (b <= 3.7e-233) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 1.3e-97) {
tmp = (y * (x * 9.0)) / (c * z);
} else {
tmp = b / (c * z);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-1.4d-23)) then
tmp = 1.0d0 / (z * (c / b))
else if (b <= 3.7d-233) then
tmp = (-4.0d0) * (t * (a / c))
else if (b <= 1.3d-97) then
tmp = (y * (x * 9.0d0)) / (c * z)
else
tmp = b / (c * z)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -1.4e-23) {
tmp = 1.0 / (z * (c / b));
} else if (b <= 3.7e-233) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 1.3e-97) {
tmp = (y * (x * 9.0)) / (c * z);
} else {
tmp = b / (c * z);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if b <= -1.4e-23: tmp = 1.0 / (z * (c / b)) elif b <= 3.7e-233: tmp = -4.0 * (t * (a / c)) elif b <= 1.3e-97: tmp = (y * (x * 9.0)) / (c * z) else: tmp = b / (c * z) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -1.4e-23) tmp = Float64(1.0 / Float64(z * Float64(c / b))); elseif (b <= 3.7e-233) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (b <= 1.3e-97) tmp = Float64(Float64(y * Float64(x * 9.0)) / Float64(c * z)); else tmp = Float64(b / Float64(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 (b <= -1.4e-23)
tmp = 1.0 / (z * (c / b));
elseif (b <= 3.7e-233)
tmp = -4.0 * (t * (a / c));
elseif (b <= 1.3e-97)
tmp = (y * (x * 9.0)) / (c * z);
else
tmp = b / (c * z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -1.4e-23], N[(1.0 / N[(z * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.7e-233], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.3e-97], N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(b / N[(c * 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}\;b \leq -1.4 \cdot 10^{-23}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c}{b}}\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{-233}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;b \leq 1.3 \cdot 10^{-97}:\\
\;\;\;\;\frac{y \cdot \left(x \cdot 9\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\end{array}
\end{array}
if b < -1.3999999999999999e-23Initial program 82.4%
Simplified83.9%
Taylor expanded in b around inf 60.7%
*-commutative60.7%
Simplified60.7%
clear-num60.8%
inv-pow60.8%
Applied egg-rr60.8%
unpow-160.8%
associate-/l*62.3%
Simplified62.3%
if -1.3999999999999999e-23 < b < 3.6999999999999998e-233Initial program 74.6%
Simplified73.4%
Taylor expanded in t around inf 49.2%
associate-*l/56.8%
Applied egg-rr56.8%
if 3.6999999999999998e-233 < b < 1.30000000000000003e-97Initial program 86.3%
Simplified83.3%
Taylor expanded in b around inf 72.7%
Taylor expanded in x around inf 66.6%
associate-*r*66.6%
Simplified66.6%
if 1.30000000000000003e-97 < b Initial program 80.9%
Simplified85.5%
Taylor expanded in b around inf 66.1%
*-commutative66.1%
Simplified66.1%
Final simplification62.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -9.8e-24)
(/ 1.0 (* z (/ c b)))
(if (<= b 3.7e-233)
(* -4.0 (* t (/ a c)))
(if (<= b 3.4e-107) (* 9.0 (/ (* x y) (* c z))) (/ b (* c z))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -9.8e-24) {
tmp = 1.0 / (z * (c / b));
} else if (b <= 3.7e-233) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 3.4e-107) {
tmp = 9.0 * ((x * y) / (c * z));
} else {
tmp = b / (c * z);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-9.8d-24)) then
tmp = 1.0d0 / (z * (c / b))
else if (b <= 3.7d-233) then
tmp = (-4.0d0) * (t * (a / c))
else if (b <= 3.4d-107) then
tmp = 9.0d0 * ((x * y) / (c * z))
else
tmp = b / (c * z)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -9.8e-24) {
tmp = 1.0 / (z * (c / b));
} else if (b <= 3.7e-233) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 3.4e-107) {
tmp = 9.0 * ((x * y) / (c * z));
} else {
tmp = b / (c * z);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if b <= -9.8e-24: tmp = 1.0 / (z * (c / b)) elif b <= 3.7e-233: tmp = -4.0 * (t * (a / c)) elif b <= 3.4e-107: tmp = 9.0 * ((x * y) / (c * z)) else: tmp = b / (c * z) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -9.8e-24) tmp = Float64(1.0 / Float64(z * Float64(c / b))); elseif (b <= 3.7e-233) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (b <= 3.4e-107) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c * z))); else tmp = Float64(b / Float64(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 (b <= -9.8e-24)
tmp = 1.0 / (z * (c / b));
elseif (b <= 3.7e-233)
tmp = -4.0 * (t * (a / c));
elseif (b <= 3.4e-107)
tmp = 9.0 * ((x * y) / (c * z));
else
tmp = b / (c * z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -9.8e-24], N[(1.0 / N[(z * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.7e-233], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.4e-107], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(c * 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}\;b \leq -9.8 \cdot 10^{-24}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c}{b}}\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{-233}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{-107}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\end{array}
\end{array}
if b < -9.8000000000000002e-24Initial program 82.4%
Simplified83.9%
Taylor expanded in b around inf 60.7%
*-commutative60.7%
Simplified60.7%
clear-num60.8%
inv-pow60.8%
Applied egg-rr60.8%
unpow-160.8%
associate-/l*62.3%
Simplified62.3%
if -9.8000000000000002e-24 < b < 3.6999999999999998e-233Initial program 74.6%
Simplified73.4%
Taylor expanded in t around inf 49.2%
associate-*l/56.8%
Applied egg-rr56.8%
if 3.6999999999999998e-233 < b < 3.39999999999999994e-107Initial program 86.3%
Simplified83.3%
Taylor expanded in x around inf 66.5%
if 3.39999999999999994e-107 < b Initial program 80.9%
Simplified85.5%
Taylor expanded in b around inf 66.1%
*-commutative66.1%
Simplified66.1%
Final simplification62.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -3.6e-24)
(/ 1.0 (* z (/ c b)))
(if (<= b 3.8e-233)
(* -4.0 (* t (/ a c)))
(if (<= b 1.4e-97) (* 9.0 (* x (/ y (* c z)))) (/ b (* c z))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.6e-24) {
tmp = 1.0 / (z * (c / b));
} else if (b <= 3.8e-233) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 1.4e-97) {
tmp = 9.0 * (x * (y / (c * z)));
} else {
tmp = b / (c * z);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-3.6d-24)) then
tmp = 1.0d0 / (z * (c / b))
else if (b <= 3.8d-233) then
tmp = (-4.0d0) * (t * (a / c))
else if (b <= 1.4d-97) then
tmp = 9.0d0 * (x * (y / (c * z)))
else
tmp = b / (c * z)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.6e-24) {
tmp = 1.0 / (z * (c / b));
} else if (b <= 3.8e-233) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 1.4e-97) {
tmp = 9.0 * (x * (y / (c * z)));
} else {
tmp = b / (c * z);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if b <= -3.6e-24: tmp = 1.0 / (z * (c / b)) elif b <= 3.8e-233: tmp = -4.0 * (t * (a / c)) elif b <= 1.4e-97: tmp = 9.0 * (x * (y / (c * z))) else: tmp = b / (c * z) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -3.6e-24) tmp = Float64(1.0 / Float64(z * Float64(c / b))); elseif (b <= 3.8e-233) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (b <= 1.4e-97) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(c * z)))); else tmp = Float64(b / Float64(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 (b <= -3.6e-24)
tmp = 1.0 / (z * (c / b));
elseif (b <= 3.8e-233)
tmp = -4.0 * (t * (a / c));
elseif (b <= 1.4e-97)
tmp = 9.0 * (x * (y / (c * z)));
else
tmp = b / (c * z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -3.6e-24], N[(1.0 / N[(z * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.8e-233], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.4e-97], N[(9.0 * N[(x * N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(c * 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}\;b \leq -3.6 \cdot 10^{-24}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c}{b}}\\
\mathbf{elif}\;b \leq 3.8 \cdot 10^{-233}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{-97}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{c \cdot z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\end{array}
\end{array}
if b < -3.6000000000000001e-24Initial program 82.4%
Simplified83.9%
Taylor expanded in b around inf 60.7%
*-commutative60.7%
Simplified60.7%
clear-num60.8%
inv-pow60.8%
Applied egg-rr60.8%
unpow-160.8%
associate-/l*62.3%
Simplified62.3%
if -3.6000000000000001e-24 < b < 3.8e-233Initial program 74.6%
Simplified73.4%
Taylor expanded in t around inf 49.2%
associate-*l/56.8%
Applied egg-rr56.8%
if 3.8e-233 < b < 1.4000000000000001e-97Initial program 86.3%
Simplified83.3%
Taylor expanded in x around inf 66.5%
associate-/l*63.1%
*-commutative63.1%
Simplified63.1%
if 1.4000000000000001e-97 < b Initial program 80.9%
Simplified85.5%
Taylor expanded in b around inf 66.1%
*-commutative66.1%
Simplified66.1%
Final simplification62.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= y -1e-13)
(* x (* (/ y c) (/ 9.0 z)))
(if (<= y 2.4e+34)
(/ (- b (* 4.0 (* a (* z t)))) (* c z))
(/ (/ (+ b (* 9.0 (* x y))) 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 (y <= -1e-13) {
tmp = x * ((y / c) * (9.0 / z));
} else if (y <= 2.4e+34) {
tmp = (b - (4.0 * (a * (z * t)))) / (c * z);
} else {
tmp = ((b + (9.0 * (x * y))) / 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 (y <= (-1d-13)) then
tmp = x * ((y / c) * (9.0d0 / z))
else if (y <= 2.4d+34) then
tmp = (b - (4.0d0 * (a * (z * t)))) / (c * z)
else
tmp = ((b + (9.0d0 * (x * y))) / 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 (y <= -1e-13) {
tmp = x * ((y / c) * (9.0 / z));
} else if (y <= 2.4e+34) {
tmp = (b - (4.0 * (a * (z * t)))) / (c * z);
} else {
tmp = ((b + (9.0 * (x * y))) / 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 y <= -1e-13: tmp = x * ((y / c) * (9.0 / z)) elif y <= 2.4e+34: tmp = (b - (4.0 * (a * (z * t)))) / (c * z) else: tmp = ((b + (9.0 * (x * y))) / 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 (y <= -1e-13) tmp = Float64(x * Float64(Float64(y / c) * Float64(9.0 / z))); elseif (y <= 2.4e+34) tmp = Float64(Float64(b - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(c * z)); else tmp = Float64(Float64(Float64(b + Float64(9.0 * Float64(x * y))) / 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 (y <= -1e-13)
tmp = x * ((y / c) * (9.0 / z));
elseif (y <= 2.4e+34)
tmp = (b - (4.0 * (a * (z * t)))) / (c * z);
else
tmp = ((b + (9.0 * (x * y))) / c) / z;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, -1e-13], N[(x * N[(N[(y / c), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+34], N[(N[(b - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-13}:\\
\;\;\;\;x \cdot \left(\frac{y}{c} \cdot \frac{9}{z}\right)\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+34}:\\
\;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}\\
\end{array}
\end{array}
if y < -1e-13Initial program 67.0%
Simplified68.5%
Taylor expanded in x around inf 40.5%
*-commutative40.5%
*-commutative40.5%
*-commutative40.5%
times-frac50.2%
Simplified50.2%
Taylor expanded in y around 0 40.5%
associate-/l*48.2%
associate-*r*48.3%
*-commutative48.3%
associate-*r*48.2%
associate-*r/48.2%
*-commutative48.2%
times-frac51.2%
Simplified51.2%
if -1e-13 < y < 2.39999999999999987e34Initial program 84.3%
+-commutative84.3%
associate-+r-84.3%
*-commutative84.3%
associate-*r*82.9%
*-commutative82.9%
associate-+r-82.9%
+-commutative82.9%
associate-*l*83.7%
associate-*l*84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in x around 0 75.3%
if 2.39999999999999987e34 < y Initial program 86.2%
Simplified91.3%
Taylor expanded in z around 0 84.2%
Taylor expanded in a around 0 84.2%
Taylor expanded in c around 0 84.4%
Final simplification70.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= a -1.1e-25) (not (<= a 1.05e+148))) (* -4.0 (* t (/ a c))) (/ (+ b (* 9.0 (* x y))) (* 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 ((a <= -1.1e-25) || !(a <= 1.05e+148)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = (b + (9.0 * (x * y))) / (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 ((a <= (-1.1d-25)) .or. (.not. (a <= 1.05d+148))) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = (b + (9.0d0 * (x * y))) / (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 ((a <= -1.1e-25) || !(a <= 1.05e+148)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = (b + (9.0 * (x * y))) / (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 (a <= -1.1e-25) or not (a <= 1.05e+148): tmp = -4.0 * (t * (a / c)) else: tmp = (b + (9.0 * (x * y))) / (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 ((a <= -1.1e-25) || !(a <= 1.05e+148)) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(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 ((a <= -1.1e-25) || ~((a <= 1.05e+148)))
tmp = -4.0 * (t * (a / c));
else
tmp = (b + (9.0 * (x * y))) / (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[a, -1.1e-25], N[Not[LessEqual[a, 1.05e+148]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * 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}\;a \leq -1.1 \cdot 10^{-25} \lor \neg \left(a \leq 1.05 \cdot 10^{+148}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\\
\end{array}
\end{array}
if a < -1.1000000000000001e-25 or 1.04999999999999999e148 < a Initial program 78.5%
Simplified74.0%
Taylor expanded in t around inf 46.9%
associate-*l/58.9%
Applied egg-rr58.9%
if -1.1000000000000001e-25 < a < 1.04999999999999999e148Initial program 80.9%
Simplified85.0%
Taylor expanded in t around 0 73.6%
+-commutative73.6%
*-commutative73.6%
Simplified73.6%
Final simplification68.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 (<= b -3.8e-26) (/ 1.0 (* z (/ c b))) (if (<= b 7e-54) (* -4.0 (* t (/ a c))) (/ b (* c z)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.8e-26) {
tmp = 1.0 / (z * (c / b));
} else if (b <= 7e-54) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (c * z);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-3.8d-26)) then
tmp = 1.0d0 / (z * (c / b))
else if (b <= 7d-54) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = b / (c * z)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.8e-26) {
tmp = 1.0 / (z * (c / b));
} else if (b <= 7e-54) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (c * z);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if b <= -3.8e-26: tmp = 1.0 / (z * (c / b)) elif b <= 7e-54: tmp = -4.0 * (t * (a / c)) else: tmp = b / (c * z) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -3.8e-26) tmp = Float64(1.0 / Float64(z * Float64(c / b))); elseif (b <= 7e-54) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(b / Float64(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 (b <= -3.8e-26)
tmp = 1.0 / (z * (c / b));
elseif (b <= 7e-54)
tmp = -4.0 * (t * (a / c));
else
tmp = b / (c * z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -3.8e-26], N[(1.0 / N[(z * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7e-54], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(c * 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}\;b \leq -3.8 \cdot 10^{-26}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c}{b}}\\
\mathbf{elif}\;b \leq 7 \cdot 10^{-54}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\end{array}
\end{array}
if b < -3.80000000000000015e-26Initial program 82.4%
Simplified83.9%
Taylor expanded in b around inf 60.7%
*-commutative60.7%
Simplified60.7%
clear-num60.8%
inv-pow60.8%
Applied egg-rr60.8%
unpow-160.8%
associate-/l*62.3%
Simplified62.3%
if -3.80000000000000015e-26 < b < 6.99999999999999964e-54Initial program 76.5%
Simplified75.8%
Taylor expanded in t around inf 48.3%
associate-*l/52.7%
Applied egg-rr52.7%
if 6.99999999999999964e-54 < b Initial program 83.1%
Simplified86.7%
Taylor expanded in b around inf 68.3%
*-commutative68.3%
Simplified68.3%
Final simplification60.1%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= b -5.4e-24) (/ (/ b c) z) (if (<= b 2.3e-54) (* -4.0 (* t (/ a c))) (/ b (* c z)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -5.4e-24) {
tmp = (b / c) / z;
} else if (b <= 2.3e-54) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (c * z);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-5.4d-24)) then
tmp = (b / c) / z
else if (b <= 2.3d-54) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = b / (c * z)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -5.4e-24) {
tmp = (b / c) / z;
} else if (b <= 2.3e-54) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (c * z);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if b <= -5.4e-24: tmp = (b / c) / z elif b <= 2.3e-54: tmp = -4.0 * (t * (a / c)) else: tmp = b / (c * z) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -5.4e-24) tmp = Float64(Float64(b / c) / z); elseif (b <= 2.3e-54) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(b / Float64(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 (b <= -5.4e-24)
tmp = (b / c) / z;
elseif (b <= 2.3e-54)
tmp = -4.0 * (t * (a / c));
else
tmp = b / (c * z);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -5.4e-24], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 2.3e-54], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(c * 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}\;b \leq -5.4 \cdot 10^{-24}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;b \leq 2.3 \cdot 10^{-54}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\end{array}
\end{array}
if b < -5.40000000000000014e-24Initial program 82.4%
Simplified83.9%
Taylor expanded in z around 0 75.3%
associate-*r/75.3%
associate-*r*75.3%
Applied egg-rr75.3%
Taylor expanded in b around inf 60.7%
associate-/r*62.2%
Simplified62.2%
if -5.40000000000000014e-24 < b < 2.2999999999999999e-54Initial program 76.5%
Simplified75.8%
Taylor expanded in t around inf 48.3%
associate-*l/52.7%
Applied egg-rr52.7%
if 2.2999999999999999e-54 < b Initial program 83.1%
Simplified86.7%
Taylor expanded in b around inf 68.3%
*-commutative68.3%
Simplified68.3%
Final simplification60.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 (* 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) {
return b / (c * z);
}
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 / (c * z)
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 / (c * z);
}
[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 / (c * z)
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(c * z)) 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 / (c * z);
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[(c * 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])\\
\\
\frac{b}{c \cdot z}
\end{array}
Initial program 80.1%
Simplified81.3%
Taylor expanded in b around inf 45.3%
*-commutative45.3%
Simplified45.3%
Final simplification45.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024135
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -220031348160821/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 0) (/ (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 365902434742109/31250000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 28768236795461370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 138385150424563190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (- (+ (* 9 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4 (/ (* a t) c)))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))