
(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 -1.2e+16) (not (<= z 3700000000.0))) (/ (* y (- (+ (* 9.0 (/ x z)) (/ b (* z y))) (* 4.0 (/ (* a t) y)))) c) (/ (+ b (fma x (* y 9.0) (* 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 <= -1.2e+16) || !(z <= 3700000000.0)) {
tmp = (y * (((9.0 * (x / z)) + (b / (z * y))) - (4.0 * ((a * t) / y)))) / c;
} else {
tmp = (b + fma(x, (y * 9.0), (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 <= -1.2e+16) || !(z <= 3700000000.0)) tmp = Float64(Float64(y * Float64(Float64(Float64(9.0 * Float64(x / z)) + Float64(b / Float64(z * y))) - Float64(4.0 * Float64(Float64(a * t) / y)))) / c); else tmp = Float64(Float64(b + fma(x, Float64(y * 9.0), 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, -1.2e+16], N[Not[LessEqual[z, 3700000000.0]], $MachinePrecision]], N[(N[(y * N[(N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(x * N[(y * 9.0), $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 -1.2 \cdot 10^{+16} \lor \neg \left(z \leq 3700000000\right):\\
\;\;\;\;\frac{y \cdot \left(\left(9 \cdot \frac{x}{z} + \frac{b}{z \cdot y}\right) - 4 \cdot \frac{a \cdot t}{y}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, y \cdot 9, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.2e16 or 3.7e9 < z Initial program 64.7%
+-commutative64.7%
associate-+r-64.7%
*-commutative64.7%
associate-*r*61.5%
*-commutative61.5%
associate-+r-61.5%
+-commutative61.5%
associate-*l*60.7%
associate-*l*68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in y around inf 74.3%
Taylor expanded in c around 0 86.7%
if -1.2e16 < z < 3.7e9Initial program 94.3%
Simplified94.0%
Final simplification90.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.2e+16) (not (<= z 4600000000.0))) (/ (* y (- (+ (* 9.0 (/ x z)) (/ b (* z y))) (* 4.0 (/ (* a t) y)))) 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 <= -2.2e+16) || !(z <= 4600000000.0)) {
tmp = (y * (((9.0 * (x / z)) + (b / (z * y))) - (4.0 * ((a * t) / y)))) / 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 <= (-2.2d+16)) .or. (.not. (z <= 4600000000.0d0))) then
tmp = (y * (((9.0d0 * (x / z)) + (b / (z * y))) - (4.0d0 * ((a * t) / y)))) / 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 <= -2.2e+16) || !(z <= 4600000000.0)) {
tmp = (y * (((9.0 * (x / z)) + (b / (z * y))) - (4.0 * ((a * t) / y)))) / 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 <= -2.2e+16) or not (z <= 4600000000.0): tmp = (y * (((9.0 * (x / z)) + (b / (z * y))) - (4.0 * ((a * t) / y)))) / 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 <= -2.2e+16) || !(z <= 4600000000.0)) tmp = Float64(Float64(y * Float64(Float64(Float64(9.0 * Float64(x / z)) + Float64(b / Float64(z * y))) - Float64(4.0 * Float64(Float64(a * t) / y)))) / 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 <= -2.2e+16) || ~((z <= 4600000000.0)))
tmp = (y * (((9.0 * (x / z)) + (b / (z * y))) - (4.0 * ((a * t) / y)))) / 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, -2.2e+16], N[Not[LessEqual[z, 4600000000.0]], $MachinePrecision]], N[(N[(y * N[(N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / y), $MachinePrecision]), $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 -2.2 \cdot 10^{+16} \lor \neg \left(z \leq 4600000000\right):\\
\;\;\;\;\frac{y \cdot \left(\left(9 \cdot \frac{x}{z} + \frac{b}{z \cdot y}\right) - 4 \cdot \frac{a \cdot t}{y}\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 < -2.2e16 or 4.6e9 < z Initial program 64.7%
+-commutative64.7%
associate-+r-64.7%
*-commutative64.7%
associate-*r*61.5%
*-commutative61.5%
associate-+r-61.5%
+-commutative61.5%
associate-*l*60.7%
associate-*l*68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in y around inf 74.3%
Taylor expanded in c around 0 86.7%
if -2.2e16 < z < 4.6e9Initial program 94.3%
Final simplification90.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -6e+41)
(/ (- (/ b z) (* 4.0 (* a t))) c)
(if (<= z 3.8e+113)
(/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))
(/ (* y (- (* 9.0 (/ x z)) (/ (* t (* 4.0 a)) y))) c))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -6e+41) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else if (z <= 3.8e+113) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-6d+41)) then
tmp = ((b / z) - (4.0d0 * (a * t))) / c
else if (z <= 3.8d+113) then
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
else
tmp = (y * ((9.0d0 * (x / z)) - ((t * (4.0d0 * a)) / y))) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -6e+41) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else if (z <= 3.8e+113) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -6e+41: tmp = ((b / z) - (4.0 * (a * t))) / c elif z <= 3.8e+113: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) else: tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -6e+41) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c); elseif (z <= 3.8e+113) tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(Float64(y * Float64(Float64(9.0 * Float64(x / z)) - Float64(Float64(t * Float64(4.0 * a)) / y))) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -6e+41)
tmp = ((b / z) - (4.0 * (a * t))) / c;
elseif (z <= 3.8e+113)
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
else
tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -6e+41], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 3.8e+113], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(N[(t * N[(4.0 * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+41}:\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+113}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{z} - \frac{t \cdot \left(4 \cdot a\right)}{y}\right)}{c}\\
\end{array}
\end{array}
if z < -5.9999999999999997e41Initial program 68.1%
+-commutative68.1%
associate-+r-68.1%
*-commutative68.1%
associate-*r*61.6%
*-commutative61.6%
associate-+r-61.6%
+-commutative61.6%
associate-*l*59.9%
associate-*l*72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in y around inf 72.0%
Taylor expanded in c around 0 84.3%
Taylor expanded in y around 0 84.1%
if -5.9999999999999997e41 < z < 3.8000000000000003e113Initial program 94.3%
if 3.8000000000000003e113 < z Initial program 45.4%
+-commutative45.4%
associate-+r-45.4%
*-commutative45.4%
associate-*r*45.2%
*-commutative45.2%
associate-+r-45.2%
+-commutative45.2%
associate-*l*45.2%
associate-*l*50.2%
*-commutative50.2%
Simplified50.2%
Taylor expanded in y around inf 65.1%
Taylor expanded in c around 0 83.5%
Taylor expanded in b around 0 76.5%
associate-*r/76.5%
associate-*r*76.5%
Simplified76.5%
Final simplification89.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
(if (<= z -4e+41)
(/ (- (/ b z) (* 4.0 (* a t))) c)
(if (<= z 2.5e+161)
(/ (+ b (- (* x (* y 9.0)) (* (* a t) (* z 4.0)))) (* z c))
(/ (* y (- (* 9.0 (/ x z)) (/ (* t (* 4.0 a)) y))) 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 <= -4e+41) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else if (z <= 2.5e+161) {
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / 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 <= (-4d+41)) then
tmp = ((b / z) - (4.0d0 * (a * t))) / c
else if (z <= 2.5d+161) then
tmp = (b + ((x * (y * 9.0d0)) - ((a * t) * (z * 4.0d0)))) / (z * c)
else
tmp = (y * ((9.0d0 * (x / z)) - ((t * (4.0d0 * a)) / y))) / 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 <= -4e+41) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else if (z <= 2.5e+161) {
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (z * c);
} else {
tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / 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 <= -4e+41: tmp = ((b / z) - (4.0 * (a * t))) / c elif z <= 2.5e+161: tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (z * c) else: tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / 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 <= -4e+41) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c); elseif (z <= 2.5e+161) tmp = Float64(Float64(b + Float64(Float64(x * Float64(y * 9.0)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); else tmp = Float64(Float64(y * Float64(Float64(9.0 * Float64(x / z)) - Float64(Float64(t * Float64(4.0 * a)) / y))) / 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 <= -4e+41)
tmp = ((b / z) - (4.0 * (a * t))) / c;
elseif (z <= 2.5e+161)
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (z * c);
else
tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -4e+41], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 2.5e+161], N[(N[(b + N[(N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(N[(t * N[(4.0 * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+41}:\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+161}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(y \cdot 9\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{z} - \frac{t \cdot \left(4 \cdot a\right)}{y}\right)}{c}\\
\end{array}
\end{array}
if z < -4.00000000000000002e41Initial program 68.1%
+-commutative68.1%
associate-+r-68.1%
*-commutative68.1%
associate-*r*61.6%
*-commutative61.6%
associate-+r-61.6%
+-commutative61.6%
associate-*l*59.9%
associate-*l*72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in y around inf 72.0%
Taylor expanded in c around 0 84.3%
Taylor expanded in y around 0 84.1%
if -4.00000000000000002e41 < z < 2.4999999999999998e161Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
*-commutative93.5%
associate-*r*92.1%
*-commutative92.1%
associate-+r-92.1%
+-commutative92.1%
associate-*l*92.2%
associate-*l*90.1%
*-commutative90.1%
Simplified90.1%
if 2.4999999999999998e161 < z Initial program 34.1%
+-commutative34.1%
associate-+r-34.1%
*-commutative34.1%
associate-*r*39.9%
*-commutative39.9%
associate-+r-39.9%
+-commutative39.9%
associate-*l*40.0%
associate-*l*40.5%
*-commutative40.5%
Simplified40.5%
Taylor expanded in y around inf 59.6%
Taylor expanded in c around 0 81.4%
Taylor expanded in b around 0 75.3%
associate-*r/75.3%
associate-*r*75.3%
Simplified75.3%
Final simplification87.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 (<= y -780000.0)
(/ (* y (- (* 9.0 (/ x z)) (/ (* t (* 4.0 a)) y))) c)
(if (<= y 3.7e+53)
(/ (- (/ b z) (* 4.0 (* a t))) c)
(* y (+ (* (/ 9.0 z) (/ x c)) (/ (* (* a t) -4.0) (* y c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -780000.0) {
tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / c;
} else if (y <= 3.7e+53) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = y * (((9.0 / z) * (x / c)) + (((a * t) * -4.0) / (y * c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (y <= (-780000.0d0)) then
tmp = (y * ((9.0d0 * (x / z)) - ((t * (4.0d0 * a)) / y))) / c
else if (y <= 3.7d+53) then
tmp = ((b / z) - (4.0d0 * (a * t))) / c
else
tmp = y * (((9.0d0 / z) * (x / c)) + (((a * t) * (-4.0d0)) / (y * c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -780000.0) {
tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / c;
} else if (y <= 3.7e+53) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = y * (((9.0 / z) * (x / c)) + (((a * t) * -4.0) / (y * c)));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if y <= -780000.0: tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / c elif y <= 3.7e+53: tmp = ((b / z) - (4.0 * (a * t))) / c else: tmp = y * (((9.0 / z) * (x / c)) + (((a * t) * -4.0) / (y * 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 (y <= -780000.0) tmp = Float64(Float64(y * Float64(Float64(9.0 * Float64(x / z)) - Float64(Float64(t * Float64(4.0 * a)) / y))) / c); elseif (y <= 3.7e+53) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(y * Float64(Float64(Float64(9.0 / z) * Float64(x / c)) + Float64(Float64(Float64(a * t) * -4.0) / Float64(y * c)))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (y <= -780000.0)
tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / c;
elseif (y <= 3.7e+53)
tmp = ((b / z) - (4.0 * (a * t))) / c;
else
tmp = y * (((9.0 / z) * (x / c)) + (((a * t) * -4.0) / (y * 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[y, -780000.0], N[(N[(y * N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(N[(t * N[(4.0 * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[y, 3.7e+53], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(y * N[(N[(N[(9.0 / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] / N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -780000:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{z} - \frac{t \cdot \left(4 \cdot a\right)}{y}\right)}{c}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+53}:\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{9}{z} \cdot \frac{x}{c} + \frac{\left(a \cdot t\right) \cdot -4}{y \cdot c}\right)\\
\end{array}
\end{array}
if y < -7.8e5Initial program 80.2%
+-commutative80.2%
associate-+r-80.2%
*-commutative80.2%
associate-*r*80.2%
*-commutative80.2%
associate-+r-80.2%
+-commutative80.2%
associate-*l*80.2%
associate-*l*74.2%
*-commutative74.2%
Simplified74.2%
Taylor expanded in y around inf 76.8%
Taylor expanded in c around 0 86.2%
Taylor expanded in b around 0 71.0%
associate-*r/71.0%
associate-*r*71.0%
Simplified71.0%
if -7.8e5 < y < 3.7e53Initial program 82.6%
+-commutative82.6%
associate-+r-82.6%
*-commutative82.6%
associate-*r*81.1%
*-commutative81.1%
associate-+r-81.1%
+-commutative81.1%
associate-*l*81.1%
associate-*l*84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in y around inf 56.5%
Taylor expanded in c around 0 71.5%
Taylor expanded in y around 0 79.3%
if 3.7e53 < y Initial program 77.3%
+-commutative77.3%
associate-+r-77.3%
*-commutative77.3%
associate-*r*73.7%
*-commutative73.7%
associate-+r-73.7%
+-commutative73.7%
associate-*l*72.0%
associate-*l*75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y around inf 78.8%
Taylor expanded in b around 0 73.8%
cancel-sign-sub-inv73.8%
associate-*r/73.8%
*-commutative73.8%
times-frac72.2%
metadata-eval72.2%
associate-*r/72.2%
*-commutative72.2%
Simplified72.2%
Final simplification75.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 (<= y -12200000000.0) (not (<= y 4.5e+48))) (/ (* y (- (* 9.0 (/ x z)) (/ (* t (* 4.0 a)) y))) c) (/ (- (/ b z) (* 4.0 (* a t))) c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y <= -12200000000.0) || !(y <= 4.5e+48)) {
tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / c;
} else {
tmp = ((b / z) - (4.0 * (a * t))) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((y <= (-12200000000.0d0)) .or. (.not. (y <= 4.5d+48))) then
tmp = (y * ((9.0d0 * (x / z)) - ((t * (4.0d0 * a)) / y))) / c
else
tmp = ((b / z) - (4.0d0 * (a * t))) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((y <= -12200000000.0) || !(y <= 4.5e+48)) {
tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / c;
} else {
tmp = ((b / z) - (4.0 * (a * t))) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (y <= -12200000000.0) or not (y <= 4.5e+48): tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / c else: tmp = ((b / z) - (4.0 * (a * t))) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((y <= -12200000000.0) || !(y <= 4.5e+48)) tmp = Float64(Float64(y * Float64(Float64(9.0 * Float64(x / z)) - Float64(Float64(t * Float64(4.0 * a)) / y))) / c); else tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((y <= -12200000000.0) || ~((y <= 4.5e+48)))
tmp = (y * ((9.0 * (x / z)) - ((t * (4.0 * a)) / y))) / c;
else
tmp = ((b / z) - (4.0 * (a * t))) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[y, -12200000000.0], N[Not[LessEqual[y, 4.5e+48]], $MachinePrecision]], N[(N[(y * N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(N[(t * N[(4.0 * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -12200000000 \lor \neg \left(y \leq 4.5 \cdot 10^{+48}\right):\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{z} - \frac{t \cdot \left(4 \cdot a\right)}{y}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\end{array}
\end{array}
if y < -1.22e10 or 4.49999999999999995e48 < y Initial program 78.5%
+-commutative78.5%
associate-+r-78.5%
*-commutative78.5%
associate-*r*76.9%
*-commutative76.9%
associate-+r-76.9%
+-commutative76.9%
associate-*l*76.2%
associate-*l*74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in y around inf 78.3%
Taylor expanded in c around 0 84.2%
Taylor expanded in b around 0 71.7%
associate-*r/71.7%
associate-*r*71.7%
Simplified71.7%
if -1.22e10 < y < 4.49999999999999995e48Initial program 83.0%
+-commutative83.0%
associate-+r-83.0%
*-commutative83.0%
associate-*r*81.4%
*-commutative81.4%
associate-+r-81.4%
+-commutative81.4%
associate-*l*81.5%
associate-*l*85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in y around inf 55.6%
Taylor expanded in c around 0 70.9%
Taylor expanded in y around 0 79.5%
Final simplification75.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= y -280000.0)
(* (* 9.0 x) (/ (/ y z) c))
(if (<= y 3.2e-153)
(/ 1.0 (* z (/ c b)))
(if (<= y 1.75e+52) (* a (* t (/ -4.0 c))) (* (/ 9.0 z) (* x (/ y c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -280000.0) {
tmp = (9.0 * x) * ((y / z) / c);
} else if (y <= 3.2e-153) {
tmp = 1.0 / (z * (c / b));
} else if (y <= 1.75e+52) {
tmp = a * (t * (-4.0 / c));
} else {
tmp = (9.0 / z) * (x * (y / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (y <= (-280000.0d0)) then
tmp = (9.0d0 * x) * ((y / z) / c)
else if (y <= 3.2d-153) then
tmp = 1.0d0 / (z * (c / b))
else if (y <= 1.75d+52) then
tmp = a * (t * ((-4.0d0) / c))
else
tmp = (9.0d0 / z) * (x * (y / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -280000.0) {
tmp = (9.0 * x) * ((y / z) / c);
} else if (y <= 3.2e-153) {
tmp = 1.0 / (z * (c / b));
} else if (y <= 1.75e+52) {
tmp = a * (t * (-4.0 / c));
} else {
tmp = (9.0 / z) * (x * (y / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if y <= -280000.0: tmp = (9.0 * x) * ((y / z) / c) elif y <= 3.2e-153: tmp = 1.0 / (z * (c / b)) elif y <= 1.75e+52: tmp = a * (t * (-4.0 / c)) else: tmp = (9.0 / z) * (x * (y / 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 (y <= -280000.0) tmp = Float64(Float64(9.0 * x) * Float64(Float64(y / z) / c)); elseif (y <= 3.2e-153) tmp = Float64(1.0 / Float64(z * Float64(c / b))); elseif (y <= 1.75e+52) tmp = Float64(a * Float64(t * Float64(-4.0 / c))); else tmp = Float64(Float64(9.0 / z) * Float64(x * Float64(y / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (y <= -280000.0)
tmp = (9.0 * x) * ((y / z) / c);
elseif (y <= 3.2e-153)
tmp = 1.0 / (z * (c / b));
elseif (y <= 1.75e+52)
tmp = a * (t * (-4.0 / c));
else
tmp = (9.0 / z) * (x * (y / 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[y, -280000.0], N[(N[(9.0 * x), $MachinePrecision] * N[(N[(y / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e-153], N[(1.0 / N[(z * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+52], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(9.0 / z), $MachinePrecision] * N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -280000:\\
\;\;\;\;\left(9 \cdot x\right) \cdot \frac{\frac{y}{z}}{c}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-153}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c}{b}}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+52}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{9}{z} \cdot \left(x \cdot \frac{y}{c}\right)\\
\end{array}
\end{array}
if y < -2.8e5Initial program 80.2%
+-commutative80.2%
associate-+r-80.2%
*-commutative80.2%
associate-*r*80.2%
*-commutative80.2%
associate-+r-80.2%
+-commutative80.2%
associate-*l*80.2%
associate-*l*74.2%
*-commutative74.2%
Simplified74.2%
Taylor expanded in y around inf 76.8%
Taylor expanded in c around 0 86.2%
Taylor expanded in y around inf 45.4%
associate-/l*49.7%
*-commutative49.7%
associate-*l*49.7%
associate-/r*49.7%
Simplified49.7%
if -2.8e5 < y < 3.1999999999999999e-153Initial program 89.8%
+-commutative89.8%
associate-+r-89.8%
*-commutative89.8%
associate-*r*88.3%
*-commutative88.3%
associate-+r-88.3%
+-commutative88.3%
associate-*l*88.3%
associate-*l*93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in b around inf 53.2%
*-commutative53.2%
Simplified53.2%
clear-num53.2%
inv-pow53.2%
Applied egg-rr53.2%
unpow-153.2%
associate-/l*53.3%
Simplified53.3%
if 3.1999999999999999e-153 < y < 1.75e52Initial program 68.0%
+-commutative68.0%
associate-+r-68.0%
*-commutative68.0%
associate-*r*66.3%
*-commutative66.3%
associate-+r-66.3%
+-commutative66.3%
associate-*l*66.3%
associate-*l*68.4%
*-commutative68.4%
Simplified68.4%
Taylor expanded in y around inf 61.5%
Taylor expanded in c around 0 80.9%
Taylor expanded in z around inf 40.2%
associate-/l*44.5%
associate-*r*44.5%
*-commutative44.5%
associate-*r*44.5%
associate-*r/44.5%
*-commutative44.5%
associate-/l*44.4%
Simplified44.4%
if 1.75e52 < y Initial program 77.6%
+-commutative77.6%
associate-+r-77.6%
*-commutative77.6%
associate-*r*74.2%
*-commutative74.2%
associate-+r-74.2%
+-commutative74.2%
associate-*l*72.5%
associate-*l*76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in z around 0 71.0%
fma-define71.0%
*-commutative71.0%
*-commutative71.0%
associate-*r*69.4%
*-commutative69.4%
associate-/l*71.0%
associate-/l*70.9%
fma-define70.9%
associate-/l*72.2%
Simplified72.2%
Taylor expanded in x around inf 57.4%
associate-*r/57.5%
*-commutative57.5%
times-frac54.4%
associate-/l*62.4%
Simplified62.4%
Final simplification52.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= y -1900000.0)
(* (* 9.0 x) (/ (/ y z) c))
(if (<= y 1.22e-154)
(/ 1.0 (* z (/ c b)))
(if (<= y 2.1e+56) (* a (* t (/ -4.0 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 (y <= -1900000.0) {
tmp = (9.0 * x) * ((y / z) / c);
} else if (y <= 1.22e-154) {
tmp = 1.0 / (z * (c / b));
} else if (y <= 2.1e+56) {
tmp = a * (t * (-4.0 / c));
} else {
tmp = 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 <= (-1900000.0d0)) then
tmp = (9.0d0 * x) * ((y / z) / c)
else if (y <= 1.22d-154) then
tmp = 1.0d0 / (z * (c / b))
else if (y <= 2.1d+56) then
tmp = a * (t * ((-4.0d0) / c))
else
tmp = 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 <= -1900000.0) {
tmp = (9.0 * x) * ((y / z) / c);
} else if (y <= 1.22e-154) {
tmp = 1.0 / (z * (c / b));
} else if (y <= 2.1e+56) {
tmp = a * (t * (-4.0 / c));
} else {
tmp = 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 <= -1900000.0: tmp = (9.0 * x) * ((y / z) / c) elif y <= 1.22e-154: tmp = 1.0 / (z * (c / b)) elif y <= 2.1e+56: tmp = a * (t * (-4.0 / c)) else: tmp = 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 <= -1900000.0) tmp = Float64(Float64(9.0 * x) * Float64(Float64(y / z) / c)); elseif (y <= 1.22e-154) tmp = Float64(1.0 / Float64(z * Float64(c / b))); elseif (y <= 2.1e+56) tmp = Float64(a * Float64(t * Float64(-4.0 / c))); else tmp = Float64(9.0 * Float64(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 (y <= -1900000.0)
tmp = (9.0 * x) * ((y / z) / c);
elseif (y <= 1.22e-154)
tmp = 1.0 / (z * (c / b));
elseif (y <= 2.1e+56)
tmp = a * (t * (-4.0 / c));
else
tmp = 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, -1900000.0], N[(N[(9.0 * x), $MachinePrecision] * N[(N[(y / z), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.22e-154], N[(1.0 / N[(z * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+56], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(x * N[(y / c), $MachinePrecision]), $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}\;y \leq -1900000:\\
\;\;\;\;\left(9 \cdot x\right) \cdot \frac{\frac{y}{z}}{c}\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{-154}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c}{b}}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+56}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \frac{x \cdot \frac{y}{c}}{z}\\
\end{array}
\end{array}
if y < -1.9e6Initial program 80.2%
+-commutative80.2%
associate-+r-80.2%
*-commutative80.2%
associate-*r*80.2%
*-commutative80.2%
associate-+r-80.2%
+-commutative80.2%
associate-*l*80.2%
associate-*l*74.2%
*-commutative74.2%
Simplified74.2%
Taylor expanded in y around inf 76.8%
Taylor expanded in c around 0 86.2%
Taylor expanded in y around inf 45.4%
associate-/l*49.7%
*-commutative49.7%
associate-*l*49.7%
associate-/r*49.7%
Simplified49.7%
if -1.9e6 < y < 1.22000000000000005e-154Initial program 89.7%
+-commutative89.7%
associate-+r-89.7%
*-commutative89.7%
associate-*r*89.2%
*-commutative89.2%
associate-+r-89.2%
+-commutative89.2%
associate-*l*89.3%
associate-*l*93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in b around inf 53.8%
*-commutative53.8%
Simplified53.8%
clear-num53.7%
inv-pow53.7%
Applied egg-rr53.7%
unpow-153.7%
associate-/l*53.8%
Simplified53.8%
if 1.22000000000000005e-154 < y < 2.10000000000000017e56Initial program 69.3%
+-commutative69.3%
associate-+r-69.3%
*-commutative69.3%
associate-*r*65.7%
*-commutative65.7%
associate-+r-65.7%
+-commutative65.7%
associate-*l*65.7%
associate-*l*69.7%
*-commutative69.7%
Simplified69.7%
Taylor expanded in y around inf 61.1%
Taylor expanded in c around 0 81.7%
Taylor expanded in z around inf 40.7%
associate-/l*44.8%
associate-*r*44.8%
*-commutative44.8%
associate-*r*44.8%
associate-*r/44.8%
*-commutative44.8%
associate-/l*44.8%
Simplified44.8%
if 2.10000000000000017e56 < y Initial program 77.3%
+-commutative77.3%
associate-+r-77.3%
*-commutative77.3%
associate-*r*73.7%
*-commutative73.7%
associate-+r-73.7%
+-commutative73.7%
associate-*l*72.0%
associate-*l*75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in z around 0 70.5%
fma-define70.5%
*-commutative70.5%
*-commutative70.5%
associate-*r*68.8%
*-commutative68.8%
associate-/l*70.5%
associate-/l*70.4%
fma-define70.4%
associate-/l*71.7%
Simplified71.7%
Taylor expanded in x around inf 53.7%
associate-/l*53.5%
associate-/l*61.6%
Applied egg-rr61.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 (<= y -1100000.0)
(* (* 9.0 x) (/ (/ y c) z))
(if (<= y 6.2e-154)
(/ 1.0 (* z (/ c b)))
(if (<= y 2.4e+54) (* a (* t (/ -4.0 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 (y <= -1100000.0) {
tmp = (9.0 * x) * ((y / c) / z);
} else if (y <= 6.2e-154) {
tmp = 1.0 / (z * (c / b));
} else if (y <= 2.4e+54) {
tmp = a * (t * (-4.0 / c));
} else {
tmp = 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 <= (-1100000.0d0)) then
tmp = (9.0d0 * x) * ((y / c) / z)
else if (y <= 6.2d-154) then
tmp = 1.0d0 / (z * (c / b))
else if (y <= 2.4d+54) then
tmp = a * (t * ((-4.0d0) / c))
else
tmp = 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 <= -1100000.0) {
tmp = (9.0 * x) * ((y / c) / z);
} else if (y <= 6.2e-154) {
tmp = 1.0 / (z * (c / b));
} else if (y <= 2.4e+54) {
tmp = a * (t * (-4.0 / c));
} else {
tmp = 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 <= -1100000.0: tmp = (9.0 * x) * ((y / c) / z) elif y <= 6.2e-154: tmp = 1.0 / (z * (c / b)) elif y <= 2.4e+54: tmp = a * (t * (-4.0 / c)) else: tmp = 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 <= -1100000.0) tmp = Float64(Float64(9.0 * x) * Float64(Float64(y / c) / z)); elseif (y <= 6.2e-154) tmp = Float64(1.0 / Float64(z * Float64(c / b))); elseif (y <= 2.4e+54) tmp = Float64(a * Float64(t * Float64(-4.0 / c))); else tmp = Float64(9.0 * Float64(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 (y <= -1100000.0)
tmp = (9.0 * x) * ((y / c) / z);
elseif (y <= 6.2e-154)
tmp = 1.0 / (z * (c / b));
elseif (y <= 2.4e+54)
tmp = a * (t * (-4.0 / c));
else
tmp = 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, -1100000.0], N[(N[(9.0 * x), $MachinePrecision] * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-154], N[(1.0 / N[(z * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+54], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(x * N[(y / c), $MachinePrecision]), $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}\;y \leq -1100000:\\
\;\;\;\;\left(9 \cdot x\right) \cdot \frac{\frac{y}{c}}{z}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-154}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c}{b}}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+54}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \frac{x \cdot \frac{y}{c}}{z}\\
\end{array}
\end{array}
if y < -1.1e6Initial program 80.2%
+-commutative80.2%
associate-+r-80.2%
*-commutative80.2%
associate-*r*80.2%
*-commutative80.2%
associate-+r-80.2%
+-commutative80.2%
associate-*l*80.2%
associate-*l*74.2%
*-commutative74.2%
Simplified74.2%
Taylor expanded in x around inf 45.4%
associate-/l*49.7%
associate-*r*49.7%
associate-/r*46.9%
Simplified46.9%
if -1.1e6 < y < 6.19999999999999963e-154Initial program 89.7%
+-commutative89.7%
associate-+r-89.7%
*-commutative89.7%
associate-*r*89.2%
*-commutative89.2%
associate-+r-89.2%
+-commutative89.2%
associate-*l*89.3%
associate-*l*93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in b around inf 53.8%
*-commutative53.8%
Simplified53.8%
clear-num53.7%
inv-pow53.7%
Applied egg-rr53.7%
unpow-153.7%
associate-/l*53.8%
Simplified53.8%
if 6.19999999999999963e-154 < y < 2.39999999999999998e54Initial program 69.3%
+-commutative69.3%
associate-+r-69.3%
*-commutative69.3%
associate-*r*65.7%
*-commutative65.7%
associate-+r-65.7%
+-commutative65.7%
associate-*l*65.7%
associate-*l*69.7%
*-commutative69.7%
Simplified69.7%
Taylor expanded in y around inf 61.1%
Taylor expanded in c around 0 81.7%
Taylor expanded in z around inf 40.7%
associate-/l*44.8%
associate-*r*44.8%
*-commutative44.8%
associate-*r*44.8%
associate-*r/44.8%
*-commutative44.8%
associate-/l*44.8%
Simplified44.8%
if 2.39999999999999998e54 < y Initial program 77.3%
+-commutative77.3%
associate-+r-77.3%
*-commutative77.3%
associate-*r*73.7%
*-commutative73.7%
associate-+r-73.7%
+-commutative73.7%
associate-*l*72.0%
associate-*l*75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in z around 0 70.5%
fma-define70.5%
*-commutative70.5%
*-commutative70.5%
associate-*r*68.8%
*-commutative68.8%
associate-/l*70.5%
associate-/l*70.4%
fma-define70.4%
associate-/l*71.7%
Simplified71.7%
Taylor expanded in x around inf 53.7%
associate-/l*53.5%
associate-/l*61.6%
Applied egg-rr61.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 (<= y -9200000.0)
(* 9.0 (* x (/ y (* z c))))
(if (<= y 1.3e-154)
(/ 1.0 (* z (/ c b)))
(if (<= y 1.65e+54) (* a (* t (/ -4.0 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 (y <= -9200000.0) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (y <= 1.3e-154) {
tmp = 1.0 / (z * (c / b));
} else if (y <= 1.65e+54) {
tmp = a * (t * (-4.0 / c));
} else {
tmp = 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 <= (-9200000.0d0)) then
tmp = 9.0d0 * (x * (y / (z * c)))
else if (y <= 1.3d-154) then
tmp = 1.0d0 / (z * (c / b))
else if (y <= 1.65d+54) then
tmp = a * (t * ((-4.0d0) / c))
else
tmp = 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 <= -9200000.0) {
tmp = 9.0 * (x * (y / (z * c)));
} else if (y <= 1.3e-154) {
tmp = 1.0 / (z * (c / b));
} else if (y <= 1.65e+54) {
tmp = a * (t * (-4.0 / c));
} else {
tmp = 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 <= -9200000.0: tmp = 9.0 * (x * (y / (z * c))) elif y <= 1.3e-154: tmp = 1.0 / (z * (c / b)) elif y <= 1.65e+54: tmp = a * (t * (-4.0 / c)) else: tmp = 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 <= -9200000.0) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))); elseif (y <= 1.3e-154) tmp = Float64(1.0 / Float64(z * Float64(c / b))); elseif (y <= 1.65e+54) tmp = Float64(a * Float64(t * Float64(-4.0 / c))); else tmp = Float64(9.0 * Float64(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 (y <= -9200000.0)
tmp = 9.0 * (x * (y / (z * c)));
elseif (y <= 1.3e-154)
tmp = 1.0 / (z * (c / b));
elseif (y <= 1.65e+54)
tmp = a * (t * (-4.0 / c));
else
tmp = 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, -9200000.0], N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-154], N[(1.0 / N[(z * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+54], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(x * N[(y / c), $MachinePrecision]), $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}\;y \leq -9200000:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-154}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c}{b}}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+54}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \frac{x \cdot \frac{y}{c}}{z}\\
\end{array}
\end{array}
if y < -9.2e6Initial program 80.2%
+-commutative80.2%
associate-+r-80.2%
*-commutative80.2%
associate-*r*80.2%
*-commutative80.2%
associate-+r-80.2%
+-commutative80.2%
associate-*l*80.2%
associate-*l*74.2%
*-commutative74.2%
Simplified74.2%
Taylor expanded in x around inf 45.4%
associate-/l*49.7%
*-commutative49.7%
Simplified49.7%
if -9.2e6 < y < 1.3e-154Initial program 89.7%
+-commutative89.7%
associate-+r-89.7%
*-commutative89.7%
associate-*r*89.2%
*-commutative89.2%
associate-+r-89.2%
+-commutative89.2%
associate-*l*89.3%
associate-*l*93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in b around inf 53.8%
*-commutative53.8%
Simplified53.8%
clear-num53.7%
inv-pow53.7%
Applied egg-rr53.7%
unpow-153.7%
associate-/l*53.8%
Simplified53.8%
if 1.3e-154 < y < 1.65e54Initial program 69.3%
+-commutative69.3%
associate-+r-69.3%
*-commutative69.3%
associate-*r*65.7%
*-commutative65.7%
associate-+r-65.7%
+-commutative65.7%
associate-*l*65.7%
associate-*l*69.7%
*-commutative69.7%
Simplified69.7%
Taylor expanded in y around inf 61.1%
Taylor expanded in c around 0 81.7%
Taylor expanded in z around inf 40.7%
associate-/l*44.8%
associate-*r*44.8%
*-commutative44.8%
associate-*r*44.8%
associate-*r/44.8%
*-commutative44.8%
associate-/l*44.8%
Simplified44.8%
if 1.65e54 < y Initial program 77.3%
+-commutative77.3%
associate-+r-77.3%
*-commutative77.3%
associate-*r*73.7%
*-commutative73.7%
associate-+r-73.7%
+-commutative73.7%
associate-*l*72.0%
associate-*l*75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in z around 0 70.5%
fma-define70.5%
*-commutative70.5%
*-commutative70.5%
associate-*r*68.8%
*-commutative68.8%
associate-/l*70.5%
associate-/l*70.4%
fma-define70.4%
associate-/l*71.7%
Simplified71.7%
Taylor expanded in x around inf 53.7%
associate-/l*53.5%
associate-/l*61.6%
Applied egg-rr61.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 (* 9.0 (* x (/ y (* z c))))))
(if (<= y -2550000000.0)
t_1
(if (<= y 2.9e-154)
(/ 1.0 (* z (/ c b)))
(if (<= y 3.6e+51) (* a (* t (/ -4.0 c))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * (y / (z * c)));
double tmp;
if (y <= -2550000000.0) {
tmp = t_1;
} else if (y <= 2.9e-154) {
tmp = 1.0 / (z * (c / b));
} else if (y <= 3.6e+51) {
tmp = a * (t * (-4.0 / c));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 9.0d0 * (x * (y / (z * c)))
if (y <= (-2550000000.0d0)) then
tmp = t_1
else if (y <= 2.9d-154) then
tmp = 1.0d0 / (z * (c / b))
else if (y <= 3.6d+51) then
tmp = a * (t * ((-4.0d0) / c))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * (y / (z * c)));
double tmp;
if (y <= -2550000000.0) {
tmp = t_1;
} else if (y <= 2.9e-154) {
tmp = 1.0 / (z * (c / b));
} else if (y <= 3.6e+51) {
tmp = a * (t * (-4.0 / c));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * (x * (y / (z * c))) tmp = 0 if y <= -2550000000.0: tmp = t_1 elif y <= 2.9e-154: tmp = 1.0 / (z * (c / b)) elif y <= 3.6e+51: tmp = a * (t * (-4.0 / c)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))) tmp = 0.0 if (y <= -2550000000.0) tmp = t_1; elseif (y <= 2.9e-154) tmp = Float64(1.0 / Float64(z * Float64(c / b))); elseif (y <= 3.6e+51) tmp = Float64(a * Float64(t * Float64(-4.0 / c))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (x * (y / (z * c)));
tmp = 0.0;
if (y <= -2550000000.0)
tmp = t_1;
elseif (y <= 2.9e-154)
tmp = 1.0 / (z * (c / b));
elseif (y <= 3.6e+51)
tmp = a * (t * (-4.0 / c));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2550000000.0], t$95$1, If[LessEqual[y, 2.9e-154], N[(1.0 / N[(z * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+51], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{if}\;y \leq -2550000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-154}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c}{b}}\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+51}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.55e9 or 3.60000000000000011e51 < y Initial program 79.0%
+-commutative79.0%
associate-+r-79.0%
*-commutative79.0%
associate-*r*77.4%
*-commutative77.4%
associate-+r-77.4%
+-commutative77.4%
associate-*l*76.6%
associate-*l*75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in x around inf 51.1%
associate-/l*56.4%
*-commutative56.4%
Simplified56.4%
if -2.55e9 < y < 2.9e-154Initial program 89.7%
+-commutative89.7%
associate-+r-89.7%
*-commutative89.7%
associate-*r*89.2%
*-commutative89.2%
associate-+r-89.2%
+-commutative89.2%
associate-*l*89.3%
associate-*l*93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in b around inf 53.8%
*-commutative53.8%
Simplified53.8%
clear-num53.7%
inv-pow53.7%
Applied egg-rr53.7%
unpow-153.7%
associate-/l*53.8%
Simplified53.8%
if 2.9e-154 < y < 3.60000000000000011e51Initial program 68.6%
+-commutative68.6%
associate-+r-68.6%
*-commutative68.6%
associate-*r*65.0%
*-commutative65.0%
associate-+r-65.0%
+-commutative65.0%
associate-*l*65.0%
associate-*l*69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in y around inf 60.3%
Taylor expanded in c around 0 81.3%
Taylor expanded in z around inf 41.5%
associate-/l*45.7%
associate-*r*45.7%
*-commutative45.7%
associate-*r*45.7%
associate-*r/45.7%
*-commutative45.7%
associate-/l*45.7%
Simplified45.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.5e+41) (not (<= z 0.0011))) (/ (- (/ b z) (* 4.0 (* a t))) c) (/ (+ b (* 9.0 (* y x))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.5e+41) || !(z <= 0.0011)) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = (b + (9.0 * (y * x))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-1.5d+41)) .or. (.not. (z <= 0.0011d0))) then
tmp = ((b / z) - (4.0d0 * (a * t))) / c
else
tmp = (b + (9.0d0 * (y * x))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.5e+41) || !(z <= 0.0011)) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = (b + (9.0 * (y * x))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.5e+41) or not (z <= 0.0011): tmp = ((b / z) - (4.0 * (a * t))) / c else: tmp = (b + (9.0 * (y * x))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.5e+41) || !(z <= 0.0011)) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.5e+41) || ~((z <= 0.0011)))
tmp = ((b / z) - (4.0 * (a * t))) / c;
else
tmp = (b + (9.0 * (y * x))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.5e+41], N[Not[LessEqual[z, 0.0011]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+41} \lor \neg \left(z \leq 0.0011\right):\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.4999999999999999e41 or 0.00110000000000000007 < z Initial program 64.3%
+-commutative64.3%
associate-+r-64.3%
*-commutative64.3%
associate-*r*61.2%
*-commutative61.2%
associate-+r-61.2%
+-commutative61.2%
associate-*l*60.4%
associate-*l*68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in y around inf 72.4%
Taylor expanded in c around 0 85.8%
Taylor expanded in y around 0 76.8%
if -1.4999999999999999e41 < z < 0.00110000000000000007Initial program 94.3%
Simplified94.0%
Taylor expanded in t around 0 83.3%
Final simplification80.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -6.2e+73)
(* -4.0 (/ (* a t) c))
(if (<= z 3.2e+117)
(/ (+ b (* 9.0 (* y x))) (* z c))
(* a (/ (* t -4.0) c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -6.2e+73) {
tmp = -4.0 * ((a * t) / c);
} else if (z <= 3.2e+117) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-6.2d+73)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (z <= 3.2d+117) then
tmp = (b + (9.0d0 * (y * x))) / (z * c)
else
tmp = a * ((t * (-4.0d0)) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -6.2e+73) {
tmp = -4.0 * ((a * t) / c);
} else if (z <= 3.2e+117) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -6.2e+73: tmp = -4.0 * ((a * t) / c) elif z <= 3.2e+117: tmp = (b + (9.0 * (y * x))) / (z * c) else: tmp = a * ((t * -4.0) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -6.2e+73) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (z <= 3.2e+117) tmp = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / Float64(z * c)); else tmp = Float64(a * Float64(Float64(t * -4.0) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -6.2e+73)
tmp = -4.0 * ((a * t) / c);
elseif (z <= 3.2e+117)
tmp = (b + (9.0 * (y * x))) / (z * c);
else
tmp = a * ((t * -4.0) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -6.2e+73], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+117], N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+73}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+117}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\end{array}
\end{array}
if z < -6.1999999999999999e73Initial program 70.8%
+-commutative70.8%
associate-+r-70.8%
*-commutative70.8%
associate-*r*60.5%
*-commutative60.5%
associate-+r-60.5%
+-commutative60.5%
associate-*l*58.4%
associate-*l*73.6%
*-commutative73.6%
Simplified73.6%
Taylor expanded in z around inf 64.9%
*-commutative64.9%
Simplified64.9%
if -6.1999999999999999e73 < z < 3.20000000000000005e117Initial program 91.9%
Simplified92.3%
Taylor expanded in t around 0 78.9%
if 3.20000000000000005e117 < z Initial program 45.4%
+-commutative45.4%
associate-+r-45.4%
*-commutative45.4%
associate-*r*45.2%
*-commutative45.2%
associate-+r-45.2%
+-commutative45.2%
associate-*l*45.2%
associate-*l*50.2%
*-commutative50.2%
Simplified50.2%
Taylor expanded in z around inf 56.4%
associate-/l*61.1%
associate-*r*61.1%
*-commutative61.1%
associate-*r*61.1%
*-commutative61.1%
associate-*l/61.1%
Simplified61.1%
Final simplification73.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 (<= b -7.5e-8) (not (<= b 2.2e+72))) (/ (/ b c) z) (* a (* t (/ -4.0 c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -7.5e-8) || !(b <= 2.2e+72)) {
tmp = (b / c) / z;
} else {
tmp = a * (t * (-4.0 / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((b <= (-7.5d-8)) .or. (.not. (b <= 2.2d+72))) then
tmp = (b / c) / z
else
tmp = a * (t * ((-4.0d0) / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -7.5e-8) || !(b <= 2.2e+72)) {
tmp = (b / c) / z;
} else {
tmp = a * (t * (-4.0 / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -7.5e-8) or not (b <= 2.2e+72): tmp = (b / c) / z else: tmp = a * (t * (-4.0 / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -7.5e-8) || !(b <= 2.2e+72)) tmp = Float64(Float64(b / c) / z); else tmp = Float64(a * Float64(t * 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)
tmp = 0.0;
if ((b <= -7.5e-8) || ~((b <= 2.2e+72)))
tmp = (b / c) / z;
else
tmp = a * (t * (-4.0 / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -7.5e-8], N[Not[LessEqual[b, 2.2e+72]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(a * N[(t * 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}
\mathbf{if}\;b \leq -7.5 \cdot 10^{-8} \lor \neg \left(b \leq 2.2 \cdot 10^{+72}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\end{array}
\end{array}
if b < -7.4999999999999997e-8 or 2.2e72 < b Initial program 79.1%
+-commutative79.1%
associate-+r-79.1%
*-commutative79.1%
associate-*r*80.9%
*-commutative80.9%
associate-+r-80.9%
+-commutative80.9%
associate-*l*81.0%
associate-*l*79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in z around 0 75.0%
fma-define75.0%
*-commutative75.0%
*-commutative75.0%
associate-*r*75.0%
*-commutative75.0%
associate-/l*73.2%
associate-/l*72.3%
fma-define72.3%
associate-/l*71.5%
Simplified71.5%
Taylor expanded in b around inf 56.6%
associate-/r*61.5%
Simplified61.5%
if -7.4999999999999997e-8 < b < 2.2e72Initial program 82.3%
+-commutative82.3%
associate-+r-82.3%
*-commutative82.3%
associate-*r*77.9%
*-commutative77.9%
associate-+r-77.9%
+-commutative77.9%
associate-*l*77.2%
associate-*l*81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y around inf 71.0%
Taylor expanded in c around 0 79.0%
Taylor expanded in z around inf 52.2%
associate-/l*51.4%
associate-*r*51.4%
*-commutative51.4%
associate-*r*51.4%
associate-*r/51.4%
*-commutative51.4%
associate-/l*51.4%
Simplified51.4%
Final simplification56.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 -8.5e-8) (/ 1.0 (* z (/ c b))) (if (<= b 1.35e+72) (* a (* t (/ -4.0 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 <= -8.5e-8) {
tmp = 1.0 / (z * (c / b));
} else if (b <= 1.35e+72) {
tmp = a * (t * (-4.0 / 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 <= (-8.5d-8)) then
tmp = 1.0d0 / (z * (c / b))
else if (b <= 1.35d+72) then
tmp = a * (t * ((-4.0d0) / 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 <= -8.5e-8) {
tmp = 1.0 / (z * (c / b));
} else if (b <= 1.35e+72) {
tmp = a * (t * (-4.0 / 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 <= -8.5e-8: tmp = 1.0 / (z * (c / b)) elif b <= 1.35e+72: tmp = a * (t * (-4.0 / 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 <= -8.5e-8) tmp = Float64(1.0 / Float64(z * Float64(c / b))); elseif (b <= 1.35e+72) tmp = Float64(a * Float64(t * Float64(-4.0 / c))); else tmp = Float64(Float64(b / c) / z); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (b <= -8.5e-8)
tmp = 1.0 / (z * (c / b));
elseif (b <= 1.35e+72)
tmp = a * (t * (-4.0 / 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, -8.5e-8], N[(1.0 / N[(z * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.35e+72], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c}{b}}\\
\mathbf{elif}\;b \leq 1.35 \cdot 10^{+72}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if b < -8.49999999999999935e-8Initial program 81.5%
+-commutative81.5%
associate-+r-81.5%
*-commutative81.5%
associate-*r*82.8%
*-commutative82.8%
associate-+r-82.8%
+-commutative82.8%
associate-*l*82.8%
associate-*l*80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in b around inf 57.7%
*-commutative57.7%
Simplified57.7%
clear-num57.8%
inv-pow57.8%
Applied egg-rr57.8%
unpow-157.8%
associate-/l*60.3%
Simplified60.3%
if -8.49999999999999935e-8 < b < 1.35e72Initial program 82.3%
+-commutative82.3%
associate-+r-82.3%
*-commutative82.3%
associate-*r*77.9%
*-commutative77.9%
associate-+r-77.9%
+-commutative77.9%
associate-*l*77.2%
associate-*l*81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y around inf 71.0%
Taylor expanded in c around 0 79.0%
Taylor expanded in z around inf 52.2%
associate-/l*51.4%
associate-*r*51.4%
*-commutative51.4%
associate-*r*51.4%
associate-*r/51.4%
*-commutative51.4%
associate-/l*51.4%
Simplified51.4%
if 1.35e72 < b Initial program 75.7%
+-commutative75.7%
associate-+r-75.7%
*-commutative75.7%
associate-*r*78.3%
*-commutative78.3%
associate-+r-78.3%
+-commutative78.3%
associate-*l*78.3%
associate-*l*78.1%
*-commutative78.1%
Simplified78.1%
Taylor expanded in z around 0 69.9%
fma-define69.9%
*-commutative69.9%
*-commutative69.9%
associate-*r*75.9%
*-commutative75.9%
associate-/l*75.8%
associate-/l*75.6%
fma-define75.6%
associate-/l*75.6%
Simplified75.6%
Taylor expanded in b around inf 55.1%
associate-/r*64.7%
Simplified64.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 (/ (/ 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(Float64(b / 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[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{\frac{b}{c}}{z}
\end{array}
Initial program 80.9%
+-commutative80.9%
associate-+r-80.9%
*-commutative80.9%
associate-*r*79.3%
*-commutative79.3%
associate-+r-79.3%
+-commutative79.3%
associate-*l*78.9%
associate-*l*80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in z around 0 78.0%
fma-define78.0%
*-commutative78.0%
*-commutative78.0%
associate-*r*78.0%
*-commutative78.0%
associate-/l*77.6%
associate-/l*76.2%
fma-define76.2%
associate-/l*76.8%
Simplified76.8%
Taylor expanded in b around inf 34.7%
associate-/r*35.9%
Simplified35.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 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 80.9%
+-commutative80.9%
associate-+r-80.9%
*-commutative80.9%
associate-*r*79.3%
*-commutative79.3%
associate-+r-79.3%
+-commutative79.3%
associate-*l*78.9%
associate-*l*80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in b around inf 34.7%
*-commutative34.7%
Simplified34.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024118
(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)))