
(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 (if (or (<= z -1.6e+32) (not (<= z 1.95e+18))) (/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.6e+32) || !(z <= 1.95e+18)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-1.6d+32)) .or. (.not. (z <= 1.95d+18))) then
tmp = (((-4.0d0) * (a * t)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.6e+32) || !(z <= 1.95e+18)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.6e+32) or not (z <= 1.95e+18): tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.6e+32) || !(z <= 1.95e+18)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.6e+32) || ~((z <= 1.95e+18)))
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.6e+32], N[Not[LessEqual[z, 1.95e+18]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+32} \lor \neg \left(z \leq 1.95 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.5999999999999999e32 or 1.95e18 < z Initial program 67.1%
+-commutative67.1%
associate-+r-67.1%
*-commutative67.1%
associate-*r*66.0%
*-commutative66.0%
associate-+r-66.0%
+-commutative66.0%
associate-*l*66.0%
associate-*l*70.4%
*-commutative70.4%
Simplified70.4%
Taylor expanded in z around inf 70.5%
Taylor expanded in z around inf 79.7%
+-commutative79.7%
metadata-eval79.7%
cancel-sign-sub-inv79.7%
+-commutative79.7%
*-commutative79.7%
associate-/l*82.3%
*-commutative82.3%
associate--l+82.3%
*-commutative82.3%
Simplified87.3%
Taylor expanded in c around 0 87.7%
if -1.5999999999999999e32 < z < 1.95e18Initial program 97.8%
Final simplification93.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 (<= y -2.9e-8)
(* 9.0 (* (/ y z) (/ x c)))
(if (<= y -2.25e-138)
(/ b (* z c))
(if (<= y 2.5e-81)
(* -4.0 (/ (* a t) c))
(if (<= y 3.4e-27)
(* b (/ 1.0 (* z c)))
(if (<= y 6.8e+156)
(* a (/ (* -4.0 t) c))
(* 9.0 (/ y (* z (/ c x))))))))))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 <= -2.9e-8) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (y <= -2.25e-138) {
tmp = b / (z * c);
} else if (y <= 2.5e-81) {
tmp = -4.0 * ((a * t) / c);
} else if (y <= 3.4e-27) {
tmp = b * (1.0 / (z * c));
} else if (y <= 6.8e+156) {
tmp = a * ((-4.0 * t) / c);
} else {
tmp = 9.0 * (y / (z * (c / x)));
}
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 <= (-2.9d-8)) then
tmp = 9.0d0 * ((y / z) * (x / c))
else if (y <= (-2.25d-138)) then
tmp = b / (z * c)
else if (y <= 2.5d-81) then
tmp = (-4.0d0) * ((a * t) / c)
else if (y <= 3.4d-27) then
tmp = b * (1.0d0 / (z * c))
else if (y <= 6.8d+156) then
tmp = a * (((-4.0d0) * t) / c)
else
tmp = 9.0d0 * (y / (z * (c / x)))
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 <= -2.9e-8) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (y <= -2.25e-138) {
tmp = b / (z * c);
} else if (y <= 2.5e-81) {
tmp = -4.0 * ((a * t) / c);
} else if (y <= 3.4e-27) {
tmp = b * (1.0 / (z * c));
} else if (y <= 6.8e+156) {
tmp = a * ((-4.0 * t) / c);
} else {
tmp = 9.0 * (y / (z * (c / x)));
}
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 <= -2.9e-8: tmp = 9.0 * ((y / z) * (x / c)) elif y <= -2.25e-138: tmp = b / (z * c) elif y <= 2.5e-81: tmp = -4.0 * ((a * t) / c) elif y <= 3.4e-27: tmp = b * (1.0 / (z * c)) elif y <= 6.8e+156: tmp = a * ((-4.0 * t) / c) else: tmp = 9.0 * (y / (z * (c / x))) 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 <= -2.9e-8) tmp = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))); elseif (y <= -2.25e-138) tmp = Float64(b / Float64(z * c)); elseif (y <= 2.5e-81) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (y <= 3.4e-27) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (y <= 6.8e+156) tmp = Float64(a * Float64(Float64(-4.0 * t) / c)); else tmp = Float64(9.0 * Float64(y / Float64(z * Float64(c / x)))); 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 <= -2.9e-8)
tmp = 9.0 * ((y / z) * (x / c));
elseif (y <= -2.25e-138)
tmp = b / (z * c);
elseif (y <= 2.5e-81)
tmp = -4.0 * ((a * t) / c);
elseif (y <= 3.4e-27)
tmp = b * (1.0 / (z * c));
elseif (y <= 6.8e+156)
tmp = a * ((-4.0 * t) / c);
else
tmp = 9.0 * (y / (z * (c / x)));
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, -2.9e-8], N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.25e-138], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e-81], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e-27], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+156], N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(y / N[(z * N[(c / x), $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 -2.9 \cdot 10^{-8}:\\
\;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
\mathbf{elif}\;y \leq -2.25 \cdot 10^{-138}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-81}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-27}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+156}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \frac{y}{z \cdot \frac{c}{x}}\\
\end{array}
\end{array}
if y < -2.9000000000000002e-8Initial program 84.5%
+-commutative84.5%
associate-+r-84.5%
*-commutative84.5%
associate-*r*83.0%
*-commutative83.0%
associate-+r-83.0%
+-commutative83.0%
associate-*l*83.0%
associate-*l*82.9%
*-commutative82.9%
Simplified82.9%
Taylor expanded in z around inf 80.1%
Taylor expanded in x around inf 49.0%
times-frac54.9%
*-commutative54.9%
Simplified54.9%
if -2.9000000000000002e-8 < y < -2.25000000000000004e-138Initial program 92.8%
Simplified92.8%
Taylor expanded in b around inf 39.8%
*-commutative39.8%
Simplified39.8%
if -2.25000000000000004e-138 < y < 2.4999999999999999e-81Initial program 84.1%
Simplified84.9%
Taylor expanded in t around inf 56.2%
if 2.4999999999999999e-81 < y < 3.3999999999999997e-27Initial program 99.6%
Simplified92.6%
Taylor expanded in b around inf 58.6%
*-commutative58.6%
Simplified58.6%
div-inv58.6%
Applied egg-rr58.6%
if 3.3999999999999997e-27 < y < 6.8000000000000002e156Initial program 77.8%
Simplified78.0%
Taylor expanded in t around inf 41.5%
*-commutative41.5%
associate-/l*48.5%
associate-*r*48.5%
*-commutative48.5%
*-commutative48.5%
associate-*l/48.5%
Simplified48.5%
if 6.8000000000000002e156 < y Initial program 76.6%
+-commutative76.6%
associate-+r-76.6%
*-commutative76.6%
associate-*r*76.5%
*-commutative76.5%
associate-+r-76.5%
+-commutative76.5%
associate-*l*76.5%
associate-*l*72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in z around inf 68.8%
Taylor expanded in x around inf 59.9%
times-frac60.7%
*-commutative60.7%
Simplified60.7%
*-commutative60.7%
clear-num60.6%
frac-times64.7%
*-un-lft-identity64.7%
Applied egg-rr64.7%
Final simplification53.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 -5e-32) (not (<= z 5.5e-143))) (/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c) (/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -5e-32) || !(z <= 5.5e-143)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-5d-32)) .or. (.not. (z <= 5.5d-143))) then
tmp = (((-4.0d0) * (a * t)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c
else
tmp = (b + ((x * (9.0d0 * y)) - ((a * t) * (z * 4.0d0)))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -5e-32) || !(z <= 5.5e-143)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -5e-32) or not (z <= 5.5e-143): tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c else: tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -5e-32) || !(z <= 5.5e-143)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -5e-32) || ~((z <= 5.5e-143)))
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
else
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -5e-32], N[Not[LessEqual[z, 5.5e-143]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-32} \lor \neg \left(z \leq 5.5 \cdot 10^{-143}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -5e-32 or 5.50000000000000041e-143 < z Initial program 76.3%
+-commutative76.3%
associate-+r-76.3%
*-commutative76.3%
associate-*r*75.5%
*-commutative75.5%
associate-+r-75.5%
+-commutative75.5%
associate-*l*75.5%
associate-*l*77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in z around inf 77.5%
Taylor expanded in z around inf 80.1%
+-commutative80.1%
metadata-eval80.1%
cancel-sign-sub-inv80.1%
+-commutative80.1%
*-commutative80.1%
associate-/l*82.4%
*-commutative82.4%
associate--l+82.4%
*-commutative82.4%
Simplified86.0%
Taylor expanded in c around 0 89.3%
if -5e-32 < z < 5.50000000000000041e-143Initial program 98.7%
+-commutative98.7%
associate-+r-98.7%
*-commutative98.7%
associate-*r*98.7%
*-commutative98.7%
associate-+r-98.7%
+-commutative98.7%
associate-*l*98.7%
associate-*l*95.5%
*-commutative95.5%
Simplified95.5%
Final simplification91.5%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -5e-127) (not (<= z 5.2e-154))) (/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c) (/ (+ b (* 9.0 (* x y))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -5e-127) || !(z <= 5.2e-154)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-5d-127)) .or. (.not. (z <= 5.2d-154))) then
tmp = (((-4.0d0) * (a * t)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c
else
tmp = (b + (9.0d0 * (x * y))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 <= -5e-127) || !(z <= 5.2e-154)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [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 <= -5e-127) or not (z <= 5.2e-154): tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c else: tmp = (b + (9.0 * (x * y))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) 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 <= -5e-127) || !(z <= 5.2e-154)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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 <= -5e-127) || ~((z <= 5.2e-154)))
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c;
else
tmp = (b + (9.0 * (x * y))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. 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, -5e-127], N[Not[LessEqual[z, 5.2e-154]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-127} \lor \neg \left(z \leq 5.2 \cdot 10^{-154}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -4.9999999999999997e-127 or 5.2e-154 < z Initial program 78.3%
+-commutative78.3%
associate-+r-78.3%
*-commutative78.3%
associate-*r*77.7%
*-commutative77.7%
associate-+r-77.7%
+-commutative77.7%
associate-*l*77.7%
associate-*l*78.9%
*-commutative78.9%
Simplified78.9%
Taylor expanded in z around inf 78.4%
Taylor expanded in z around inf 79.1%
+-commutative79.1%
metadata-eval79.1%
cancel-sign-sub-inv79.1%
+-commutative79.1%
*-commutative79.1%
associate-/l*81.2%
*-commutative81.2%
associate--l+81.2%
*-commutative81.2%
Simplified85.0%
Taylor expanded in c around 0 89.1%
if -4.9999999999999997e-127 < z < 5.2e-154Initial program 98.5%
Simplified98.5%
Taylor expanded in t around 0 93.3%
+-commutative93.3%
*-commutative93.3%
Simplified93.3%
Final simplification90.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
(let* ((t_1 (* a (/ (* -4.0 t) c))))
(if (<= t -1.1e+135)
t_1
(if (<= t -1.6e-308)
(* 9.0 (* (/ y z) (/ x c)))
(if (<= t 2.3e-30) (/ (/ b z) 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 = a * ((-4.0 * t) / c);
double tmp;
if (t <= -1.1e+135) {
tmp = t_1;
} else if (t <= -1.6e-308) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (t <= 2.3e-30) {
tmp = (b / z) / 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 = a * (((-4.0d0) * t) / c)
if (t <= (-1.1d+135)) then
tmp = t_1
else if (t <= (-1.6d-308)) then
tmp = 9.0d0 * ((y / z) * (x / c))
else if (t <= 2.3d-30) then
tmp = (b / z) / 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 = a * ((-4.0 * t) / c);
double tmp;
if (t <= -1.1e+135) {
tmp = t_1;
} else if (t <= -1.6e-308) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (t <= 2.3e-30) {
tmp = (b / z) / 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 = a * ((-4.0 * t) / c) tmp = 0 if t <= -1.1e+135: tmp = t_1 elif t <= -1.6e-308: tmp = 9.0 * ((y / z) * (x / c)) elif t <= 2.3e-30: tmp = (b / z) / 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(a * Float64(Float64(-4.0 * t) / c)) tmp = 0.0 if (t <= -1.1e+135) tmp = t_1; elseif (t <= -1.6e-308) tmp = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))); elseif (t <= 2.3e-30) tmp = Float64(Float64(b / z) / 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 = a * ((-4.0 * t) / c);
tmp = 0.0;
if (t <= -1.1e+135)
tmp = t_1;
elseif (t <= -1.6e-308)
tmp = 9.0 * ((y / z) * (x / c));
elseif (t <= 2.3e-30)
tmp = (b / z) / 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[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+135], t$95$1, If[LessEqual[t, -1.6e-308], N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-30], N[(N[(b / z), $MachinePrecision] / c), $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 := a \cdot \frac{-4 \cdot t}{c}\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-308}:\\
\;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-30}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1e135 or 2.29999999999999984e-30 < t Initial program 80.0%
Simplified83.6%
Taylor expanded in t around inf 52.1%
*-commutative52.1%
associate-/l*60.3%
associate-*r*60.3%
*-commutative60.3%
*-commutative60.3%
associate-*l/60.3%
Simplified60.3%
if -1.1e135 < t < -1.6000000000000001e-308Initial program 85.5%
+-commutative85.5%
associate-+r-85.5%
*-commutative85.5%
associate-*r*83.3%
*-commutative83.3%
associate-+r-83.3%
+-commutative83.3%
associate-*l*83.3%
associate-*l*85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in z around inf 83.3%
Taylor expanded in x around inf 37.3%
times-frac41.8%
*-commutative41.8%
Simplified41.8%
if -1.6000000000000001e-308 < t < 2.29999999999999984e-30Initial program 89.3%
+-commutative89.3%
associate-+r-89.3%
*-commutative89.3%
associate-*r*84.7%
*-commutative84.7%
associate-+r-84.7%
+-commutative84.7%
associate-*l*84.7%
associate-*l*89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in z around inf 88.0%
Taylor expanded in z around 0 83.4%
associate-*r*83.4%
Simplified83.4%
Taylor expanded in x around 0 47.6%
*-commutative47.6%
associate-/r*49.9%
Simplified49.9%
Final simplification51.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* a (/ (* -4.0 t) c))))
(if (<= t -4.5e+134)
t_1
(if (<= t -1.6e-246)
(* 9.0 (* (/ y c) (/ x z)))
(if (<= t 7.4e-28) (/ (/ b z) 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 = a * ((-4.0 * t) / c);
double tmp;
if (t <= -4.5e+134) {
tmp = t_1;
} else if (t <= -1.6e-246) {
tmp = 9.0 * ((y / c) * (x / z));
} else if (t <= 7.4e-28) {
tmp = (b / z) / 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 = a * (((-4.0d0) * t) / c)
if (t <= (-4.5d+134)) then
tmp = t_1
else if (t <= (-1.6d-246)) then
tmp = 9.0d0 * ((y / c) * (x / z))
else if (t <= 7.4d-28) then
tmp = (b / z) / 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 = a * ((-4.0 * t) / c);
double tmp;
if (t <= -4.5e+134) {
tmp = t_1;
} else if (t <= -1.6e-246) {
tmp = 9.0 * ((y / c) * (x / z));
} else if (t <= 7.4e-28) {
tmp = (b / z) / 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 = a * ((-4.0 * t) / c) tmp = 0 if t <= -4.5e+134: tmp = t_1 elif t <= -1.6e-246: tmp = 9.0 * ((y / c) * (x / z)) elif t <= 7.4e-28: tmp = (b / z) / 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(a * Float64(Float64(-4.0 * t) / c)) tmp = 0.0 if (t <= -4.5e+134) tmp = t_1; elseif (t <= -1.6e-246) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); elseif (t <= 7.4e-28) tmp = Float64(Float64(b / z) / 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 = a * ((-4.0 * t) / c);
tmp = 0.0;
if (t <= -4.5e+134)
tmp = t_1;
elseif (t <= -1.6e-246)
tmp = 9.0 * ((y / c) * (x / z));
elseif (t <= 7.4e-28)
tmp = (b / z) / 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[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.5e+134], t$95$1, If[LessEqual[t, -1.6e-246], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.4e-28], N[(N[(b / z), $MachinePrecision] / c), $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 := a \cdot \frac{-4 \cdot t}{c}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-246}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{-28}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.4999999999999997e134 or 7.40000000000000039e-28 < t Initial program 80.0%
Simplified83.6%
Taylor expanded in t around inf 52.1%
*-commutative52.1%
associate-/l*60.3%
associate-*r*60.3%
*-commutative60.3%
*-commutative60.3%
associate-*l/60.3%
Simplified60.3%
if -4.4999999999999997e134 < t < -1.6e-246Initial program 83.7%
Simplified81.3%
Taylor expanded in x around inf 40.3%
*-commutative40.3%
*-commutative40.3%
*-commutative40.3%
times-frac43.9%
Simplified43.9%
if -1.6e-246 < t < 7.40000000000000039e-28Initial program 90.7%
+-commutative90.7%
associate-+r-90.7%
*-commutative90.7%
associate-*r*86.6%
*-commutative86.6%
associate-+r-86.6%
+-commutative86.6%
associate-*l*86.7%
associate-*l*89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in z around inf 88.3%
Taylor expanded in z around 0 81.8%
associate-*r*81.8%
Simplified81.8%
Taylor expanded in x around 0 50.8%
*-commutative50.8%
associate-/r*51.5%
Simplified51.5%
Final simplification52.7%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -7.6e+57) (not (<= z 5e-125))) (/ (+ (* -4.0 (* a t)) (/ b z)) c) (/ (+ b (* 9.0 (* x y))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -7.6e+57) || !(z <= 5e-125)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 <= (-7.6d+57)) .or. (.not. (z <= 5d-125))) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else
tmp = (b + (9.0d0 * (x * y))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
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 <= -7.6e+57) || !(z <= 5e-125)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [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 <= -7.6e+57) or not (z <= 5e-125): tmp = ((-4.0 * (a * t)) + (b / z)) / c else: tmp = (b + (9.0 * (x * y))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) 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 <= -7.6e+57) || !(z <= 5e-125)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
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 <= -7.6e+57) || ~((z <= 5e-125)))
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
else
tmp = (b + (9.0 * (x * y))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. 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, -7.6e+57], N[Not[LessEqual[z, 5e-125]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{+57} \lor \neg \left(z \leq 5 \cdot 10^{-125}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -7.5999999999999997e57 or 4.99999999999999967e-125 < z Initial program 72.6%
+-commutative72.6%
associate-+r-72.6%
*-commutative72.6%
associate-*r*71.8%
*-commutative71.8%
associate-+r-71.8%
+-commutative71.8%
associate-*l*71.7%
associate-*l*74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in z around inf 74.0%
Taylor expanded in z around inf 78.6%
+-commutative78.6%
metadata-eval78.6%
cancel-sign-sub-inv78.6%
+-commutative78.6%
*-commutative78.6%
associate-/l*82.0%
*-commutative82.0%
associate--l+82.0%
*-commutative82.0%
Simplified85.5%
Taylor expanded in c around 0 88.0%
Taylor expanded in x around 0 71.7%
if -7.5999999999999997e57 < z < 4.99999999999999967e-125Initial program 98.0%
Simplified98.1%
Taylor expanded in t around 0 84.9%
+-commutative84.9%
*-commutative84.9%
Simplified84.9%
Final simplification77.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+25)
(/ (- (* 9.0 (/ (* x y) z)) (* (* a t) 4.0)) c)
(if (<= z 5e-125)
(/ (+ b (* 9.0 (* x y))) (* z c))
(/ (+ (* -4.0 (* a t)) (/ b z)) c))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -6e+25) {
tmp = ((9.0 * ((x * y) / z)) - ((a * t) * 4.0)) / c;
} else if (z <= 5e-125) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-6d+25)) then
tmp = ((9.0d0 * ((x * y) / z)) - ((a * t) * 4.0d0)) / c
else if (z <= 5d-125) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -6e+25) {
tmp = ((9.0 * ((x * y) / z)) - ((a * t) * 4.0)) / c;
} else if (z <= 5e-125) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -6e+25: tmp = ((9.0 * ((x * y) / z)) - ((a * t) * 4.0)) / c elif z <= 5e-125: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = ((-4.0 * (a * t)) + (b / z)) / c return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -6e+25) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) - Float64(Float64(a * t) * 4.0)) / c); elseif (z <= 5e-125) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -6e+25)
tmp = ((9.0 * ((x * y) / z)) - ((a * t) * 4.0)) / c;
elseif (z <= 5e-125)
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -6e+25], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 5e-125], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+25}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z} - \left(a \cdot t\right) \cdot 4}{c}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-125}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if z < -6.00000000000000011e25Initial program 74.1%
+-commutative74.1%
associate-+r-74.1%
*-commutative74.1%
associate-*r*76.7%
*-commutative76.7%
associate-+r-76.7%
+-commutative76.7%
associate-*l*76.7%
associate-*l*76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in z around inf 77.0%
Taylor expanded in b around 0 75.6%
if -6.00000000000000011e25 < z < 4.99999999999999967e-125Initial program 98.8%
Simplified98.9%
Taylor expanded in t around 0 86.2%
+-commutative86.2%
*-commutative86.2%
Simplified86.2%
if 4.99999999999999967e-125 < z Initial program 73.5%
+-commutative73.5%
associate-+r-73.5%
*-commutative73.5%
associate-*r*69.8%
*-commutative69.8%
associate-+r-69.8%
+-commutative69.8%
associate-*l*69.8%
associate-*l*73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in z around inf 73.5%
Taylor expanded in z around inf 75.4%
+-commutative75.4%
metadata-eval75.4%
cancel-sign-sub-inv75.4%
+-commutative75.4%
*-commutative75.4%
associate-/l*78.8%
*-commutative78.8%
associate--l+78.8%
*-commutative78.8%
Simplified82.6%
Taylor expanded in c around 0 86.8%
Taylor expanded in x around 0 71.2%
Final simplification78.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 -1.35e-5)
(* 9.0 (* (/ y z) (/ x c)))
(if (<= y 7.5e+174)
(/ (+ (* -4.0 (* a t)) (/ b z)) c)
(* 9.0 (/ y (* z (/ c x)))))))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 <= -1.35e-5) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (y <= 7.5e+174) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = 9.0 * (y / (z * (c / x)));
}
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 <= (-1.35d-5)) then
tmp = 9.0d0 * ((y / z) * (x / c))
else if (y <= 7.5d+174) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else
tmp = 9.0d0 * (y / (z * (c / x)))
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 <= -1.35e-5) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (y <= 7.5e+174) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = 9.0 * (y / (z * (c / x)));
}
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 <= -1.35e-5: tmp = 9.0 * ((y / z) * (x / c)) elif y <= 7.5e+174: tmp = ((-4.0 * (a * t)) + (b / z)) / c else: tmp = 9.0 * (y / (z * (c / x))) 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 <= -1.35e-5) tmp = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))); elseif (y <= 7.5e+174) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); else tmp = Float64(9.0 * Float64(y / Float64(z * Float64(c / x)))); 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 <= -1.35e-5)
tmp = 9.0 * ((y / z) * (x / c));
elseif (y <= 7.5e+174)
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
else
tmp = 9.0 * (y / (z * (c / x)));
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, -1.35e-5], N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+174], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(9.0 * N[(y / N[(z * N[(c / x), $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 -1.35 \cdot 10^{-5}:\\
\;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+174}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \frac{y}{z \cdot \frac{c}{x}}\\
\end{array}
\end{array}
if y < -1.3499999999999999e-5Initial program 84.5%
+-commutative84.5%
associate-+r-84.5%
*-commutative84.5%
associate-*r*83.0%
*-commutative83.0%
associate-+r-83.0%
+-commutative83.0%
associate-*l*83.0%
associate-*l*82.9%
*-commutative82.9%
Simplified82.9%
Taylor expanded in z around inf 80.1%
Taylor expanded in x around inf 49.0%
times-frac54.9%
*-commutative54.9%
Simplified54.9%
if -1.3499999999999999e-5 < y < 7.5000000000000004e174Initial program 85.5%
+-commutative85.5%
associate-+r-85.5%
*-commutative85.5%
associate-*r*85.4%
*-commutative85.4%
associate-+r-85.4%
+-commutative85.4%
associate-*l*85.4%
associate-*l*86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in z around inf 84.3%
Taylor expanded in z around inf 83.4%
+-commutative83.4%
metadata-eval83.4%
cancel-sign-sub-inv83.4%
+-commutative83.4%
*-commutative83.4%
associate-/l*84.0%
*-commutative84.0%
associate--l+84.0%
*-commutative84.0%
Simplified87.0%
Taylor expanded in c around 0 89.7%
Taylor expanded in x around 0 74.5%
if 7.5000000000000004e174 < y Initial program 74.5%
+-commutative74.5%
associate-+r-74.5%
*-commutative74.5%
associate-*r*74.5%
*-commutative74.5%
associate-+r-74.5%
+-commutative74.5%
associate-*l*74.4%
associate-*l*70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in z around inf 66.0%
Taylor expanded in x around inf 56.4%
times-frac61.3%
*-commutative61.3%
Simplified61.3%
*-commutative61.3%
clear-num61.1%
frac-times61.7%
*-un-lft-identity61.7%
Applied egg-rr61.7%
Final simplification68.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 -7e+25) (not (<= z 2.15e-152))) (* a (/ (* -4.0 t) c)) (* b (/ 1.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 <= -7e+25) || !(z <= 2.15e-152)) {
tmp = a * ((-4.0 * t) / c);
} else {
tmp = b * (1.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 <= (-7d+25)) .or. (.not. (z <= 2.15d-152))) then
tmp = a * (((-4.0d0) * t) / c)
else
tmp = b * (1.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 <= -7e+25) || !(z <= 2.15e-152)) {
tmp = a * ((-4.0 * t) / c);
} else {
tmp = b * (1.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 <= -7e+25) or not (z <= 2.15e-152): tmp = a * ((-4.0 * t) / c) else: tmp = b * (1.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 <= -7e+25) || !(z <= 2.15e-152)) tmp = Float64(a * Float64(Float64(-4.0 * t) / c)); else tmp = Float64(b * Float64(1.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 <= -7e+25) || ~((z <= 2.15e-152)))
tmp = a * ((-4.0 * t) / c);
else
tmp = b * (1.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, -7e+25], N[Not[LessEqual[z, 2.15e-152]], $MachinePrecision]], N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(b * N[(1.0 / N[(z * 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 -7 \cdot 10^{+25} \lor \neg \left(z \leq 2.15 \cdot 10^{-152}\right):\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\end{array}
\end{array}
if z < -6.99999999999999999e25 or 2.1499999999999999e-152 < z Initial program 74.6%
Simplified74.5%
Taylor expanded in t around inf 51.5%
*-commutative51.5%
associate-/l*55.8%
associate-*r*55.8%
*-commutative55.8%
*-commutative55.8%
associate-*l/55.8%
Simplified55.8%
if -6.99999999999999999e25 < z < 2.1499999999999999e-152Initial program 98.8%
Simplified98.8%
Taylor expanded in b around inf 50.8%
*-commutative50.8%
Simplified50.8%
div-inv53.6%
Applied egg-rr53.6%
Final simplification54.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 -1.25e+23) (not (<= z 2.15e-152))) (* a (/ (* -4.0 t) c)) (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.25e+23) || !(z <= 2.15e-152)) {
tmp = a * ((-4.0 * t) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-1.25d+23)) .or. (.not. (z <= 2.15d-152))) then
tmp = a * (((-4.0d0) * t) / c)
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.25e+23) || !(z <= 2.15e-152)) {
tmp = a * ((-4.0 * t) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.25e+23) or not (z <= 2.15e-152): tmp = a * ((-4.0 * t) / c) else: tmp = b / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.25e+23) || !(z <= 2.15e-152)) tmp = Float64(a * Float64(Float64(-4.0 * t) / c)); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.25e+23) || ~((z <= 2.15e-152)))
tmp = a * ((-4.0 * t) / c);
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.25e+23], N[Not[LessEqual[z, 2.15e-152]], $MachinePrecision]], N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+23} \lor \neg \left(z \leq 2.15 \cdot 10^{-152}\right):\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.25e23 or 2.1499999999999999e-152 < z Initial program 74.6%
Simplified74.5%
Taylor expanded in t around inf 51.5%
*-commutative51.5%
associate-/l*55.8%
associate-*r*55.8%
*-commutative55.8%
*-commutative55.8%
associate-*l/55.8%
Simplified55.8%
if -1.25e23 < z < 2.1499999999999999e-152Initial program 98.8%
Simplified98.8%
Taylor expanded in b around inf 50.8%
*-commutative50.8%
Simplified50.8%
Final simplification53.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 -5.4e+21) (not (<= z 2.15e-152))) (* a (* t (/ -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 <= -5.4e+21) || !(z <= 2.15e-152)) {
tmp = a * (t * (-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 <= (-5.4d+21)) .or. (.not. (z <= 2.15d-152))) then
tmp = a * (t * ((-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 <= -5.4e+21) || !(z <= 2.15e-152)) {
tmp = a * (t * (-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 <= -5.4e+21) or not (z <= 2.15e-152): tmp = a * (t * (-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 <= -5.4e+21) || !(z <= 2.15e-152)) tmp = Float64(a * Float64(t * 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 <= -5.4e+21) || ~((z <= 2.15e-152)))
tmp = a * (t * (-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, -5.4e+21], N[Not[LessEqual[z, 2.15e-152]], $MachinePrecision]], N[(a * N[(t * 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 -5.4 \cdot 10^{+21} \lor \neg \left(z \leq 2.15 \cdot 10^{-152}\right):\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -5.4e21 or 2.1499999999999999e-152 < z Initial program 74.6%
Simplified74.5%
Taylor expanded in t around inf 51.5%
*-commutative51.5%
associate-/l*55.8%
associate-*r*55.8%
*-commutative55.8%
*-commutative55.8%
associate-*l/55.8%
Simplified55.8%
Taylor expanded in a around 0 51.5%
*-commutative51.5%
associate-*l/51.5%
associate-*r/51.4%
associate-*r*55.7%
Simplified55.7%
if -5.4e21 < z < 2.1499999999999999e-152Initial program 98.8%
Simplified98.8%
Taylor expanded in b around inf 50.8%
*-commutative50.8%
Simplified50.8%
Final simplification53.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 -3.5e+22) (not (<= z 2.15e-152))) (* -4.0 (/ (* a t) c)) (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.5e+22) || !(z <= 2.15e-152)) {
tmp = -4.0 * ((a * t) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-3.5d+22)) .or. (.not. (z <= 2.15d-152))) then
tmp = (-4.0d0) * ((a * t) / c)
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.5e+22) || !(z <= 2.15e-152)) {
tmp = -4.0 * ((a * t) / c);
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -3.5e+22) or not (z <= 2.15e-152): tmp = -4.0 * ((a * t) / c) else: tmp = b / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -3.5e+22) || !(z <= 2.15e-152)) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -3.5e+22) || ~((z <= 2.15e-152)))
tmp = -4.0 * ((a * t) / c);
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -3.5e+22], N[Not[LessEqual[z, 2.15e-152]], $MachinePrecision]], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+22} \lor \neg \left(z \leq 2.15 \cdot 10^{-152}\right):\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -3.5e22 or 2.1499999999999999e-152 < z Initial program 74.6%
Simplified74.5%
Taylor expanded in t around inf 51.5%
if -3.5e22 < z < 2.1499999999999999e-152Initial program 98.8%
Simplified98.8%
Taylor expanded in b around inf 50.8%
*-commutative50.8%
Simplified50.8%
Final simplification51.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= z -7.6e+20) (* a (/ (* -4.0 t) c)) (if (<= z 1.52e-152) (* b (/ 1.0 (* z c))) (* t (* -4.0 (/ 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 <= -7.6e+20) {
tmp = a * ((-4.0 * t) / c);
} else if (z <= 1.52e-152) {
tmp = b * (1.0 / (z * c));
} else {
tmp = t * (-4.0 * (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 <= (-7.6d+20)) then
tmp = a * (((-4.0d0) * t) / c)
else if (z <= 1.52d-152) then
tmp = b * (1.0d0 / (z * c))
else
tmp = t * ((-4.0d0) * (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 <= -7.6e+20) {
tmp = a * ((-4.0 * t) / c);
} else if (z <= 1.52e-152) {
tmp = b * (1.0 / (z * c));
} else {
tmp = t * (-4.0 * (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 <= -7.6e+20: tmp = a * ((-4.0 * t) / c) elif z <= 1.52e-152: tmp = b * (1.0 / (z * c)) else: tmp = t * (-4.0 * (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 <= -7.6e+20) tmp = Float64(a * Float64(Float64(-4.0 * t) / c)); elseif (z <= 1.52e-152) tmp = Float64(b * Float64(1.0 / Float64(z * c))); else tmp = Float64(t * Float64(-4.0 * 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 <= -7.6e+20)
tmp = a * ((-4.0 * t) / c);
elseif (z <= 1.52e-152)
tmp = b * (1.0 / (z * c));
else
tmp = t * (-4.0 * (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, -7.6e+20], N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.52e-152], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(-4.0 * 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 -7.6 \cdot 10^{+20}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c}\\
\mathbf{elif}\;z \leq 1.52 \cdot 10^{-152}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if z < -7.6e20Initial program 74.1%
Simplified78.2%
Taylor expanded in t around inf 54.2%
*-commutative54.2%
associate-/l*59.8%
associate-*r*59.8%
*-commutative59.8%
*-commutative59.8%
associate-*l/59.8%
Simplified59.8%
if -7.6e20 < z < 1.52000000000000009e-152Initial program 98.8%
Simplified98.8%
Taylor expanded in b around inf 50.8%
*-commutative50.8%
Simplified50.8%
div-inv53.6%
Applied egg-rr53.6%
if 1.52000000000000009e-152 < z Initial program 75.0%
Simplified71.6%
Taylor expanded in t around inf 72.6%
Taylor expanded in x around 0 64.9%
Taylor expanded in a around inf 50.9%
Final simplification54.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 (/ 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 84.2%
Simplified84.2%
Taylor expanded in b around inf 34.6%
*-commutative34.6%
Simplified34.6%
(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 2024133
(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)))