
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 9.0 (/ x z))) (t_2 (* 4.0 (/ (* a t) y))))
(if (<= z -6.6e+41)
(/ (* y (- (+ t_1 (* b (/ 1.0 (* z y)))) t_2)) c)
(if (<= z -7.8e-67)
(/ (fma -4.0 (* a (* t (/ z c))) (fma 9.0 (* x (/ y c)) (/ b c))) z)
(if (<= z 2.15e+63)
(/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))
(/ (* y (- (+ t_1 (/ b (* z y))) t_2)) c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x / z);
double t_2 = 4.0 * ((a * t) / y);
double tmp;
if (z <= -6.6e+41) {
tmp = (y * ((t_1 + (b * (1.0 / (z * y)))) - t_2)) / c;
} else if (z <= -7.8e-67) {
tmp = fma(-4.0, (a * (t * (z / c))), fma(9.0, (x * (y / c)), (b / c))) / z;
} else if (z <= 2.15e+63) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (y * ((t_1 + (b / (z * y))) - t_2)) / c;
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(x / z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / y)) tmp = 0.0 if (z <= -6.6e+41) tmp = Float64(Float64(y * Float64(Float64(t_1 + Float64(b * Float64(1.0 / Float64(z * y)))) - t_2)) / c); elseif (z <= -7.8e-67) tmp = Float64(fma(-4.0, Float64(a * Float64(t * Float64(z / c))), fma(9.0, Float64(x * Float64(y / c)), Float64(b / c))) / z); elseif (z <= 2.15e+63) 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(t_1 + Float64(b / Float64(z * y))) - t_2)) / 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_] := Block[{t$95$1 = N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e+41], N[(N[(y * N[(N[(t$95$1 + N[(b * N[(1.0 / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, -7.8e-67], N[(N[(-4.0 * N[(a * N[(t * N[(z / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 2.15e+63], 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[(t$95$1 + N[(b / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \frac{x}{z}\\
t_2 := 4 \cdot \frac{a \cdot t}{y}\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+41}:\\
\;\;\;\;\frac{y \cdot \left(\left(t\_1 + b \cdot \frac{1}{z \cdot y}\right) - t\_2\right)}{c}\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-67}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4, a \cdot \left(t \cdot \frac{z}{c}\right), \mathsf{fma}\left(9, x \cdot \frac{y}{c}, \frac{b}{c}\right)\right)}{z}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+63}:\\
\;\;\;\;\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(\left(t\_1 + \frac{b}{z \cdot y}\right) - t\_2\right)}{c}\\
\end{array}
\end{array}
if z < -6.6000000000000001e41Initial program 58.0%
associate-+l-58.0%
*-commutative58.0%
associate-*r*56.3%
*-commutative56.3%
associate-+l-56.3%
associate-*l*56.3%
associate-*l*63.2%
*-commutative63.2%
Simplified63.2%
Taylor expanded in y around inf 76.3%
Taylor expanded in c around 0 88.0%
div-inv88.0%
Applied egg-rr88.0%
*-commutative88.0%
Simplified88.0%
if -6.6000000000000001e41 < z < -7.7999999999999997e-67Initial program 74.2%
associate-+l-74.2%
*-commutative74.2%
associate-*r*74.2%
*-commutative74.2%
associate-+l-74.2%
associate-*l*74.3%
associate-*l*74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in z around 0 74.3%
fma-define74.3%
associate-/l*87.2%
associate-/l*87.2%
fma-define87.2%
associate-/l*95.4%
Simplified95.4%
if -7.7999999999999997e-67 < z < 2.15e63Initial program 96.2%
if 2.15e63 < z Initial program 60.4%
associate-+l-60.4%
*-commutative60.4%
associate-*r*56.7%
*-commutative56.7%
associate-+l-56.7%
associate-*l*56.6%
associate-*l*62.3%
*-commutative62.3%
Simplified62.3%
Taylor expanded in y around inf 76.8%
Taylor expanded in c around 0 79.7%
Final simplification90.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -6.5e+63) (not (<= z 3.4e+64))) (/ (* 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 <= -6.5e+63) || !(z <= 3.4e+64)) {
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 <= (-6.5d+63)) .or. (.not. (z <= 3.4d+64))) 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 <= -6.5e+63) || !(z <= 3.4e+64)) {
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 <= -6.5e+63) or not (z <= 3.4e+64): 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 <= -6.5e+63) || !(z <= 3.4e+64)) 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 <= -6.5e+63) || ~((z <= 3.4e+64)))
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, -6.5e+63], N[Not[LessEqual[z, 3.4e+64]], $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 -6.5 \cdot 10^{+63} \lor \neg \left(z \leq 3.4 \cdot 10^{+64}\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 < -6.49999999999999992e63 or 3.4000000000000002e64 < z Initial program 58.6%
associate-+l-58.6%
*-commutative58.6%
associate-*r*54.9%
*-commutative54.9%
associate-+l-54.9%
associate-*l*54.9%
associate-*l*61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in y around inf 75.6%
Taylor expanded in c around 0 83.5%
if -6.49999999999999992e63 < z < 3.4000000000000002e64Initial program 92.4%
Final simplification88.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 9.0 (/ x z))) (t_2 (* 4.0 (/ (* a t) y))))
(if (<= z -1e+64)
(/ (* y (- (+ t_1 (* b (/ 1.0 (* z y)))) t_2)) c)
(if (<= z 1.5e+65)
(/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))
(/ (* y (- (+ t_1 (/ b (* z y))) t_2)) c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x / z);
double t_2 = 4.0 * ((a * t) / y);
double tmp;
if (z <= -1e+64) {
tmp = (y * ((t_1 + (b * (1.0 / (z * y)))) - t_2)) / c;
} else if (z <= 1.5e+65) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (y * ((t_1 + (b / (z * y))) - t_2)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 9.0d0 * (x / z)
t_2 = 4.0d0 * ((a * t) / y)
if (z <= (-1d+64)) then
tmp = (y * ((t_1 + (b * (1.0d0 / (z * y)))) - t_2)) / c
else if (z <= 1.5d+65) then
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
else
tmp = (y * ((t_1 + (b / (z * y))) - t_2)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x / z);
double t_2 = 4.0 * ((a * t) / y);
double tmp;
if (z <= -1e+64) {
tmp = (y * ((t_1 + (b * (1.0 / (z * y)))) - t_2)) / c;
} else if (z <= 1.5e+65) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (y * ((t_1 + (b / (z * y))) - t_2)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * (x / z) t_2 = 4.0 * ((a * t) / y) tmp = 0 if z <= -1e+64: tmp = (y * ((t_1 + (b * (1.0 / (z * y)))) - t_2)) / c elif z <= 1.5e+65: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) else: tmp = (y * ((t_1 + (b / (z * y))) - t_2)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(x / z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / y)) tmp = 0.0 if (z <= -1e+64) tmp = Float64(Float64(y * Float64(Float64(t_1 + Float64(b * Float64(1.0 / Float64(z * y)))) - t_2)) / c); elseif (z <= 1.5e+65) 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(t_1 + Float64(b / Float64(z * y))) - t_2)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (x / z);
t_2 = 4.0 * ((a * t) / y);
tmp = 0.0;
if (z <= -1e+64)
tmp = (y * ((t_1 + (b * (1.0 / (z * y)))) - t_2)) / c;
elseif (z <= 1.5e+65)
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
else
tmp = (y * ((t_1 + (b / (z * y))) - t_2)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+64], N[(N[(y * N[(N[(t$95$1 + N[(b * N[(1.0 / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1.5e+65], 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[(t$95$1 + N[(b / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \frac{x}{z}\\
t_2 := 4 \cdot \frac{a \cdot t}{y}\\
\mathbf{if}\;z \leq -1 \cdot 10^{+64}:\\
\;\;\;\;\frac{y \cdot \left(\left(t\_1 + b \cdot \frac{1}{z \cdot y}\right) - t\_2\right)}{c}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+65}:\\
\;\;\;\;\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(\left(t\_1 + \frac{b}{z \cdot y}\right) - t\_2\right)}{c}\\
\end{array}
\end{array}
if z < -1.00000000000000002e64Initial program 56.7%
associate-+l-56.7%
*-commutative56.7%
associate-*r*53.1%
*-commutative53.1%
associate-+l-53.1%
associate-*l*53.1%
associate-*l*60.5%
*-commutative60.5%
Simplified60.5%
Taylor expanded in y around inf 74.5%
Taylor expanded in c around 0 87.1%
div-inv87.1%
Applied egg-rr87.1%
*-commutative87.1%
Simplified87.1%
if -1.00000000000000002e64 < z < 1.5000000000000001e65Initial program 92.4%
if 1.5000000000000001e65 < z Initial program 60.4%
associate-+l-60.4%
*-commutative60.4%
associate-*r*56.7%
*-commutative56.7%
associate-+l-56.7%
associate-*l*56.6%
associate-*l*62.3%
*-commutative62.3%
Simplified62.3%
Taylor expanded in y around inf 76.8%
Taylor expanded in c around 0 79.7%
Final simplification88.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 9.0 (* x (/ y (* z c))))) (t_2 (* t (/ (* a -4.0) c))))
(if (<= z -1.86e+90)
t_2
(if (<= z -3.2e-160)
t_1
(if (<= z -3.7e-280)
(* b (/ 1.0 (* z c)))
(if (<= z 1.9e-301) t_1 (if (<= z 1.38e+65) (/ b (* z c)) t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * (y / (z * c)));
double t_2 = t * ((a * -4.0) / c);
double tmp;
if (z <= -1.86e+90) {
tmp = t_2;
} else if (z <= -3.2e-160) {
tmp = t_1;
} else if (z <= -3.7e-280) {
tmp = b * (1.0 / (z * c));
} else if (z <= 1.9e-301) {
tmp = t_1;
} else if (z <= 1.38e+65) {
tmp = b / (z * c);
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 9.0d0 * (x * (y / (z * c)))
t_2 = t * ((a * (-4.0d0)) / c)
if (z <= (-1.86d+90)) then
tmp = t_2
else if (z <= (-3.2d-160)) then
tmp = t_1
else if (z <= (-3.7d-280)) then
tmp = b * (1.0d0 / (z * c))
else if (z <= 1.9d-301) then
tmp = t_1
else if (z <= 1.38d+65) then
tmp = b / (z * c)
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * (y / (z * c)));
double t_2 = t * ((a * -4.0) / c);
double tmp;
if (z <= -1.86e+90) {
tmp = t_2;
} else if (z <= -3.2e-160) {
tmp = t_1;
} else if (z <= -3.7e-280) {
tmp = b * (1.0 / (z * c));
} else if (z <= 1.9e-301) {
tmp = t_1;
} else if (z <= 1.38e+65) {
tmp = b / (z * c);
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * (x * (y / (z * c))) t_2 = t * ((a * -4.0) / c) tmp = 0 if z <= -1.86e+90: tmp = t_2 elif z <= -3.2e-160: tmp = t_1 elif z <= -3.7e-280: tmp = b * (1.0 / (z * c)) elif z <= 1.9e-301: tmp = t_1 elif z <= 1.38e+65: tmp = b / (z * c) else: tmp = t_2 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))) t_2 = Float64(t * Float64(Float64(a * -4.0) / c)) tmp = 0.0 if (z <= -1.86e+90) tmp = t_2; elseif (z <= -3.2e-160) tmp = t_1; elseif (z <= -3.7e-280) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (z <= 1.9e-301) tmp = t_1; elseif (z <= 1.38e+65) tmp = Float64(b / Float64(z * c)); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (x * (y / (z * c)));
t_2 = t * ((a * -4.0) / c);
tmp = 0.0;
if (z <= -1.86e+90)
tmp = t_2;
elseif (z <= -3.2e-160)
tmp = t_1;
elseif (z <= -3.7e-280)
tmp = b * (1.0 / (z * c));
elseif (z <= 1.9e-301)
tmp = t_1;
elseif (z <= 1.38e+65)
tmp = b / (z * c);
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.86e+90], t$95$2, If[LessEqual[z, -3.2e-160], t$95$1, If[LessEqual[z, -3.7e-280], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e-301], t$95$1, If[LessEqual[z, 1.38e+65], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
t_2 := t \cdot \frac{a \cdot -4}{c}\\
\mathbf{if}\;z \leq -1.86 \cdot 10^{+90}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-280}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-301}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.38 \cdot 10^{+65}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.8600000000000001e90 or 1.38e65 < z Initial program 57.5%
associate-+l-57.5%
*-commutative57.5%
associate-*r*52.7%
*-commutative52.7%
associate-+l-52.7%
associate-*l*52.7%
associate-*l*59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in y around inf 77.3%
Taylor expanded in c around 0 83.7%
Taylor expanded in z around inf 64.9%
*-commutative64.9%
*-commutative64.9%
associate-/l*64.2%
associate-*r*64.3%
*-commutative64.3%
associate-*r/64.4%
*-commutative64.4%
associate-/l*64.4%
Simplified64.4%
associate-*r/64.4%
Applied egg-rr64.4%
if -1.8600000000000001e90 < z < -3.20000000000000009e-160 or -3.6999999999999998e-280 < z < 1.89999999999999998e-301Initial program 86.0%
associate-+l-86.0%
*-commutative86.0%
associate-*r*89.5%
*-commutative89.5%
associate-+l-89.5%
associate-*l*89.6%
associate-*l*89.6%
*-commutative89.6%
Simplified89.6%
Taylor expanded in x around inf 63.2%
associate-/l*66.7%
*-commutative66.7%
Simplified66.7%
if -3.20000000000000009e-160 < z < -3.6999999999999998e-280Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
associate-*r*99.6%
*-commutative99.6%
associate-+l-99.6%
associate-*l*99.6%
associate-*l*92.2%
*-commutative92.2%
Simplified92.2%
Taylor expanded in b around inf 54.8%
*-commutative54.8%
Simplified54.8%
div-inv54.8%
Applied egg-rr54.8%
if 1.89999999999999998e-301 < z < 1.38e65Initial program 93.8%
associate-+l-93.8%
*-commutative93.8%
associate-*r*95.2%
*-commutative95.2%
associate-+l-95.2%
associate-*l*95.2%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
Taylor expanded in b around inf 59.9%
*-commutative59.9%
Simplified59.9%
Final simplification62.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 (/ y (* z c))) (t_2 (* t (/ (* a -4.0) c))))
(if (<= z -3.3e+91)
t_2
(if (<= z -2.8e-160)
(* (* 9.0 x) t_1)
(if (<= z -4.7e-281)
(* b (/ 1.0 (* z c)))
(if (<= z 8e-293)
(* 9.0 (* x t_1))
(if (<= z 1.4e+62) (/ b (* z c)) t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y / (z * c);
double t_2 = t * ((a * -4.0) / c);
double tmp;
if (z <= -3.3e+91) {
tmp = t_2;
} else if (z <= -2.8e-160) {
tmp = (9.0 * x) * t_1;
} else if (z <= -4.7e-281) {
tmp = b * (1.0 / (z * c));
} else if (z <= 8e-293) {
tmp = 9.0 * (x * t_1);
} else if (z <= 1.4e+62) {
tmp = b / (z * c);
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y / (z * c)
t_2 = t * ((a * (-4.0d0)) / c)
if (z <= (-3.3d+91)) then
tmp = t_2
else if (z <= (-2.8d-160)) then
tmp = (9.0d0 * x) * t_1
else if (z <= (-4.7d-281)) then
tmp = b * (1.0d0 / (z * c))
else if (z <= 8d-293) then
tmp = 9.0d0 * (x * t_1)
else if (z <= 1.4d+62) then
tmp = b / (z * c)
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y / (z * c);
double t_2 = t * ((a * -4.0) / c);
double tmp;
if (z <= -3.3e+91) {
tmp = t_2;
} else if (z <= -2.8e-160) {
tmp = (9.0 * x) * t_1;
} else if (z <= -4.7e-281) {
tmp = b * (1.0 / (z * c));
} else if (z <= 8e-293) {
tmp = 9.0 * (x * t_1);
} else if (z <= 1.4e+62) {
tmp = b / (z * c);
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = y / (z * c) t_2 = t * ((a * -4.0) / c) tmp = 0 if z <= -3.3e+91: tmp = t_2 elif z <= -2.8e-160: tmp = (9.0 * x) * t_1 elif z <= -4.7e-281: tmp = b * (1.0 / (z * c)) elif z <= 8e-293: tmp = 9.0 * (x * t_1) elif z <= 1.4e+62: tmp = b / (z * c) else: tmp = t_2 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(y / Float64(z * c)) t_2 = Float64(t * Float64(Float64(a * -4.0) / c)) tmp = 0.0 if (z <= -3.3e+91) tmp = t_2; elseif (z <= -2.8e-160) tmp = Float64(Float64(9.0 * x) * t_1); elseif (z <= -4.7e-281) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (z <= 8e-293) tmp = Float64(9.0 * Float64(x * t_1)); elseif (z <= 1.4e+62) tmp = Float64(b / Float64(z * c)); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = y / (z * c);
t_2 = t * ((a * -4.0) / c);
tmp = 0.0;
if (z <= -3.3e+91)
tmp = t_2;
elseif (z <= -2.8e-160)
tmp = (9.0 * x) * t_1;
elseif (z <= -4.7e-281)
tmp = b * (1.0 / (z * c));
elseif (z <= 8e-293)
tmp = 9.0 * (x * t_1);
elseif (z <= 1.4e+62)
tmp = b / (z * c);
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+91], t$95$2, If[LessEqual[z, -2.8e-160], N[(N[(9.0 * x), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[z, -4.7e-281], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-293], N[(9.0 * N[(x * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+62], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{y}{z \cdot c}\\
t_2 := t \cdot \frac{a \cdot -4}{c}\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+91}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-160}:\\
\;\;\;\;\left(9 \cdot x\right) \cdot t\_1\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-281}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-293}:\\
\;\;\;\;9 \cdot \left(x \cdot t\_1\right)\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+62}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -3.30000000000000017e91 or 1.40000000000000007e62 < z Initial program 57.5%
associate-+l-57.5%
*-commutative57.5%
associate-*r*52.7%
*-commutative52.7%
associate-+l-52.7%
associate-*l*52.7%
associate-*l*59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in y around inf 77.3%
Taylor expanded in c around 0 83.7%
Taylor expanded in z around inf 64.9%
*-commutative64.9%
*-commutative64.9%
associate-/l*64.2%
associate-*r*64.3%
*-commutative64.3%
associate-*r/64.4%
*-commutative64.4%
associate-/l*64.4%
Simplified64.4%
associate-*r/64.4%
Applied egg-rr64.4%
if -3.30000000000000017e91 < z < -2.80000000000000016e-160Initial program 84.3%
associate-+l-84.3%
*-commutative84.3%
associate-*r*88.3%
*-commutative88.3%
associate-+l-88.3%
associate-*l*88.4%
associate-*l*88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in z around 0 78.4%
Taylor expanded in x around inf 58.7%
associate-/l*62.6%
associate-*r*62.7%
Simplified62.7%
if -2.80000000000000016e-160 < z < -4.7000000000000002e-281Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
associate-*r*99.6%
*-commutative99.6%
associate-+l-99.6%
associate-*l*99.6%
associate-*l*92.2%
*-commutative92.2%
Simplified92.2%
Taylor expanded in b around inf 54.8%
*-commutative54.8%
Simplified54.8%
div-inv54.8%
Applied egg-rr54.8%
if -4.7000000000000002e-281 < z < 8.0000000000000004e-293Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
associate-*r*99.7%
*-commutative99.7%
associate-+l-99.7%
associate-*l*100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
associate-/l*100.0%
*-commutative100.0%
Simplified100.0%
if 8.0000000000000004e-293 < z < 1.40000000000000007e62Initial program 93.8%
associate-+l-93.8%
*-commutative93.8%
associate-*r*95.2%
*-commutative95.2%
associate-+l-95.2%
associate-*l*95.2%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
Taylor expanded in b around inf 59.9%
*-commutative59.9%
Simplified59.9%
Final simplification62.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.25e+92) (not (<= z 4.6e+126))) (/ (- (/ b z) (* 4.0 (* a t))) c) (/ (+ b (- (* x (* y 9.0)) (* (* 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.25e+92) || !(z <= 4.6e+126)) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((x * (y * 9.0)) - ((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.25d+92)) .or. (.not. (z <= 4.6d+126))) then
tmp = ((b / z) - (4.0d0 * (a * t))) / c
else
tmp = (b + ((x * (y * 9.0d0)) - ((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.25e+92) || !(z <= 4.6e+126)) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((x * (y * 9.0)) - ((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.25e+92) or not (z <= 4.6e+126): tmp = ((b / z) - (4.0 * (a * t))) / c else: tmp = (b + ((x * (y * 9.0)) - ((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.25e+92) || !(z <= 4.6e+126)) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(y * 9.0)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2.25e+92) || ~((z <= 4.6e+126)))
tmp = ((b / z) - (4.0 * (a * t))) / c;
else
tmp = (b + ((x * (y * 9.0)) - ((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.25e+92], N[Not[LessEqual[z, 4.6e+126]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], 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]]
\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.25 \cdot 10^{+92} \lor \neg \left(z \leq 4.6 \cdot 10^{+126}\right):\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\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}\\
\end{array}
\end{array}
if z < -2.25e92 or 4.6000000000000001e126 < z Initial program 56.9%
associate-+l-56.9%
*-commutative56.9%
associate-*r*50.0%
*-commutative50.0%
associate-+l-50.0%
associate-*l*50.0%
associate-*l*57.0%
*-commutative57.0%
Simplified57.0%
Taylor expanded in y around inf 77.4%
Taylor expanded in c around 0 85.0%
Taylor expanded in y around 0 78.3%
if -2.25e92 < z < 4.6000000000000001e126Initial program 88.9%
associate-+l-88.9%
*-commutative88.9%
associate-*r*91.1%
*-commutative91.1%
associate-+l-91.1%
associate-*l*91.2%
associate-*l*89.5%
*-commutative89.5%
Simplified89.5%
Final simplification85.8%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.05e+89) (not (<= z 3.7e+53))) (/ (- (/ b z) (* 4.0 (* a t))) c) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.05e+89) || !(z <= 3.7e+53)) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-1.05d+89)) .or. (.not. (z <= 3.7d+53))) then
tmp = ((b / z) - (4.0d0 * (a * t))) / c
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.05e+89) || !(z <= 3.7e+53)) {
tmp = ((b / z) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.05e+89) or not (z <= 3.7e+53): tmp = ((b / z) - (4.0 * (a * t))) / c else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.05e+89) || !(z <= 3.7e+53)) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.05e+89) || ~((z <= 3.7e+53)))
tmp = ((b / z) - (4.0 * (a * t))) / c;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.05e+89], N[Not[LessEqual[z, 3.7e+53]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+89} \lor \neg \left(z \leq 3.7 \cdot 10^{+53}\right):\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.04999999999999993e89 or 3.7e53 < z Initial program 58.7%
associate-+l-58.7%
*-commutative58.7%
associate-*r*54.0%
*-commutative54.0%
associate-+l-54.0%
associate-*l*54.0%
associate-*l*60.6%
*-commutative60.6%
Simplified60.6%
Taylor expanded in y around inf 77.0%
Taylor expanded in c around 0 84.1%
Taylor expanded in y around 0 77.9%
if -1.04999999999999993e89 < z < 3.7e53Initial program 91.9%
Final simplification86.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 (or (<= z -6.4e+109) (not (<= z 2.15e+66))) (* t (/ (* a -4.0) 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 <= -6.4e+109) || !(z <= 2.15e+66)) {
tmp = t * ((a * -4.0) / 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 <= (-6.4d+109)) .or. (.not. (z <= 2.15d+66))) then
tmp = t * ((a * (-4.0d0)) / 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 <= -6.4e+109) || !(z <= 2.15e+66)) {
tmp = t * ((a * -4.0) / 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 <= -6.4e+109) or not (z <= 2.15e+66): tmp = t * ((a * -4.0) / 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 <= -6.4e+109) || !(z <= 2.15e+66)) tmp = Float64(t * Float64(Float64(a * -4.0) / 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 <= -6.4e+109) || ~((z <= 2.15e+66)))
tmp = t * ((a * -4.0) / 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, -6.4e+109], N[Not[LessEqual[z, 2.15e+66]], $MachinePrecision]], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $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 -6.4 \cdot 10^{+109} \lor \neg \left(z \leq 2.15 \cdot 10^{+66}\right):\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -6.4000000000000002e109 or 2.15000000000000013e66 < z Initial program 57.1%
associate-+l-57.1%
*-commutative57.1%
associate-*r*50.8%
*-commutative50.8%
associate-+l-50.8%
associate-*l*50.7%
associate-*l*58.2%
*-commutative58.2%
Simplified58.2%
Taylor expanded in y around inf 77.5%
Taylor expanded in c around 0 83.4%
Taylor expanded in z around inf 68.1%
*-commutative68.1%
*-commutative68.1%
associate-/l*67.4%
associate-*r*67.4%
*-commutative67.4%
associate-*r/67.6%
*-commutative67.6%
associate-/l*67.5%
Simplified67.5%
associate-*r/67.6%
Applied egg-rr67.6%
if -6.4000000000000002e109 < z < 2.15000000000000013e66Initial program 90.6%
associate-+l-90.6%
*-commutative90.6%
associate-*r*93.0%
*-commutative93.0%
associate-+l-93.0%
associate-*l*93.0%
associate-*l*90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in z around 0 81.5%
*-commutative81.5%
Simplified81.5%
Final simplification76.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.05e+86) (not (<= z 5.7e+51))) (/ (- (/ 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 <= -2.05e+86) || !(z <= 5.7e+51)) {
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 <= (-2.05d+86)) .or. (.not. (z <= 5.7d+51))) 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 <= -2.05e+86) || !(z <= 5.7e+51)) {
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 <= -2.05e+86) or not (z <= 5.7e+51): 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 <= -2.05e+86) || !(z <= 5.7e+51)) 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 <= -2.05e+86) || ~((z <= 5.7e+51)))
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, -2.05e+86], N[Not[LessEqual[z, 5.7e+51]], $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 -2.05 \cdot 10^{+86} \lor \neg \left(z \leq 5.7 \cdot 10^{+51}\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 < -2.05e86 or 5.7000000000000002e51 < z Initial program 58.7%
associate-+l-58.7%
*-commutative58.7%
associate-*r*54.0%
*-commutative54.0%
associate-+l-54.0%
associate-*l*54.0%
associate-*l*60.6%
*-commutative60.6%
Simplified60.6%
Taylor expanded in y around inf 77.0%
Taylor expanded in c around 0 84.1%
Taylor expanded in y around 0 77.9%
if -2.05e86 < z < 5.7000000000000002e51Initial program 91.9%
associate-+l-91.9%
*-commutative91.9%
associate-*r*93.8%
*-commutative93.8%
associate-+l-93.8%
associate-*l*93.8%
associate-*l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in z around 0 82.7%
*-commutative82.7%
Simplified82.7%
Final simplification80.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.5e+98) (not (<= z 1.55e+63))) (* -4.0 (* t (/ a c))) (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+98) || !(z <= 1.55e+63)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-2.5d+98)) .or. (.not. (z <= 1.55d+63))) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+98) || !(z <= 1.55e+63)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.5e+98) or not (z <= 1.55e+63): tmp = -4.0 * (t * (a / c)) else: tmp = b / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.5e+98) || !(z <= 1.55e+63)) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2.5e+98) || ~((z <= 1.55e+63)))
tmp = -4.0 * (t * (a / c));
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.5e+98], N[Not[LessEqual[z, 1.55e+63]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+98} \lor \neg \left(z \leq 1.55 \cdot 10^{+63}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.4999999999999999e98 or 1.55e63 < z Initial program 57.8%
associate-+l-57.8%
*-commutative57.8%
associate-*r*51.8%
*-commutative51.8%
associate-+l-51.8%
associate-*l*51.8%
associate-*l*58.9%
*-commutative58.9%
Simplified58.9%
Taylor expanded in z around 0 61.5%
Taylor expanded in a around inf 66.5%
associate-*l/65.8%
Simplified65.8%
if -2.4999999999999999e98 < z < 1.55e63Initial program 90.9%
associate-+l-90.9%
*-commutative90.9%
associate-*r*93.4%
*-commutative93.4%
associate-+l-93.4%
associate-*l*93.4%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in b around inf 48.8%
*-commutative48.8%
Simplified48.8%
Final simplification55.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 (or (<= z -2.5e+98) (not (<= z 6e+63))) (* t (* a (/ -4.0 c))) (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+98) || !(z <= 6e+63)) {
tmp = t * (a * (-4.0 / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-2.5d+98)) .or. (.not. (z <= 6d+63))) then
tmp = t * (a * ((-4.0d0) / c))
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+98) || !(z <= 6e+63)) {
tmp = t * (a * (-4.0 / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.5e+98) or not (z <= 6e+63): tmp = t * (a * (-4.0 / c)) else: tmp = b / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.5e+98) || !(z <= 6e+63)) tmp = Float64(t * Float64(a * Float64(-4.0 / c))); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2.5e+98) || ~((z <= 6e+63)))
tmp = t * (a * (-4.0 / c));
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.5e+98], N[Not[LessEqual[z, 6e+63]], $MachinePrecision]], N[(t * N[(a * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+98} \lor \neg \left(z \leq 6 \cdot 10^{+63}\right):\\
\;\;\;\;t \cdot \left(a \cdot \frac{-4}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.4999999999999999e98 or 5.99999999999999998e63 < z Initial program 57.8%
associate-+l-57.8%
*-commutative57.8%
associate-*r*51.8%
*-commutative51.8%
associate-+l-51.8%
associate-*l*51.8%
associate-*l*58.9%
*-commutative58.9%
Simplified58.9%
Taylor expanded in y around inf 77.4%
Taylor expanded in c around 0 84.0%
Taylor expanded in z around inf 66.5%
*-commutative66.5%
*-commutative66.5%
associate-/l*65.8%
associate-*r*65.8%
*-commutative65.8%
associate-*r/65.9%
*-commutative65.9%
associate-/l*65.9%
Simplified65.9%
if -2.4999999999999999e98 < z < 5.99999999999999998e63Initial program 90.9%
associate-+l-90.9%
*-commutative90.9%
associate-*r*93.4%
*-commutative93.4%
associate-+l-93.4%
associate-*l*93.4%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in b around inf 48.8%
*-commutative48.8%
Simplified48.8%
Final simplification55.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.5e+98) (not (<= z 1.45e+63))) (* t (/ (* a -4.0) c)) (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+98) || !(z <= 1.45e+63)) {
tmp = t * ((a * -4.0) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-2.5d+98)) .or. (.not. (z <= 1.45d+63))) then
tmp = t * ((a * (-4.0d0)) / c)
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+98) || !(z <= 1.45e+63)) {
tmp = t * ((a * -4.0) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.5e+98) or not (z <= 1.45e+63): tmp = t * ((a * -4.0) / c) else: tmp = b / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.5e+98) || !(z <= 1.45e+63)) tmp = Float64(t * Float64(Float64(a * -4.0) / c)); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2.5e+98) || ~((z <= 1.45e+63)))
tmp = t * ((a * -4.0) / c);
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.5e+98], N[Not[LessEqual[z, 1.45e+63]], $MachinePrecision]], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+98} \lor \neg \left(z \leq 1.45 \cdot 10^{+63}\right):\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.4999999999999999e98 or 1.45e63 < z Initial program 57.8%
associate-+l-57.8%
*-commutative57.8%
associate-*r*51.8%
*-commutative51.8%
associate-+l-51.8%
associate-*l*51.8%
associate-*l*58.9%
*-commutative58.9%
Simplified58.9%
Taylor expanded in y around inf 77.4%
Taylor expanded in c around 0 84.0%
Taylor expanded in z around inf 66.5%
*-commutative66.5%
*-commutative66.5%
associate-/l*65.8%
associate-*r*65.8%
*-commutative65.8%
associate-*r/65.9%
*-commutative65.9%
associate-/l*65.9%
Simplified65.9%
associate-*r/65.9%
Applied egg-rr65.9%
if -2.4999999999999999e98 < z < 1.45e63Initial program 90.9%
associate-+l-90.9%
*-commutative90.9%
associate-*r*93.4%
*-commutative93.4%
associate-+l-93.4%
associate-*l*93.4%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in b around inf 48.8%
*-commutative48.8%
Simplified48.8%
Final simplification55.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.5e+98) (not (<= z 1.6e+62))) (* t (/ (* a -4.0) c)) (/ 1.0 (/ (* z c) b))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+98) || !(z <= 1.6e+62)) {
tmp = t * ((a * -4.0) / c);
} else {
tmp = 1.0 / ((z * c) / b);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-2.5d+98)) .or. (.not. (z <= 1.6d+62))) then
tmp = t * ((a * (-4.0d0)) / c)
else
tmp = 1.0d0 / ((z * c) / b)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.5e+98) || !(z <= 1.6e+62)) {
tmp = t * ((a * -4.0) / c);
} else {
tmp = 1.0 / ((z * c) / b);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.5e+98) or not (z <= 1.6e+62): tmp = t * ((a * -4.0) / c) else: tmp = 1.0 / ((z * c) / b) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.5e+98) || !(z <= 1.6e+62)) tmp = Float64(t * Float64(Float64(a * -4.0) / c)); else tmp = Float64(1.0 / Float64(Float64(z * c) / b)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2.5e+98) || ~((z <= 1.6e+62)))
tmp = t * ((a * -4.0) / c);
else
tmp = 1.0 / ((z * c) / b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.5e+98], N[Not[LessEqual[z, 1.6e+62]], $MachinePrecision]], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(z * c), $MachinePrecision] / b), $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.5 \cdot 10^{+98} \lor \neg \left(z \leq 1.6 \cdot 10^{+62}\right):\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{z \cdot c}{b}}\\
\end{array}
\end{array}
if z < -2.4999999999999999e98 or 1.59999999999999992e62 < z Initial program 57.8%
associate-+l-57.8%
*-commutative57.8%
associate-*r*51.8%
*-commutative51.8%
associate-+l-51.8%
associate-*l*51.8%
associate-*l*58.9%
*-commutative58.9%
Simplified58.9%
Taylor expanded in y around inf 77.4%
Taylor expanded in c around 0 84.0%
Taylor expanded in z around inf 66.5%
*-commutative66.5%
*-commutative66.5%
associate-/l*65.8%
associate-*r*65.8%
*-commutative65.8%
associate-*r/65.9%
*-commutative65.9%
associate-/l*65.9%
Simplified65.9%
associate-*r/65.9%
Applied egg-rr65.9%
if -2.4999999999999999e98 < z < 1.59999999999999992e62Initial program 90.9%
associate-+l-90.9%
*-commutative90.9%
associate-*r*93.4%
*-commutative93.4%
associate-+l-93.4%
associate-*l*93.4%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in b around inf 48.8%
*-commutative48.8%
Simplified48.8%
clear-num48.8%
inv-pow48.8%
Applied egg-rr48.8%
unpow-148.8%
associate-/l*45.3%
Simplified45.3%
Taylor expanded in z around 0 48.8%
*-commutative48.8%
Simplified48.8%
Final simplification55.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 -2.5e+98) (* a (/ (* t -4.0) c)) (if (<= z 5.3e+62) (/ b (* z c)) (* -4.0 (* t (/ a 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.5e+98) {
tmp = a * ((t * -4.0) / c);
} else if (z <= 5.3e+62) {
tmp = b / (z * c);
} else {
tmp = -4.0 * (t * (a / 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.5d+98)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (z <= 5.3d+62) then
tmp = b / (z * c)
else
tmp = (-4.0d0) * (t * (a / 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.5e+98) {
tmp = a * ((t * -4.0) / c);
} else if (z <= 5.3e+62) {
tmp = b / (z * c);
} else {
tmp = -4.0 * (t * (a / 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.5e+98: tmp = a * ((t * -4.0) / c) elif z <= 5.3e+62: tmp = b / (z * c) else: tmp = -4.0 * (t * (a / 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.5e+98) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (z <= 5.3e+62) tmp = Float64(b / Float64(z * c)); else tmp = Float64(-4.0 * Float64(t * Float64(a / 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.5e+98)
tmp = a * ((t * -4.0) / c);
elseif (z <= 5.3e+62)
tmp = b / (z * c);
else
tmp = -4.0 * (t * (a / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -2.5e+98], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.3e+62], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+98}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{+62}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if z < -2.4999999999999999e98Initial program 54.8%
associate-+l-54.8%
*-commutative54.8%
associate-*r*46.0%
*-commutative46.0%
associate-+l-46.0%
associate-*l*46.0%
associate-*l*54.9%
*-commutative54.9%
Simplified54.9%
Taylor expanded in z around inf 63.3%
*-commutative63.3%
associate-/l*65.3%
associate-*r*65.3%
associate-*l/65.3%
Simplified65.3%
if -2.4999999999999999e98 < z < 5.3000000000000003e62Initial program 90.9%
associate-+l-90.9%
*-commutative90.9%
associate-*r*93.4%
*-commutative93.4%
associate-+l-93.4%
associate-*l*93.4%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in b around inf 48.8%
*-commutative48.8%
Simplified48.8%
if 5.3000000000000003e62 < z Initial program 60.4%
associate-+l-60.4%
*-commutative60.4%
associate-*r*56.7%
*-commutative56.7%
associate-+l-56.7%
associate-*l*56.6%
associate-*l*62.3%
*-commutative62.3%
Simplified62.3%
Taylor expanded in z around 0 68.7%
Taylor expanded in a around inf 69.2%
associate-*l/69.8%
Simplified69.8%
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 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 78.3%
associate-+l-78.3%
*-commutative78.3%
associate-*r*77.5%
*-commutative77.5%
associate-+l-77.5%
associate-*l*77.5%
associate-*l*78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in b around inf 37.9%
*-commutative37.9%
Simplified37.9%
Final simplification37.9%
(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 2024077
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))