
(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 14 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. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2e-42) (not (<= z 1.6e-115))) (/ (- (- (/ b z) (* -9.0 (* x (/ y z)))) (* a (* t 4.0))) c) (/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z 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 <= -2e-42) || !(z <= 1.6e-115)) {
tmp = (((b / z) - (-9.0 * (x * (y / z)))) - (a * (t * 4.0))) / c;
} else {
tmp = (b + ((y * (x * 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.
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 <= (-2d-42)) .or. (.not. (z <= 1.6d-115))) then
tmp = (((b / z) - ((-9.0d0) * (x * (y / z)))) - (a * (t * 4.0d0))) / c
else
tmp = (b + ((y * (x * 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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2e-42) || !(z <= 1.6e-115)) {
tmp = (((b / z) - (-9.0 * (x * (y / z)))) - (a * (t * 4.0))) / c;
} else {
tmp = (b + ((y * (x * 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]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2e-42) or not (z <= 1.6e-115): tmp = (((b / z) - (-9.0 * (x * (y / z)))) - (a * (t * 4.0))) / c else: tmp = (b + ((y * (x * 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]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2e-42) || !(z <= 1.6e-115)) tmp = Float64(Float64(Float64(Float64(b / z) - Float64(-9.0 * Float64(x * Float64(y / z)))) - Float64(a * Float64(t * 4.0))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2e-42) || ~((z <= 1.6e-115)))
tmp = (((b / z) - (-9.0 * (x * (y / z)))) - (a * (t * 4.0))) / c;
else
tmp = (b + ((y * (x * 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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2e-42], N[Not[LessEqual[z, 1.6e-115]], $MachinePrecision]], N[(N[(N[(N[(b / z), $MachinePrecision] - N[(-9.0 * N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(x * 9.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-42} \lor \neg \left(z \leq 1.6 \cdot 10^{-115}\right):\\
\;\;\;\;\frac{\left(\frac{b}{z} - -9 \cdot \left(x \cdot \frac{y}{z}\right)\right) - a \cdot \left(t \cdot 4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.00000000000000008e-42 or 1.6e-115 < z Initial program 72.8%
associate-+l-72.8%
*-commutative72.8%
associate-*r*74.6%
*-commutative74.6%
associate-+l-74.6%
*-commutative74.6%
associate-*r*72.8%
*-commutative72.8%
associate-*l*72.8%
associate-*l*78.3%
Simplified78.3%
Taylor expanded in x around 0 88.0%
cancel-sign-sub-inv88.0%
metadata-eval88.0%
+-commutative88.0%
*-commutative88.0%
fma-def88.0%
fma-def88.0%
*-commutative88.0%
times-frac88.0%
associate-/r*86.8%
Simplified86.8%
Taylor expanded in c around -inf 93.3%
associate-*r/93.3%
mul-1-neg93.3%
mul-1-neg93.3%
unsub-neg93.3%
*-commutative93.3%
associate-*r/95.1%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in c around -inf 94.0%
associate-*r/94.0%
Simplified95.8%
if -2.00000000000000008e-42 < z < 1.6e-115Initial program 97.4%
Final simplification96.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ b c) z)))
(if (<= t -8.8e+57)
(* a (/ (* t -4.0) c))
(if (<= t -3.8e-43)
t_1
(if (<= t -5e-79)
(* 9.0 (* (/ x z) (/ y c)))
(if (<= t -4.5e-169)
(/ b (* z c))
(if (<= t -4.5e-204)
(* 9.0 (* (/ y z) (/ x c)))
(if (<= t 2e-108) t_1 (/ (* t -4.0) (/ c a))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (t <= -8.8e+57) {
tmp = a * ((t * -4.0) / c);
} else if (t <= -3.8e-43) {
tmp = t_1;
} else if (t <= -5e-79) {
tmp = 9.0 * ((x / z) * (y / c));
} else if (t <= -4.5e-169) {
tmp = b / (z * c);
} else if (t <= -4.5e-204) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (t <= 2e-108) {
tmp = t_1;
} else {
tmp = (t * -4.0) / (c / a);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (b / c) / z
if (t <= (-8.8d+57)) then
tmp = a * ((t * (-4.0d0)) / c)
else if (t <= (-3.8d-43)) then
tmp = t_1
else if (t <= (-5d-79)) then
tmp = 9.0d0 * ((x / z) * (y / c))
else if (t <= (-4.5d-169)) then
tmp = b / (z * c)
else if (t <= (-4.5d-204)) then
tmp = 9.0d0 * ((y / z) * (x / c))
else if (t <= 2d-108) then
tmp = t_1
else
tmp = (t * (-4.0d0)) / (c / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (t <= -8.8e+57) {
tmp = a * ((t * -4.0) / c);
} else if (t <= -3.8e-43) {
tmp = t_1;
} else if (t <= -5e-79) {
tmp = 9.0 * ((x / z) * (y / c));
} else if (t <= -4.5e-169) {
tmp = b / (z * c);
} else if (t <= -4.5e-204) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (t <= 2e-108) {
tmp = t_1;
} else {
tmp = (t * -4.0) / (c / a);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b / c) / z tmp = 0 if t <= -8.8e+57: tmp = a * ((t * -4.0) / c) elif t <= -3.8e-43: tmp = t_1 elif t <= -5e-79: tmp = 9.0 * ((x / z) * (y / c)) elif t <= -4.5e-169: tmp = b / (z * c) elif t <= -4.5e-204: tmp = 9.0 * ((y / z) * (x / c)) elif t <= 2e-108: tmp = t_1 else: tmp = (t * -4.0) / (c / a) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b / c) / z) tmp = 0.0 if (t <= -8.8e+57) tmp = Float64(a * Float64(Float64(t * -4.0) / c)); elseif (t <= -3.8e-43) tmp = t_1; elseif (t <= -5e-79) tmp = Float64(9.0 * Float64(Float64(x / z) * Float64(y / c))); elseif (t <= -4.5e-169) tmp = Float64(b / Float64(z * c)); elseif (t <= -4.5e-204) tmp = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))); elseif (t <= 2e-108) tmp = t_1; else tmp = Float64(Float64(t * -4.0) / Float64(c / a)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b / c) / z;
tmp = 0.0;
if (t <= -8.8e+57)
tmp = a * ((t * -4.0) / c);
elseif (t <= -3.8e-43)
tmp = t_1;
elseif (t <= -5e-79)
tmp = 9.0 * ((x / z) * (y / c));
elseif (t <= -4.5e-169)
tmp = b / (z * c);
elseif (t <= -4.5e-204)
tmp = 9.0 * ((y / z) * (x / c));
elseif (t <= 2e-108)
tmp = t_1;
else
tmp = (t * -4.0) / (c / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t, -8.8e+57], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.8e-43], t$95$1, If[LessEqual[t, -5e-79], N[(9.0 * N[(N[(x / z), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.5e-169], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.5e-204], N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-108], t$95$1, N[(N[(t * -4.0), $MachinePrecision] / N[(c / a), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;t \leq -8.8 \cdot 10^{+57}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-79}:\\
\;\;\;\;9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-169}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-204}:\\
\;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-108}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot -4}{\frac{c}{a}}\\
\end{array}
\end{array}
if t < -8.8000000000000003e57Initial program 76.8%
associate-+l-76.8%
*-commutative76.8%
associate-*r*83.5%
*-commutative83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*76.8%
*-commutative76.8%
associate-*l*76.8%
associate-*l*77.0%
Simplified77.0%
Taylor expanded in x around 0 78.6%
cancel-sign-sub-inv78.6%
metadata-eval78.6%
+-commutative78.6%
*-commutative78.6%
fma-def78.6%
fma-def78.5%
*-commutative78.5%
times-frac79.8%
associate-/r*76.5%
Simplified76.5%
Taylor expanded in c around -inf 80.1%
associate-*r/80.1%
mul-1-neg80.1%
mul-1-neg80.1%
unsub-neg80.1%
*-commutative80.1%
associate-*r/80.0%
associate-*l*80.0%
Simplified80.0%
Taylor expanded in a around inf 56.4%
associate-*r/56.4%
*-commutative56.4%
associate-*r*56.4%
*-commutative56.4%
associate-*l/61.1%
*-commutative61.1%
*-commutative61.1%
Simplified61.1%
if -8.8000000000000003e57 < t < -3.7999999999999997e-43 or -4.49999999999999974e-204 < t < 2.00000000000000008e-108Initial program 91.5%
associate-+l-91.5%
*-commutative91.5%
associate-*r*83.6%
*-commutative83.6%
associate-+l-83.6%
*-commutative83.6%
associate-*r*91.5%
*-commutative91.5%
associate-*l*91.4%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in b around inf 49.7%
associate-/r*51.6%
Simplified51.6%
if -3.7999999999999997e-43 < t < -4.99999999999999999e-79Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*l*100.0%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 64.3%
*-commutative64.3%
times-frac76.0%
Simplified76.0%
if -4.99999999999999999e-79 < t < -4.4999999999999999e-169Initial program 83.2%
associate-+l-83.2%
*-commutative83.2%
associate-*r*83.1%
*-commutative83.1%
associate-+l-83.1%
*-commutative83.1%
associate-*r*83.2%
*-commutative83.2%
associate-*l*83.1%
associate-*l*83.2%
Simplified83.2%
Taylor expanded in b around inf 43.5%
*-commutative43.5%
Simplified43.5%
if -4.4999999999999999e-169 < t < -4.49999999999999974e-204Initial program 84.2%
associate-+l-84.2%
*-commutative84.2%
associate-*r*84.2%
*-commutative84.2%
associate-+l-84.2%
*-commutative84.2%
associate-*r*84.2%
*-commutative84.2%
associate-*l*84.3%
associate-*l*84.3%
Simplified84.3%
Taylor expanded in x around inf 51.7%
times-frac59.3%
Simplified59.3%
if 2.00000000000000008e-108 < t Initial program 75.3%
associate-+l-75.3%
*-commutative75.3%
associate-*r*80.7%
*-commutative80.7%
associate-+l-80.7%
*-commutative80.7%
associate-*r*75.3%
*-commutative75.3%
associate-*l*75.2%
associate-*l*80.8%
Simplified80.8%
Taylor expanded in z around inf 56.4%
*-commutative56.4%
associate-*r/56.4%
associate-*r*56.4%
Simplified56.4%
*-un-lft-identity56.4%
associate-/l*57.4%
*-commutative57.4%
Applied egg-rr57.4%
Final simplification56.4%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ b c) z)) (t_2 (* 9.0 (* y (/ x (* z c))))))
(if (<= a -2.05e-166)
(* -4.0 (* t (/ a c)))
(if (<= a -1.05e-244)
(* b (/ 1.0 (* z c)))
(if (<= a 2.55e-219)
t_2
(if (<= a 5.8e-124)
t_1
(if (<= a 3.5e-38)
t_2
(if (<= a 1.04e+96) t_1 (/ (* t -4.0) (/ c a))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double t_2 = 9.0 * (y * (x / (z * c)));
double tmp;
if (a <= -2.05e-166) {
tmp = -4.0 * (t * (a / c));
} else if (a <= -1.05e-244) {
tmp = b * (1.0 / (z * c));
} else if (a <= 2.55e-219) {
tmp = t_2;
} else if (a <= 5.8e-124) {
tmp = t_1;
} else if (a <= 3.5e-38) {
tmp = t_2;
} else if (a <= 1.04e+96) {
tmp = t_1;
} else {
tmp = (t * -4.0) / (c / a);
}
return tmp;
}
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 = (b / c) / z
t_2 = 9.0d0 * (y * (x / (z * c)))
if (a <= (-2.05d-166)) then
tmp = (-4.0d0) * (t * (a / c))
else if (a <= (-1.05d-244)) then
tmp = b * (1.0d0 / (z * c))
else if (a <= 2.55d-219) then
tmp = t_2
else if (a <= 5.8d-124) then
tmp = t_1
else if (a <= 3.5d-38) then
tmp = t_2
else if (a <= 1.04d+96) then
tmp = t_1
else
tmp = (t * (-4.0d0)) / (c / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double t_2 = 9.0 * (y * (x / (z * c)));
double tmp;
if (a <= -2.05e-166) {
tmp = -4.0 * (t * (a / c));
} else if (a <= -1.05e-244) {
tmp = b * (1.0 / (z * c));
} else if (a <= 2.55e-219) {
tmp = t_2;
} else if (a <= 5.8e-124) {
tmp = t_1;
} else if (a <= 3.5e-38) {
tmp = t_2;
} else if (a <= 1.04e+96) {
tmp = t_1;
} else {
tmp = (t * -4.0) / (c / a);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b / c) / z t_2 = 9.0 * (y * (x / (z * c))) tmp = 0 if a <= -2.05e-166: tmp = -4.0 * (t * (a / c)) elif a <= -1.05e-244: tmp = b * (1.0 / (z * c)) elif a <= 2.55e-219: tmp = t_2 elif a <= 5.8e-124: tmp = t_1 elif a <= 3.5e-38: tmp = t_2 elif a <= 1.04e+96: tmp = t_1 else: tmp = (t * -4.0) / (c / a) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b / c) / z) t_2 = Float64(9.0 * Float64(y * Float64(x / Float64(z * c)))) tmp = 0.0 if (a <= -2.05e-166) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (a <= -1.05e-244) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (a <= 2.55e-219) tmp = t_2; elseif (a <= 5.8e-124) tmp = t_1; elseif (a <= 3.5e-38) tmp = t_2; elseif (a <= 1.04e+96) tmp = t_1; else tmp = Float64(Float64(t * -4.0) / Float64(c / a)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b / c) / z;
t_2 = 9.0 * (y * (x / (z * c)));
tmp = 0.0;
if (a <= -2.05e-166)
tmp = -4.0 * (t * (a / c));
elseif (a <= -1.05e-244)
tmp = b * (1.0 / (z * c));
elseif (a <= 2.55e-219)
tmp = t_2;
elseif (a <= 5.8e-124)
tmp = t_1;
elseif (a <= 3.5e-38)
tmp = t_2;
elseif (a <= 1.04e+96)
tmp = t_1;
else
tmp = (t * -4.0) / (c / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(y * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.05e-166], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.05e-244], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.55e-219], t$95$2, If[LessEqual[a, 5.8e-124], t$95$1, If[LessEqual[a, 3.5e-38], t$95$2, If[LessEqual[a, 1.04e+96], t$95$1, N[(N[(t * -4.0), $MachinePrecision] / N[(c / a), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
t_2 := 9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\
\mathbf{if}\;a \leq -2.05 \cdot 10^{-166}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;a \leq -1.05 \cdot 10^{-244}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;a \leq 2.55 \cdot 10^{-219}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-124}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{-38}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 1.04 \cdot 10^{+96}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot -4}{\frac{c}{a}}\\
\end{array}
\end{array}
if a < -2.0499999999999999e-166Initial program 84.0%
associate-+l-84.0%
*-commutative84.0%
associate-*r*83.0%
*-commutative83.0%
associate-+l-83.0%
*-commutative83.0%
associate-*r*84.0%
*-commutative84.0%
associate-*l*84.0%
associate-*l*84.0%
Simplified84.0%
*-un-lft-identity84.0%
times-frac80.2%
associate-*r*81.2%
cancel-sign-sub-inv81.2%
fma-def81.2%
distribute-lft-neg-in81.2%
*-commutative81.2%
distribute-rgt-neg-in81.2%
*-commutative81.2%
distribute-rgt-neg-in81.2%
distribute-rgt-neg-in81.2%
metadata-eval81.2%
Applied egg-rr81.2%
Taylor expanded in z around inf 50.6%
associate-*l/57.8%
Simplified57.8%
if -2.0499999999999999e-166 < a < -1.05000000000000001e-244Initial program 87.1%
associate-+l-87.1%
*-commutative87.1%
associate-*r*99.8%
*-commutative99.8%
associate-+l-99.8%
*-commutative99.8%
associate-*r*87.1%
*-commutative87.1%
associate-*l*87.1%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in b around inf 66.2%
*-commutative66.2%
Simplified66.2%
div-inv66.2%
Applied egg-rr66.2%
if -1.05000000000000001e-244 < a < 2.5499999999999999e-219 or 5.8000000000000004e-124 < a < 3.5000000000000001e-38Initial program 80.6%
associate-+l-80.6%
*-commutative80.6%
associate-*r*85.5%
*-commutative85.5%
associate-+l-85.5%
*-commutative85.5%
associate-*r*80.6%
*-commutative80.6%
associate-*l*80.6%
associate-*l*85.5%
Simplified85.5%
Taylor expanded in x around inf 43.4%
associate-/l*48.2%
*-commutative48.2%
associate-/r/49.6%
Simplified49.6%
if 2.5499999999999999e-219 < a < 5.8000000000000004e-124 or 3.5000000000000001e-38 < a < 1.03999999999999996e96Initial program 82.0%
associate-+l-82.0%
*-commutative82.0%
associate-*r*87.8%
*-commutative87.8%
associate-+l-87.8%
*-commutative87.8%
associate-*r*82.0%
*-commutative82.0%
associate-*l*82.0%
associate-*l*87.8%
Simplified87.8%
Taylor expanded in b around inf 53.5%
associate-/r*56.0%
Simplified56.0%
if 1.03999999999999996e96 < a Initial program 77.0%
associate-+l-77.0%
*-commutative77.0%
associate-*r*66.8%
*-commutative66.8%
associate-+l-66.8%
*-commutative66.8%
associate-*r*77.0%
*-commutative77.0%
associate-*l*77.0%
associate-*l*69.3%
Simplified69.3%
Taylor expanded in z around inf 60.8%
*-commutative60.8%
associate-*r/60.8%
associate-*r*60.8%
Simplified60.8%
*-un-lft-identity60.8%
associate-/l*70.5%
*-commutative70.5%
Applied egg-rr70.5%
Final simplification57.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ b c) z)))
(if (<= a -2.15e-166)
(* -4.0 (* t (/ a c)))
(if (<= a -1.15e-242)
(* b (/ 1.0 (* z c)))
(if (<= a 2e-219)
(* 9.0 (* y (/ x (* z c))))
(if (<= a 6e-124)
t_1
(if (<= a 7.5e-37)
(/ (* 9.0 (* y (/ x c))) z)
(if (<= a 9.2e+95) t_1 (/ (* t -4.0) (/ c a))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (a <= -2.15e-166) {
tmp = -4.0 * (t * (a / c));
} else if (a <= -1.15e-242) {
tmp = b * (1.0 / (z * c));
} else if (a <= 2e-219) {
tmp = 9.0 * (y * (x / (z * c)));
} else if (a <= 6e-124) {
tmp = t_1;
} else if (a <= 7.5e-37) {
tmp = (9.0 * (y * (x / c))) / z;
} else if (a <= 9.2e+95) {
tmp = t_1;
} else {
tmp = (t * -4.0) / (c / a);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (b / c) / z
if (a <= (-2.15d-166)) then
tmp = (-4.0d0) * (t * (a / c))
else if (a <= (-1.15d-242)) then
tmp = b * (1.0d0 / (z * c))
else if (a <= 2d-219) then
tmp = 9.0d0 * (y * (x / (z * c)))
else if (a <= 6d-124) then
tmp = t_1
else if (a <= 7.5d-37) then
tmp = (9.0d0 * (y * (x / c))) / z
else if (a <= 9.2d+95) then
tmp = t_1
else
tmp = (t * (-4.0d0)) / (c / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (a <= -2.15e-166) {
tmp = -4.0 * (t * (a / c));
} else if (a <= -1.15e-242) {
tmp = b * (1.0 / (z * c));
} else if (a <= 2e-219) {
tmp = 9.0 * (y * (x / (z * c)));
} else if (a <= 6e-124) {
tmp = t_1;
} else if (a <= 7.5e-37) {
tmp = (9.0 * (y * (x / c))) / z;
} else if (a <= 9.2e+95) {
tmp = t_1;
} else {
tmp = (t * -4.0) / (c / a);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = (b / c) / z tmp = 0 if a <= -2.15e-166: tmp = -4.0 * (t * (a / c)) elif a <= -1.15e-242: tmp = b * (1.0 / (z * c)) elif a <= 2e-219: tmp = 9.0 * (y * (x / (z * c))) elif a <= 6e-124: tmp = t_1 elif a <= 7.5e-37: tmp = (9.0 * (y * (x / c))) / z elif a <= 9.2e+95: tmp = t_1 else: tmp = (t * -4.0) / (c / a) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b / c) / z) tmp = 0.0 if (a <= -2.15e-166) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (a <= -1.15e-242) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (a <= 2e-219) tmp = Float64(9.0 * Float64(y * Float64(x / Float64(z * c)))); elseif (a <= 6e-124) tmp = t_1; elseif (a <= 7.5e-37) tmp = Float64(Float64(9.0 * Float64(y * Float64(x / c))) / z); elseif (a <= 9.2e+95) tmp = t_1; else tmp = Float64(Float64(t * -4.0) / Float64(c / a)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b / c) / z;
tmp = 0.0;
if (a <= -2.15e-166)
tmp = -4.0 * (t * (a / c));
elseif (a <= -1.15e-242)
tmp = b * (1.0 / (z * c));
elseif (a <= 2e-219)
tmp = 9.0 * (y * (x / (z * c)));
elseif (a <= 6e-124)
tmp = t_1;
elseif (a <= 7.5e-37)
tmp = (9.0 * (y * (x / c))) / z;
elseif (a <= 9.2e+95)
tmp = t_1;
else
tmp = (t * -4.0) / (c / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[a, -2.15e-166], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.15e-242], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e-219], N[(9.0 * N[(y * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e-124], t$95$1, If[LessEqual[a, 7.5e-37], N[(N[(9.0 * N[(y * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 9.2e+95], t$95$1, N[(N[(t * -4.0), $MachinePrecision] / N[(c / a), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;a \leq -2.15 \cdot 10^{-166}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;a \leq -1.15 \cdot 10^{-242}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-219}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\
\mathbf{elif}\;a \leq 6 \cdot 10^{-124}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-37}:\\
\;\;\;\;\frac{9 \cdot \left(y \cdot \frac{x}{c}\right)}{z}\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{+95}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot -4}{\frac{c}{a}}\\
\end{array}
\end{array}
if a < -2.15e-166Initial program 84.0%
associate-+l-84.0%
*-commutative84.0%
associate-*r*83.0%
*-commutative83.0%
associate-+l-83.0%
*-commutative83.0%
associate-*r*84.0%
*-commutative84.0%
associate-*l*84.0%
associate-*l*84.0%
Simplified84.0%
*-un-lft-identity84.0%
times-frac80.2%
associate-*r*81.2%
cancel-sign-sub-inv81.2%
fma-def81.2%
distribute-lft-neg-in81.2%
*-commutative81.2%
distribute-rgt-neg-in81.2%
*-commutative81.2%
distribute-rgt-neg-in81.2%
distribute-rgt-neg-in81.2%
metadata-eval81.2%
Applied egg-rr81.2%
Taylor expanded in z around inf 50.6%
associate-*l/57.8%
Simplified57.8%
if -2.15e-166 < a < -1.14999999999999992e-242Initial program 85.1%
associate-+l-85.1%
*-commutative85.1%
associate-*r*99.8%
*-commutative99.8%
associate-+l-99.8%
*-commutative99.8%
associate-*r*85.1%
*-commutative85.1%
associate-*l*85.1%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in b around inf 68.4%
*-commutative68.4%
Simplified68.4%
div-inv68.4%
Applied egg-rr68.4%
if -1.14999999999999992e-242 < a < 2.0000000000000001e-219Initial program 89.2%
associate-+l-89.2%
*-commutative89.2%
associate-*r*94.7%
*-commutative94.7%
associate-+l-94.7%
*-commutative94.7%
associate-*r*89.2%
*-commutative89.2%
associate-*l*89.2%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in x around inf 47.4%
associate-/l*50.1%
*-commutative50.1%
associate-/r/50.1%
Simplified50.1%
if 2.0000000000000001e-219 < a < 6e-124 or 7.5000000000000004e-37 < a < 9.19999999999999989e95Initial program 82.0%
associate-+l-82.0%
*-commutative82.0%
associate-*r*87.8%
*-commutative87.8%
associate-+l-87.8%
*-commutative87.8%
associate-*r*82.0%
*-commutative82.0%
associate-*l*82.0%
associate-*l*87.8%
Simplified87.8%
Taylor expanded in b around inf 53.5%
associate-/r*56.0%
Simplified56.0%
if 6e-124 < a < 7.5000000000000004e-37Initial program 69.5%
associate-+l-69.5%
*-commutative69.5%
associate-*r*73.1%
*-commutative73.1%
associate-+l-73.1%
*-commutative73.1%
associate-*r*69.5%
*-commutative69.5%
associate-*l*69.5%
associate-*l*73.1%
Simplified73.1%
Taylor expanded in x around inf 34.3%
times-frac38.3%
Simplified38.3%
associate-*r/45.4%
Applied egg-rr45.4%
associate-*r/45.4%
*-commutative45.4%
Applied egg-rr45.4%
if 9.19999999999999989e95 < a Initial program 77.0%
associate-+l-77.0%
*-commutative77.0%
associate-*r*66.8%
*-commutative66.8%
associate-+l-66.8%
*-commutative66.8%
associate-*r*77.0%
*-commutative77.0%
associate-*l*77.0%
associate-*l*69.3%
Simplified69.3%
Taylor expanded in z around inf 60.8%
*-commutative60.8%
associate-*r/60.8%
associate-*r*60.8%
Simplified60.8%
*-un-lft-identity60.8%
associate-/l*70.5%
*-commutative70.5%
Applied egg-rr70.5%
Final simplification57.5%
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 (/ (* t -4.0) c))) (t_2 (* 9.0 (* (/ y z) (/ x c)))))
(if (<= z -9.8e-29)
t_1
(if (<= z -6.5e-55)
(/ (/ b c) z)
(if (<= z -2.75e-108)
t_2
(if (<= z 6e-133) (/ b (* z c)) (if (<= z 1.7e-28) t_2 t_1)))))))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 * ((t * -4.0) / c);
double t_2 = 9.0 * ((y / z) * (x / c));
double tmp;
if (z <= -9.8e-29) {
tmp = t_1;
} else if (z <= -6.5e-55) {
tmp = (b / c) / z;
} else if (z <= -2.75e-108) {
tmp = t_2;
} else if (z <= 6e-133) {
tmp = b / (z * c);
} else if (z <= 1.7e-28) {
tmp = t_2;
} 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.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * ((t * (-4.0d0)) / c)
t_2 = 9.0d0 * ((y / z) * (x / c))
if (z <= (-9.8d-29)) then
tmp = t_1
else if (z <= (-6.5d-55)) then
tmp = (b / c) / z
else if (z <= (-2.75d-108)) then
tmp = t_2
else if (z <= 6d-133) then
tmp = b / (z * c)
else if (z <= 1.7d-28) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
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 * ((t * -4.0) / c);
double t_2 = 9.0 * ((y / z) * (x / c));
double tmp;
if (z <= -9.8e-29) {
tmp = t_1;
} else if (z <= -6.5e-55) {
tmp = (b / c) / z;
} else if (z <= -2.75e-108) {
tmp = t_2;
} else if (z <= 6e-133) {
tmp = b / (z * c);
} else if (z <= 1.7e-28) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[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 * ((t * -4.0) / c) t_2 = 9.0 * ((y / z) * (x / c)) tmp = 0 if z <= -9.8e-29: tmp = t_1 elif z <= -6.5e-55: tmp = (b / c) / z elif z <= -2.75e-108: tmp = t_2 elif z <= 6e-133: tmp = b / (z * c) elif z <= 1.7e-28: tmp = t_2 else: tmp = t_1 return tmp
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(t * -4.0) / c)) t_2 = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))) tmp = 0.0 if (z <= -9.8e-29) tmp = t_1; elseif (z <= -6.5e-55) tmp = Float64(Float64(b / c) / z); elseif (z <= -2.75e-108) tmp = t_2; elseif (z <= 6e-133) tmp = Float64(b / Float64(z * c)); elseif (z <= 1.7e-28) tmp = t_2; else tmp = t_1; end return tmp end
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 * ((t * -4.0) / c);
t_2 = 9.0 * ((y / z) * (x / c));
tmp = 0.0;
if (z <= -9.8e-29)
tmp = t_1;
elseif (z <= -6.5e-55)
tmp = (b / c) / z;
elseif (z <= -2.75e-108)
tmp = t_2;
elseif (z <= 6e-133)
tmp = b / (z * c);
elseif (z <= 1.7e-28)
tmp = t_2;
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.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.8e-29], t$95$1, If[LessEqual[z, -6.5e-55], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -2.75e-108], t$95$2, If[LessEqual[z, 6e-133], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e-28], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := a \cdot \frac{t \cdot -4}{c}\\
t_2 := 9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
\mathbf{if}\;z \leq -9.8 \cdot 10^{-29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-55}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;z \leq -2.75 \cdot 10^{-108}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-133}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-28}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -9.7999999999999997e-29 or 1.7e-28 < z Initial program 70.3%
associate-+l-70.3%
*-commutative70.3%
associate-*r*72.3%
*-commutative72.3%
associate-+l-72.3%
*-commutative72.3%
associate-*r*70.3%
*-commutative70.3%
associate-*l*70.3%
associate-*l*76.4%
Simplified76.4%
Taylor expanded in x around 0 87.9%
cancel-sign-sub-inv87.9%
metadata-eval87.9%
+-commutative87.9%
*-commutative87.9%
fma-def87.9%
fma-def87.9%
*-commutative87.9%
times-frac88.0%
associate-/r*86.6%
Simplified86.6%
Taylor expanded in c around -inf 93.2%
associate-*r/93.2%
mul-1-neg93.2%
mul-1-neg93.2%
unsub-neg93.2%
*-commutative93.2%
associate-*r/95.2%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in a around inf 60.7%
associate-*r/60.7%
*-commutative60.7%
associate-*r*60.7%
*-commutative60.7%
associate-*l/58.7%
*-commutative58.7%
*-commutative58.7%
Simplified58.7%
if -9.7999999999999997e-29 < z < -6.50000000000000006e-55Initial program 99.4%
associate-+l-99.4%
*-commutative99.4%
associate-*r*99.4%
*-commutative99.4%
associate-+l-99.4%
*-commutative99.4%
associate-*r*99.4%
*-commutative99.4%
associate-*l*99.4%
associate-*l*99.4%
Simplified99.4%
Taylor expanded in b around inf 99.4%
associate-/r*100.0%
Simplified100.0%
if -6.50000000000000006e-55 < z < -2.75000000000000016e-108 or 6.00000000000000038e-133 < z < 1.7e-28Initial program 93.1%
associate-+l-93.1%
*-commutative93.1%
associate-*r*93.2%
*-commutative93.2%
associate-+l-93.2%
*-commutative93.2%
associate-*r*93.1%
*-commutative93.1%
associate-*l*93.1%
associate-*l*89.7%
Simplified89.7%
Taylor expanded in x around inf 65.6%
times-frac62.1%
Simplified62.1%
if -2.75000000000000016e-108 < z < 6.00000000000000038e-133Initial program 98.2%
associate-+l-98.2%
*-commutative98.2%
associate-*r*98.2%
*-commutative98.2%
associate-+l-98.2%
*-commutative98.2%
associate-*r*98.2%
*-commutative98.2%
associate-*l*98.2%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in b around inf 66.4%
*-commutative66.4%
Simplified66.4%
Final simplification62.2%
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 -4e+67) (not (<= z 3.1e+103))) (/ (- (/ b z) (* t (* a 4.0))) c) (/ (+ b (- (* x (* y 9.0)) (* (* z 4.0) (* a t)))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -4e+67) || !(z <= 3.1e+103)) {
tmp = ((b / z) - (t * (a * 4.0))) / c;
} else {
tmp = (b + ((x * (y * 9.0)) - ((z * 4.0) * (a * t)))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-4d+67)) .or. (.not. (z <= 3.1d+103))) then
tmp = ((b / z) - (t * (a * 4.0d0))) / c
else
tmp = (b + ((x * (y * 9.0d0)) - ((z * 4.0d0) * (a * t)))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -4e+67) || !(z <= 3.1e+103)) {
tmp = ((b / z) - (t * (a * 4.0))) / c;
} else {
tmp = (b + ((x * (y * 9.0)) - ((z * 4.0) * (a * t)))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -4e+67) or not (z <= 3.1e+103): tmp = ((b / z) - (t * (a * 4.0))) / c else: tmp = (b + ((x * (y * 9.0)) - ((z * 4.0) * (a * t)))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -4e+67) || !(z <= 3.1e+103)) tmp = Float64(Float64(Float64(b / z) - Float64(t * Float64(a * 4.0))) / c); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(y * 9.0)) - Float64(Float64(z * 4.0) * Float64(a * t)))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -4e+67) || ~((z <= 3.1e+103)))
tmp = ((b / z) - (t * (a * 4.0))) / c;
else
tmp = (b + ((x * (y * 9.0)) - ((z * 4.0) * (a * t)))) / (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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -4e+67], N[Not[LessEqual[z, 3.1e+103]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+67} \lor \neg \left(z \leq 3.1 \cdot 10^{+103}\right):\\
\;\;\;\;\frac{\frac{b}{z} - t \cdot \left(a \cdot 4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(y \cdot 9\right) - \left(z \cdot 4\right) \cdot \left(a \cdot t\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -3.99999999999999993e67 or 3.1000000000000002e103 < z Initial program 53.9%
associate-+l-53.9%
*-commutative53.9%
associate-*r*57.5%
*-commutative57.5%
associate-+l-57.5%
*-commutative57.5%
associate-*r*53.9%
*-commutative53.9%
associate-*l*53.9%
associate-*l*64.8%
Simplified64.8%
Taylor expanded in x around 0 89.3%
cancel-sign-sub-inv89.3%
metadata-eval89.3%
+-commutative89.3%
*-commutative89.3%
fma-def89.3%
fma-def89.3%
*-commutative89.3%
times-frac90.2%
associate-/r*89.0%
Simplified89.0%
Taylor expanded in c around -inf 93.9%
associate-*r/93.9%
mul-1-neg93.9%
mul-1-neg93.9%
unsub-neg93.9%
*-commutative93.9%
associate-*r/96.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in c around -inf 93.9%
associate-*r/93.9%
Simplified96.3%
Taylor expanded in x around 0 87.8%
associate-*r*87.8%
Simplified87.8%
if -3.99999999999999993e67 < z < 3.1000000000000002e103Initial program 94.7%
associate-+l-94.7%
*-commutative94.7%
associate-*r*94.7%
*-commutative94.7%
associate-+l-94.7%
*-commutative94.7%
associate-*r*94.7%
*-commutative94.7%
associate-*l*94.7%
associate-*l*92.6%
Simplified92.6%
Final simplification91.1%
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.22e+67) (not (<= z 2.95e+100))) (/ (- (/ b z) (* t (* a 4.0))) c) (/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z 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.22e+67) || !(z <= 2.95e+100)) {
tmp = ((b / z) - (t * (a * 4.0))) / c;
} else {
tmp = (b + ((y * (x * 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.
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.22d+67)) .or. (.not. (z <= 2.95d+100))) then
tmp = ((b / z) - (t * (a * 4.0d0))) / c
else
tmp = (b + ((y * (x * 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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.22e+67) || !(z <= 2.95e+100)) {
tmp = ((b / z) - (t * (a * 4.0))) / c;
} else {
tmp = (b + ((y * (x * 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]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.22e+67) or not (z <= 2.95e+100): tmp = ((b / z) - (t * (a * 4.0))) / c else: tmp = (b + ((y * (x * 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]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.22e+67) || !(z <= 2.95e+100)) tmp = Float64(Float64(Float64(b / z) - Float64(t * Float64(a * 4.0))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.22e+67) || ~((z <= 2.95e+100)))
tmp = ((b / z) - (t * (a * 4.0))) / c;
else
tmp = (b + ((y * (x * 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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.22e+67], N[Not[LessEqual[z, 2.95e+100]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(x * 9.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{+67} \lor \neg \left(z \leq 2.95 \cdot 10^{+100}\right):\\
\;\;\;\;\frac{\frac{b}{z} - t \cdot \left(a \cdot 4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.22000000000000004e67 or 2.95000000000000013e100 < z Initial program 53.9%
associate-+l-53.9%
*-commutative53.9%
associate-*r*57.5%
*-commutative57.5%
associate-+l-57.5%
*-commutative57.5%
associate-*r*53.9%
*-commutative53.9%
associate-*l*53.9%
associate-*l*64.8%
Simplified64.8%
Taylor expanded in x around 0 89.3%
cancel-sign-sub-inv89.3%
metadata-eval89.3%
+-commutative89.3%
*-commutative89.3%
fma-def89.3%
fma-def89.3%
*-commutative89.3%
times-frac90.2%
associate-/r*89.0%
Simplified89.0%
Taylor expanded in c around -inf 93.9%
associate-*r/93.9%
mul-1-neg93.9%
mul-1-neg93.9%
unsub-neg93.9%
*-commutative93.9%
associate-*r/96.3%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in c around -inf 93.9%
associate-*r/93.9%
Simplified96.3%
Taylor expanded in x around 0 87.8%
associate-*r*87.8%
Simplified87.8%
if -1.22000000000000004e67 < z < 2.95000000000000013e100Initial program 94.7%
Final simplification92.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.5e+147) (not (<= z 2.05e+62))) (/ (* a (* t -4.0)) c) (/ (+ b (* 9.0 (* x y))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.5e+147) || !(z <= 2.05e+62)) {
tmp = (a * (t * -4.0)) / 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.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-1.5d+147)) .or. (.not. (z <= 2.05d+62))) then
tmp = (a * (t * (-4.0d0))) / 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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.5e+147) || !(z <= 2.05e+62)) {
tmp = (a * (t * -4.0)) / 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]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.5e+147) or not (z <= 2.05e+62): tmp = (a * (t * -4.0)) / 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]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.5e+147) || !(z <= 2.05e+62)) tmp = Float64(Float64(a * Float64(t * -4.0)) / 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.5e+147) || ~((z <= 2.05e+62)))
tmp = (a * (t * -4.0)) / 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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.5e+147], N[Not[LessEqual[z, 2.05e+62]], $MachinePrecision]], N[(N[(a * N[(t * -4.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+147} \lor \neg \left(z \leq 2.05 \cdot 10^{+62}\right):\\
\;\;\;\;\frac{a \cdot \left(t \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.49999999999999997e147 or 2.04999999999999992e62 < z Initial program 56.7%
associate-+l-56.7%
*-commutative56.7%
associate-*r*61.9%
*-commutative61.9%
associate-+l-61.9%
*-commutative61.9%
associate-*r*56.7%
*-commutative56.7%
associate-*l*56.7%
associate-*l*68.5%
Simplified68.5%
Taylor expanded in z around inf 79.2%
*-commutative79.2%
associate-*r/79.2%
associate-*r*79.2%
Simplified79.2%
if -1.49999999999999997e147 < z < 2.04999999999999992e62Initial program 92.2%
associate-+l-92.2%
*-commutative92.2%
associate-*r*91.7%
*-commutative91.7%
associate-+l-91.7%
*-commutative91.7%
associate-*r*92.2%
*-commutative92.2%
associate-*l*92.2%
associate-*l*90.1%
Simplified90.1%
Taylor expanded in z around 0 74.4%
*-commutative74.4%
Simplified74.4%
Final simplification75.8%
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.45e-49) (not (<= z 3.5e-27))) (/ (- (/ b z) (* t (* a 4.0))) c) (/ (+ b (* 9.0 (* x y))) (* z 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.45e-49) || !(z <= 3.5e-27)) {
tmp = ((b / z) - (t * (a * 4.0))) / 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.
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.45d-49)) .or. (.not. (z <= 3.5d-27))) then
tmp = ((b / z) - (t * (a * 4.0d0))) / 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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.45e-49) || !(z <= 3.5e-27)) {
tmp = ((b / z) - (t * (a * 4.0))) / 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]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.45e-49) or not (z <= 3.5e-27): tmp = ((b / z) - (t * (a * 4.0))) / 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]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.45e-49) || !(z <= 3.5e-27)) tmp = Float64(Float64(Float64(b / z) - Float64(t * Float64(a * 4.0))) / 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.45e-49) || ~((z <= 3.5e-27)))
tmp = ((b / z) - (t * (a * 4.0))) / 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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.45e-49], N[Not[LessEqual[z, 3.5e-27]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] - N[(t * N[(a * 4.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{-49} \lor \neg \left(z \leq 3.5 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{\frac{b}{z} - t \cdot \left(a \cdot 4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.45e-49 or 3.5000000000000001e-27 < z Initial program 70.9%
associate-+l-70.9%
*-commutative70.9%
associate-*r*72.8%
*-commutative72.8%
associate-+l-72.8%
*-commutative72.8%
associate-*r*70.9%
*-commutative70.9%
associate-*l*70.9%
associate-*l*76.8%
Simplified76.8%
Taylor expanded in x around 0 88.1%
cancel-sign-sub-inv88.1%
metadata-eval88.1%
+-commutative88.1%
*-commutative88.1%
fma-def88.1%
fma-def88.1%
*-commutative88.1%
times-frac87.6%
associate-/r*86.2%
Simplified86.2%
Taylor expanded in c around -inf 93.3%
associate-*r/93.3%
mul-1-neg93.3%
mul-1-neg93.3%
unsub-neg93.3%
*-commutative93.3%
associate-*r/95.3%
associate-*l*95.2%
Simplified95.2%
Taylor expanded in c around -inf 94.0%
associate-*r/94.0%
Simplified95.9%
Taylor expanded in x around 0 80.2%
associate-*r*80.2%
Simplified80.2%
if -1.45e-49 < z < 3.5000000000000001e-27Initial program 96.9%
associate-+l-96.9%
*-commutative96.9%
associate-*r*96.9%
*-commutative96.9%
associate-+l-96.9%
*-commutative96.9%
associate-*r*96.9%
*-commutative96.9%
associate-*l*96.9%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in z around 0 87.1%
*-commutative87.1%
Simplified87.1%
Final simplification83.1%
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 -6e-27) (not (<= z 6.2e-133))) (* -4.0 (* t (/ a c))) (/ b (* z 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-27) || !(z <= 6.2e-133)) {
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.
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-27)) .or. (.not. (z <= 6.2d-133))) 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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -6e-27) || !(z <= 6.2e-133)) {
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]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -6e-27) or not (z <= 6.2e-133): 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]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -6e-27) || !(z <= 6.2e-133)) 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -6e-27) || ~((z <= 6.2e-133)))
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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -6e-27], N[Not[LessEqual[z, 6.2e-133]], $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-27} \lor \neg \left(z \leq 6.2 \cdot 10^{-133}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -6.0000000000000002e-27 or 6.20000000000000032e-133 < z Initial program 73.0%
associate-+l-73.0%
*-commutative73.0%
associate-*r*74.8%
*-commutative74.8%
associate-+l-74.8%
*-commutative74.8%
associate-*r*73.0%
*-commutative73.0%
associate-*l*73.0%
associate-*l*77.8%
Simplified77.8%
*-un-lft-identity77.8%
times-frac77.5%
associate-*r*74.5%
cancel-sign-sub-inv74.5%
fma-def74.5%
distribute-lft-neg-in74.5%
*-commutative74.5%
distribute-rgt-neg-in74.5%
*-commutative74.5%
distribute-rgt-neg-in74.5%
distribute-rgt-neg-in74.5%
metadata-eval74.5%
Applied egg-rr74.5%
Taylor expanded in z around inf 57.3%
associate-*l/59.1%
Simplified59.1%
if -6.0000000000000002e-27 < z < 6.20000000000000032e-133Initial program 97.4%
associate-+l-97.4%
*-commutative97.4%
associate-*r*97.4%
*-commutative97.4%
associate-+l-97.4%
*-commutative97.4%
associate-*r*97.4%
*-commutative97.4%
associate-*l*97.4%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in b around inf 62.3%
*-commutative62.3%
Simplified62.3%
Final simplification60.3%
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.1e-26) (not (<= z 6.2e-133))) (* a (/ (* t -4.0) c)) (/ b (* z 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.1e-26) || !(z <= 6.2e-133)) {
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.
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.1d-26)) .or. (.not. (z <= 6.2d-133))) 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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.1e-26) || !(z <= 6.2e-133)) {
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]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.1e-26) or not (z <= 6.2e-133): 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]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.1e-26) || !(z <= 6.2e-133)) tmp = Float64(a * Float64(Float64(t * -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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.1e-26) || ~((z <= 6.2e-133)))
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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.1e-26], N[Not[LessEqual[z, 6.2e-133]], $MachinePrecision]], N[(a * N[(N[(t * -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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-26} \lor \neg \left(z \leq 6.2 \cdot 10^{-133}\right):\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.1e-26 or 6.20000000000000032e-133 < z Initial program 73.0%
associate-+l-73.0%
*-commutative73.0%
associate-*r*74.8%
*-commutative74.8%
associate-+l-74.8%
*-commutative74.8%
associate-*r*73.0%
*-commutative73.0%
associate-*l*73.0%
associate-*l*77.8%
Simplified77.8%
Taylor expanded in x around 0 87.5%
cancel-sign-sub-inv87.5%
metadata-eval87.5%
+-commutative87.5%
*-commutative87.5%
fma-def87.5%
fma-def87.5%
*-commutative87.5%
times-frac88.1%
associate-/r*86.9%
Simplified86.9%
Taylor expanded in c around -inf 92.8%
associate-*r/92.8%
mul-1-neg92.8%
mul-1-neg92.8%
unsub-neg92.8%
*-commutative92.8%
associate-*r/94.6%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in a around inf 57.3%
associate-*r/57.3%
*-commutative57.3%
associate-*r*57.3%
*-commutative57.3%
associate-*l/56.7%
*-commutative56.7%
*-commutative56.7%
Simplified56.7%
if -1.1e-26 < z < 6.20000000000000032e-133Initial program 97.4%
associate-+l-97.4%
*-commutative97.4%
associate-*r*97.4%
*-commutative97.4%
associate-+l-97.4%
*-commutative97.4%
associate-*r*97.4%
*-commutative97.4%
associate-*l*97.4%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in b around inf 62.3%
*-commutative62.3%
Simplified62.3%
Final simplification58.7%
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.5e-27) (not (<= z 2.2e-22))) (* a (/ (* t -4.0) c)) (* b (/ 1.0 (* z 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.5e-27) || !(z <= 2.2e-22)) {
tmp = a * ((t * -4.0) / 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.
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.5d-27)) .or. (.not. (z <= 2.2d-22))) then
tmp = a * ((t * (-4.0d0)) / 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;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -7.5e-27) || !(z <= 2.2e-22)) {
tmp = a * ((t * -4.0) / 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]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -7.5e-27) or not (z <= 2.2e-22): tmp = a * ((t * -4.0) / 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]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -7.5e-27) || !(z <= 2.2e-22)) tmp = Float64(a * Float64(Float64(t * -4.0) / 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -7.5e-27) || ~((z <= 2.2e-22)))
tmp = a * ((t * -4.0) / 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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -7.5e-27], N[Not[LessEqual[z, 2.2e-22]], $MachinePrecision]], N[(a * N[(N[(t * -4.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-27} \lor \neg \left(z \leq 2.2 \cdot 10^{-22}\right):\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\end{array}
\end{array}
if z < -7.50000000000000029e-27 or 2.2000000000000001e-22 < z Initial program 69.7%
associate-+l-69.7%
*-commutative69.7%
associate-*r*71.7%
*-commutative71.7%
associate-+l-71.7%
*-commutative71.7%
associate-*r*69.7%
*-commutative69.7%
associate-*l*69.7%
associate-*l*75.9%
Simplified75.9%
Taylor expanded in x around 0 87.7%
cancel-sign-sub-inv87.7%
metadata-eval87.7%
+-commutative87.7%
*-commutative87.7%
fma-def87.7%
fma-def87.7%
*-commutative87.7%
times-frac88.4%
associate-/r*87.0%
Simplified87.0%
Taylor expanded in c around -inf 93.0%
associate-*r/93.0%
mul-1-neg93.0%
mul-1-neg93.0%
unsub-neg93.0%
*-commutative93.0%
associate-*r/95.1%
associate-*l*95.0%
Simplified95.0%
Taylor expanded in a around inf 61.3%
associate-*r/61.3%
*-commutative61.3%
associate-*r*61.3%
*-commutative61.3%
associate-*l/59.2%
*-commutative59.2%
*-commutative59.2%
Simplified59.2%
if -7.50000000000000029e-27 < z < 2.2000000000000001e-22Initial program 97.0%
associate-+l-97.0%
*-commutative97.0%
associate-*r*97.1%
*-commutative97.1%
associate-+l-97.1%
*-commutative97.1%
associate-*r*97.0%
*-commutative97.0%
associate-*l*97.0%
associate-*l*93.7%
Simplified93.7%
Taylor expanded in b around inf 57.4%
*-commutative57.4%
Simplified57.4%
div-inv57.8%
Applied egg-rr57.8%
Final simplification58.6%
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);
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.
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;
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]) 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]) 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])){:}
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. 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])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 82.0%
associate-+l-82.0%
*-commutative82.0%
associate-*r*83.1%
*-commutative83.1%
associate-+l-83.1%
*-commutative83.1%
associate-*r*82.0%
*-commutative82.0%
associate-*l*82.0%
associate-*l*83.9%
Simplified83.9%
Taylor expanded in b around inf 39.2%
*-commutative39.2%
Simplified39.2%
Final simplification39.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ (/ b c) z))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return (b / c) / z;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (b / c) / z
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (b / c) / z;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return (b / c) / z
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(Float64(b / c) / z) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = (b / c) / z;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{\frac{b}{c}}{z}
\end{array}
Initial program 82.0%
associate-+l-82.0%
*-commutative82.0%
associate-*r*83.1%
*-commutative83.1%
associate-+l-83.1%
*-commutative83.1%
associate-*r*82.0%
*-commutative82.0%
associate-*l*82.0%
associate-*l*83.9%
Simplified83.9%
Taylor expanded in b around inf 39.2%
associate-/r*39.7%
Simplified39.7%
Final simplification39.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t_4}{z \cdot c}\\
t_6 := \frac{\left(t_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 < 0:\\
\;\;\;\;\frac{\frac{t_4}{z}}{c}\\
\mathbf{elif}\;t_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t_1\right) - t_2\\
\mathbf{elif}\;t_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t_1\right) - t_2\\
\end{array}
\end{array}
herbie shell --seed 2024011
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:herbie-target
(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)))