
(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 21 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}
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c_m))))
(*
c_s
(if (<= t_1 -2e-234)
t_1
(if (<= t_1 0.0)
(/
(+
(* -4.0 (/ (* a (* z t)) c_m))
(+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)))
z)
(if (<= t_1 INFINITY)
(/ (+ b (fma x (* 9.0 y) (* t (* a (* z -4.0))))) (* z c_m))
(- (* -4.0 (* t (/ a c_m))) (* -9.0 (* x (/ (/ y c_m) z))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -2e-234) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b + fma(x, (9.0 * y), (t * (a * (z * -4.0))))) / (z * c_m);
} else {
tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z)));
}
return c_s * tmp;
}
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m)) tmp = 0.0 if (t_1 <= -2e-234) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(z * t)) / c_m)) + Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m))) / z); elseif (t_1 <= Inf) tmp = Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c_m)); else tmp = Float64(Float64(-4.0 * Float64(t * Float64(a / c_m))) - Float64(-9.0 * Float64(x * Float64(Float64(y / c_m) / z)))); end return Float64(c_s * tmp) end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = 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$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -2e-234], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \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\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-234}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c\_m} + \left(9 \cdot \frac{x \cdot y}{c\_m} + \frac{b}{c\_m}\right)}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{b + \mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c\_m}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right) - -9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1.9999999999999999e-234Initial program 91.2%
if -1.9999999999999999e-234 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0Initial program 46.1%
+-commutative46.1%
associate-+r-46.1%
*-commutative46.1%
associate-*r*39.9%
*-commutative39.9%
associate-+r-39.9%
+-commutative39.9%
associate-*l*39.9%
associate-*l*46.1%
*-commutative46.1%
Simplified46.1%
Taylor expanded in z around 0 99.7%
if 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 94.9%
Simplified92.6%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
+-commutative0.0%
associate-+r-0.0%
*-commutative0.0%
associate-*r*5.6%
*-commutative5.6%
associate-+r-5.6%
+-commutative5.6%
associate-*l*5.6%
associate-*l*5.6%
*-commutative5.6%
Simplified5.6%
Taylor expanded in y around inf 22.4%
Taylor expanded in z around -inf 52.2%
mul-1-neg52.2%
unsub-neg52.2%
*-commutative52.2%
associate-/l*79.1%
*-commutative79.1%
associate-/l*83.6%
mul-1-neg83.6%
unsub-neg83.6%
associate-*r/83.9%
*-commutative83.9%
associate-/l*84.0%
associate-/r*84.0%
Simplified84.0%
Taylor expanded in x around inf 48.4%
associate-/l*58.8%
associate-/r*86.2%
Simplified86.2%
Final simplification91.9%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c_m))))
(*
c_s
(if (<= t_1 -2e-234)
t_1
(if (<= t_1 2e-196)
(/ (- (* -4.0 (* t a)) (/ (* (* x y) -9.0) z)) c_m)
(if (<= t_1 INFINITY)
t_1
(- (* -4.0 (* t (/ a c_m))) (* -9.0 (* x (/ (/ y c_m) z))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -2e-234) {
tmp = t_1;
} else if (t_1 <= 2e-196) {
tmp = ((-4.0 * (t * a)) - (((x * y) * -9.0) / z)) / c_m;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z)));
}
return c_s * tmp;
}
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -2e-234) {
tmp = t_1;
} else if (t_1 <= 2e-196) {
tmp = ((-4.0 * (t * a)) - (((x * y) * -9.0) / z)) / c_m;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z)));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m) tmp = 0 if t_1 <= -2e-234: tmp = t_1 elif t_1 <= 2e-196: tmp = ((-4.0 * (t * a)) - (((x * y) * -9.0) / z)) / c_m elif t_1 <= math.inf: tmp = t_1 else: tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z))) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m)) tmp = 0.0 if (t_1 <= -2e-234) tmp = t_1; elseif (t_1 <= 2e-196) tmp = Float64(Float64(Float64(-4.0 * Float64(t * a)) - Float64(Float64(Float64(x * y) * -9.0) / z)) / c_m); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(-4.0 * Float64(t * Float64(a / c_m))) - Float64(-9.0 * Float64(x * Float64(Float64(y / c_m) / z)))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
tmp = 0.0;
if (t_1 <= -2e-234)
tmp = t_1;
elseif (t_1 <= 2e-196)
tmp = ((-4.0 * (t * a)) - (((x * y) * -9.0) / z)) / c_m;
elseif (t_1 <= Inf)
tmp = t_1;
else
tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z)));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = 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$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -2e-234], t$95$1, If[LessEqual[t$95$1, 2e-196], N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * y), $MachinePrecision] * -9.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \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\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-234}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-196}:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) - \frac{\left(x \cdot y\right) \cdot -9}{z}}{c\_m}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right) - -9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1.9999999999999999e-234 or 2.0000000000000001e-196 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 93.0%
if -1.9999999999999999e-234 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 2.0000000000000001e-196Initial program 51.8%
+-commutative51.8%
associate-+r-51.8%
*-commutative51.8%
associate-*r*46.3%
*-commutative46.3%
associate-+r-46.3%
+-commutative46.3%
associate-*l*46.1%
associate-*l*51.6%
*-commutative51.6%
Simplified51.6%
Taylor expanded in y around inf 74.9%
Taylor expanded in z around -inf 89.4%
mul-1-neg89.4%
unsub-neg89.4%
*-commutative89.4%
associate-/l*89.5%
*-commutative89.5%
associate-/l*84.5%
mul-1-neg84.5%
unsub-neg84.5%
associate-*r/84.6%
*-commutative84.6%
associate-/l*84.5%
associate-/r*84.4%
Simplified84.4%
Taylor expanded in c around 0 84.2%
Taylor expanded in y around inf 79.9%
*-commutative79.9%
Simplified79.9%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
+-commutative0.0%
associate-+r-0.0%
*-commutative0.0%
associate-*r*5.6%
*-commutative5.6%
associate-+r-5.6%
+-commutative5.6%
associate-*l*5.6%
associate-*l*5.6%
*-commutative5.6%
Simplified5.6%
Taylor expanded in y around inf 22.4%
Taylor expanded in z around -inf 52.2%
mul-1-neg52.2%
unsub-neg52.2%
*-commutative52.2%
associate-/l*79.1%
*-commutative79.1%
associate-/l*83.6%
mul-1-neg83.6%
unsub-neg83.6%
associate-*r/83.9%
*-commutative83.9%
associate-/l*84.0%
associate-/r*84.0%
Simplified84.0%
Taylor expanded in x around inf 48.4%
associate-/l*58.8%
associate-/r*86.2%
Simplified86.2%
Final simplification91.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c_m))))
(*
c_s
(if (<= t_1 -2e-71)
t_1
(if (<= t_1 2e-91)
(/ (+ (* -4.0 (* t a)) (/ (* y (- (/ b y) (* x -9.0))) z)) c_m)
(if (<= t_1 INFINITY)
t_1
(- (* -4.0 (* t (/ a c_m))) (* -9.0 (* x (/ (/ y c_m) z))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -2e-71) {
tmp = t_1;
} else if (t_1 <= 2e-91) {
tmp = ((-4.0 * (t * a)) + ((y * ((b / y) - (x * -9.0))) / z)) / c_m;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z)));
}
return c_s * tmp;
}
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -2e-71) {
tmp = t_1;
} else if (t_1 <= 2e-91) {
tmp = ((-4.0 * (t * a)) + ((y * ((b / y) - (x * -9.0))) / z)) / c_m;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z)));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m) tmp = 0 if t_1 <= -2e-71: tmp = t_1 elif t_1 <= 2e-91: tmp = ((-4.0 * (t * a)) + ((y * ((b / y) - (x * -9.0))) / z)) / c_m elif t_1 <= math.inf: tmp = t_1 else: tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z))) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m)) tmp = 0.0 if (t_1 <= -2e-71) tmp = t_1; elseif (t_1 <= 2e-91) tmp = Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(Float64(y * Float64(Float64(b / y) - Float64(x * -9.0))) / z)) / c_m); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(-4.0 * Float64(t * Float64(a / c_m))) - Float64(-9.0 * Float64(x * Float64(Float64(y / c_m) / z)))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
tmp = 0.0;
if (t_1 <= -2e-71)
tmp = t_1;
elseif (t_1 <= 2e-91)
tmp = ((-4.0 * (t * a)) + ((y * ((b / y) - (x * -9.0))) / z)) / c_m;
elseif (t_1 <= Inf)
tmp = t_1;
else
tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z)));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = 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$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -2e-71], t$95$1, If[LessEqual[t$95$1, 2e-91], N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(N[(b / y), $MachinePrecision] - N[(x * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \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\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-91}:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) + \frac{y \cdot \left(\frac{b}{y} - x \cdot -9\right)}{z}}{c\_m}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right) - -9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1.9999999999999998e-71 or 2.00000000000000004e-91 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 93.0%
if -1.9999999999999998e-71 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 2.00000000000000004e-91Initial program 69.2%
+-commutative69.2%
associate-+r-69.2%
*-commutative69.2%
associate-*r*66.9%
*-commutative66.9%
associate-+r-66.9%
+-commutative66.9%
associate-*l*66.8%
associate-*l*72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in y around inf 64.8%
Taylor expanded in z around -inf 76.4%
mul-1-neg76.4%
unsub-neg76.4%
*-commutative76.4%
associate-/l*74.4%
*-commutative74.4%
associate-/l*77.3%
mul-1-neg77.3%
unsub-neg77.3%
associate-*r/77.3%
*-commutative77.3%
associate-/l*77.2%
associate-/r*71.7%
Simplified71.7%
Taylor expanded in c around 0 90.8%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
+-commutative0.0%
associate-+r-0.0%
*-commutative0.0%
associate-*r*5.6%
*-commutative5.6%
associate-+r-5.6%
+-commutative5.6%
associate-*l*5.6%
associate-*l*5.6%
*-commutative5.6%
Simplified5.6%
Taylor expanded in y around inf 22.4%
Taylor expanded in z around -inf 52.2%
mul-1-neg52.2%
unsub-neg52.2%
*-commutative52.2%
associate-/l*79.1%
*-commutative79.1%
associate-/l*83.6%
mul-1-neg83.6%
unsub-neg83.6%
associate-*r/83.9%
*-commutative83.9%
associate-/l*84.0%
associate-/r*84.0%
Simplified84.0%
Taylor expanded in x around inf 48.4%
associate-/l*58.8%
associate-/r*86.2%
Simplified86.2%
Final simplification92.2%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c_m))))
(*
c_s
(if (<= t_1 -2e-234)
t_1
(if (<= t_1 2e-174)
(/
(+
(* -4.0 (/ (* a (* z t)) c_m))
(+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)))
z)
(if (<= t_1 INFINITY)
t_1
(- (* -4.0 (* t (/ a c_m))) (* -9.0 (* x (/ (/ y c_m) z))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -2e-234) {
tmp = t_1;
} else if (t_1 <= 2e-174) {
tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z)));
}
return c_s * tmp;
}
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -2e-234) {
tmp = t_1;
} else if (t_1 <= 2e-174) {
tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z)));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m) tmp = 0 if t_1 <= -2e-234: tmp = t_1 elif t_1 <= 2e-174: tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z elif t_1 <= math.inf: tmp = t_1 else: tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z))) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m)) tmp = 0.0 if (t_1 <= -2e-234) tmp = t_1; elseif (t_1 <= 2e-174) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a * Float64(z * t)) / c_m)) + Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m))) / z); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(-4.0 * Float64(t * Float64(a / c_m))) - Float64(-9.0 * Float64(x * Float64(Float64(y / c_m) / z)))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
tmp = 0.0;
if (t_1 <= -2e-234)
tmp = t_1;
elseif (t_1 <= 2e-174)
tmp = ((-4.0 * ((a * (z * t)) / c_m)) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
elseif (t_1 <= Inf)
tmp = t_1;
else
tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z)));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = 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$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -2e-234], t$95$1, If[LessEqual[t$95$1, 2e-174], N[(N[(N[(-4.0 * N[(N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \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\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-234}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-174}:\\
\;\;\;\;\frac{-4 \cdot \frac{a \cdot \left(z \cdot t\right)}{c\_m} + \left(9 \cdot \frac{x \cdot y}{c\_m} + \frac{b}{c\_m}\right)}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right) - -9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1.9999999999999999e-234 or 2e-174 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 93.0%
if -1.9999999999999999e-234 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 2e-174Initial program 54.2%
+-commutative54.2%
associate-+r-54.2%
*-commutative54.2%
associate-*r*45.6%
*-commutative45.6%
associate-+r-45.6%
+-commutative45.6%
associate-*l*45.5%
associate-*l*54.0%
*-commutative54.0%
Simplified54.0%
Taylor expanded in z around 0 95.1%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
+-commutative0.0%
associate-+r-0.0%
*-commutative0.0%
associate-*r*5.6%
*-commutative5.6%
associate-+r-5.6%
+-commutative5.6%
associate-*l*5.6%
associate-*l*5.6%
*-commutative5.6%
Simplified5.6%
Taylor expanded in y around inf 22.4%
Taylor expanded in z around -inf 52.2%
mul-1-neg52.2%
unsub-neg52.2%
*-commutative52.2%
associate-/l*79.1%
*-commutative79.1%
associate-/l*83.6%
mul-1-neg83.6%
unsub-neg83.6%
associate-*r/83.9%
*-commutative83.9%
associate-/l*84.0%
associate-/r*84.0%
Simplified84.0%
Taylor expanded in x around inf 48.4%
associate-/l*58.8%
associate-/r*86.2%
Simplified86.2%
Final simplification92.6%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (/ (* t a) c_m))) (t_2 (* 9.0 (/ (* x y) (* z c_m)))))
(*
c_s
(if (<= z -1.25e+111)
(* -4.0 (* t (/ a c_m)))
(if (<= z -2.25e+62)
t_2
(if (<= z -4.1e-60)
t_1
(if (<= z -1.05e-220)
(* b (/ 1.0 (* z c_m)))
(if (<= z 1.02e-198)
t_2
(if (<= z 3.4e-34)
(/ b (* z c_m))
(if (<= z 0.36) t_2 t_1))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * ((t * a) / c_m);
double t_2 = 9.0 * ((x * y) / (z * c_m));
double tmp;
if (z <= -1.25e+111) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -2.25e+62) {
tmp = t_2;
} else if (z <= -4.1e-60) {
tmp = t_1;
} else if (z <= -1.05e-220) {
tmp = b * (1.0 / (z * c_m));
} else if (z <= 1.02e-198) {
tmp = t_2;
} else if (z <= 3.4e-34) {
tmp = b / (z * c_m);
} else if (z <= 0.36) {
tmp = t_2;
} else {
tmp = t_1;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * ((t * a) / c_m)
t_2 = 9.0d0 * ((x * y) / (z * c_m))
if (z <= (-1.25d+111)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (z <= (-2.25d+62)) then
tmp = t_2
else if (z <= (-4.1d-60)) then
tmp = t_1
else if (z <= (-1.05d-220)) then
tmp = b * (1.0d0 / (z * c_m))
else if (z <= 1.02d-198) then
tmp = t_2
else if (z <= 3.4d-34) then
tmp = b / (z * c_m)
else if (z <= 0.36d0) then
tmp = t_2
else
tmp = t_1
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * ((t * a) / c_m);
double t_2 = 9.0 * ((x * y) / (z * c_m));
double tmp;
if (z <= -1.25e+111) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -2.25e+62) {
tmp = t_2;
} else if (z <= -4.1e-60) {
tmp = t_1;
} else if (z <= -1.05e-220) {
tmp = b * (1.0 / (z * c_m));
} else if (z <= 1.02e-198) {
tmp = t_2;
} else if (z <= 3.4e-34) {
tmp = b / (z * c_m);
} else if (z <= 0.36) {
tmp = t_2;
} else {
tmp = t_1;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = -4.0 * ((t * a) / c_m) t_2 = 9.0 * ((x * y) / (z * c_m)) tmp = 0 if z <= -1.25e+111: tmp = -4.0 * (t * (a / c_m)) elif z <= -2.25e+62: tmp = t_2 elif z <= -4.1e-60: tmp = t_1 elif z <= -1.05e-220: tmp = b * (1.0 / (z * c_m)) elif z <= 1.02e-198: tmp = t_2 elif z <= 3.4e-34: tmp = b / (z * c_m) elif z <= 0.36: tmp = t_2 else: tmp = t_1 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(-4.0 * Float64(Float64(t * a) / c_m)) t_2 = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c_m))) tmp = 0.0 if (z <= -1.25e+111) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (z <= -2.25e+62) tmp = t_2; elseif (z <= -4.1e-60) tmp = t_1; elseif (z <= -1.05e-220) tmp = Float64(b * Float64(1.0 / Float64(z * c_m))); elseif (z <= 1.02e-198) tmp = t_2; elseif (z <= 3.4e-34) tmp = Float64(b / Float64(z * c_m)); elseif (z <= 0.36) tmp = t_2; else tmp = t_1; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = -4.0 * ((t * a) / c_m);
t_2 = 9.0 * ((x * y) / (z * c_m));
tmp = 0.0;
if (z <= -1.25e+111)
tmp = -4.0 * (t * (a / c_m));
elseif (z <= -2.25e+62)
tmp = t_2;
elseif (z <= -4.1e-60)
tmp = t_1;
elseif (z <= -1.05e-220)
tmp = b * (1.0 / (z * c_m));
elseif (z <= 1.02e-198)
tmp = t_2;
elseif (z <= 3.4e-34)
tmp = b / (z * c_m);
elseif (z <= 0.36)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -1.25e+111], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.25e+62], t$95$2, If[LessEqual[z, -4.1e-60], t$95$1, If[LessEqual[z, -1.05e-220], N[(b * N[(1.0 / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e-198], t$95$2, If[LessEqual[z, 3.4e-34], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.36], t$95$2, t$95$1]]]]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{t \cdot a}{c\_m}\\
t_2 := 9 \cdot \frac{x \cdot y}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+111}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{+62}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-220}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c\_m}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-198}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-34}:\\
\;\;\;\;\frac{b}{z \cdot c\_m}\\
\mathbf{elif}\;z \leq 0.36:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if z < -1.2499999999999999e111Initial program 57.3%
+-commutative57.3%
associate-+r-57.3%
*-commutative57.3%
associate-*r*57.7%
*-commutative57.7%
associate-+r-57.7%
+-commutative57.7%
associate-*l*57.7%
associate-*l*59.9%
*-commutative59.9%
Simplified59.9%
Taylor expanded in z around 0 57.2%
Taylor expanded in a around inf 53.3%
*-commutative53.3%
associate-/l*61.9%
Simplified61.9%
if -1.2499999999999999e111 < z < -2.24999999999999999e62 or -1.04999999999999996e-220 < z < 1.01999999999999997e-198 or 3.4000000000000001e-34 < z < 0.35999999999999999Initial program 94.0%
+-commutative94.0%
associate-+r-94.0%
*-commutative94.0%
associate-*r*92.4%
*-commutative92.4%
associate-+r-92.4%
+-commutative92.4%
associate-*l*92.4%
associate-*l*90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in x around inf 66.5%
if -2.24999999999999999e62 < z < -4.10000000000000013e-60 or 0.35999999999999999 < z Initial program 68.2%
+-commutative68.2%
associate-+r-68.2%
*-commutative68.2%
associate-*r*69.7%
*-commutative69.7%
associate-+r-69.7%
+-commutative69.7%
associate-*l*69.8%
associate-*l*74.4%
*-commutative74.4%
Simplified74.4%
Taylor expanded in z around inf 62.2%
if -4.10000000000000013e-60 < z < -1.04999999999999996e-220Initial program 96.0%
+-commutative96.0%
associate-+r-96.0%
*-commutative96.0%
associate-*r*94.6%
*-commutative94.6%
associate-+r-94.6%
+-commutative94.6%
associate-*l*94.6%
associate-*l*90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in b around inf 64.3%
*-commutative64.3%
Simplified64.3%
div-inv64.4%
Applied egg-rr64.4%
if 1.01999999999999997e-198 < z < 3.4000000000000001e-34Initial program 97.5%
+-commutative97.5%
associate-+r-97.5%
*-commutative97.5%
associate-*r*97.5%
*-commutative97.5%
associate-+r-97.5%
+-commutative97.5%
associate-*l*97.5%
associate-*l*95.0%
*-commutative95.0%
Simplified95.0%
Taylor expanded in b around inf 65.2%
*-commutative65.2%
Simplified65.2%
Final simplification64.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* 9.0 (/ (* x y) (* z c_m)))) (t_2 (* -4.0 (/ (* t a) c_m))))
(*
c_s
(if (<= z -1.85e+141)
(* -4.0 (* t (/ a c_m)))
(if (<= z -1.45e+41)
(* x (/ (/ (* 9.0 y) c_m) z))
(if (<= z -7e-61)
t_2
(if (<= z -1.95e-222)
(* b (/ 1.0 (* z c_m)))
(if (<= z 4.4e-198)
t_1
(if (<= z 3.6e-34)
(/ b (* z c_m))
(if (<= z 9.0) t_1 t_2))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * ((x * y) / (z * c_m));
double t_2 = -4.0 * ((t * a) / c_m);
double tmp;
if (z <= -1.85e+141) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -1.45e+41) {
tmp = x * (((9.0 * y) / c_m) / z);
} else if (z <= -7e-61) {
tmp = t_2;
} else if (z <= -1.95e-222) {
tmp = b * (1.0 / (z * c_m));
} else if (z <= 4.4e-198) {
tmp = t_1;
} else if (z <= 3.6e-34) {
tmp = b / (z * c_m);
} else if (z <= 9.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 9.0d0 * ((x * y) / (z * c_m))
t_2 = (-4.0d0) * ((t * a) / c_m)
if (z <= (-1.85d+141)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (z <= (-1.45d+41)) then
tmp = x * (((9.0d0 * y) / c_m) / z)
else if (z <= (-7d-61)) then
tmp = t_2
else if (z <= (-1.95d-222)) then
tmp = b * (1.0d0 / (z * c_m))
else if (z <= 4.4d-198) then
tmp = t_1
else if (z <= 3.6d-34) then
tmp = b / (z * c_m)
else if (z <= 9.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * ((x * y) / (z * c_m));
double t_2 = -4.0 * ((t * a) / c_m);
double tmp;
if (z <= -1.85e+141) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -1.45e+41) {
tmp = x * (((9.0 * y) / c_m) / z);
} else if (z <= -7e-61) {
tmp = t_2;
} else if (z <= -1.95e-222) {
tmp = b * (1.0 / (z * c_m));
} else if (z <= 4.4e-198) {
tmp = t_1;
} else if (z <= 3.6e-34) {
tmp = b / (z * c_m);
} else if (z <= 9.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = 9.0 * ((x * y) / (z * c_m)) t_2 = -4.0 * ((t * a) / c_m) tmp = 0 if z <= -1.85e+141: tmp = -4.0 * (t * (a / c_m)) elif z <= -1.45e+41: tmp = x * (((9.0 * y) / c_m) / z) elif z <= -7e-61: tmp = t_2 elif z <= -1.95e-222: tmp = b * (1.0 / (z * c_m)) elif z <= 4.4e-198: tmp = t_1 elif z <= 3.6e-34: tmp = b / (z * c_m) elif z <= 9.0: tmp = t_1 else: tmp = t_2 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c_m))) t_2 = Float64(-4.0 * Float64(Float64(t * a) / c_m)) tmp = 0.0 if (z <= -1.85e+141) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (z <= -1.45e+41) tmp = Float64(x * Float64(Float64(Float64(9.0 * y) / c_m) / z)); elseif (z <= -7e-61) tmp = t_2; elseif (z <= -1.95e-222) tmp = Float64(b * Float64(1.0 / Float64(z * c_m))); elseif (z <= 4.4e-198) tmp = t_1; elseif (z <= 3.6e-34) tmp = Float64(b / Float64(z * c_m)); elseif (z <= 9.0) tmp = t_1; else tmp = t_2; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = 9.0 * ((x * y) / (z * c_m));
t_2 = -4.0 * ((t * a) / c_m);
tmp = 0.0;
if (z <= -1.85e+141)
tmp = -4.0 * (t * (a / c_m));
elseif (z <= -1.45e+41)
tmp = x * (((9.0 * y) / c_m) / z);
elseif (z <= -7e-61)
tmp = t_2;
elseif (z <= -1.95e-222)
tmp = b * (1.0 / (z * c_m));
elseif (z <= 4.4e-198)
tmp = t_1;
elseif (z <= 3.6e-34)
tmp = b / (z * c_m);
elseif (z <= 9.0)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -1.85e+141], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.45e+41], N[(x * N[(N[(N[(9.0 * y), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7e-61], t$95$2, If[LessEqual[z, -1.95e-222], N[(b * N[(1.0 / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e-198], t$95$1, If[LessEqual[z, 3.6e-34], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.0], t$95$1, t$95$2]]]]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \frac{x \cdot y}{z \cdot c\_m}\\
t_2 := -4 \cdot \frac{t \cdot a}{c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+141}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{+41}:\\
\;\;\;\;x \cdot \frac{\frac{9 \cdot y}{c\_m}}{z}\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-61}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-222}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c\_m}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-198}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-34}:\\
\;\;\;\;\frac{b}{z \cdot c\_m}\\
\mathbf{elif}\;z \leq 9:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if z < -1.8500000000000001e141Initial program 51.7%
+-commutative51.7%
associate-+r-51.7%
*-commutative51.7%
associate-*r*52.1%
*-commutative52.1%
associate-+r-52.1%
+-commutative52.1%
associate-*l*52.1%
associate-*l*54.8%
*-commutative54.8%
Simplified54.8%
Taylor expanded in z around 0 51.7%
Taylor expanded in a around inf 57.6%
*-commutative57.6%
associate-/l*67.9%
Simplified67.9%
if -1.8500000000000001e141 < z < -1.44999999999999994e41Initial program 74.2%
+-commutative74.2%
associate-+r-74.2%
*-commutative74.2%
associate-*r*70.0%
*-commutative70.0%
associate-+r-70.0%
+-commutative70.0%
associate-*l*69.9%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in y around inf 66.2%
Taylor expanded in z around -inf 91.3%
mul-1-neg91.3%
unsub-neg91.3%
*-commutative91.3%
associate-/l*86.9%
*-commutative86.9%
associate-/l*91.6%
mul-1-neg91.6%
unsub-neg91.6%
associate-*r/91.6%
*-commutative91.6%
associate-/l*91.7%
associate-/r*87.2%
Simplified87.2%
Taylor expanded in x around inf 47.6%
*-commutative47.6%
associate-/l*41.3%
associate-*r*41.3%
associate-/r*49.7%
associate-*l/49.5%
associate-*l/49.6%
Simplified49.6%
if -1.44999999999999994e41 < z < -7.0000000000000006e-61 or 9 < z Initial program 69.9%
+-commutative69.9%
associate-+r-69.9%
*-commutative69.9%
associate-*r*71.4%
*-commutative71.4%
associate-+r-71.4%
+-commutative71.4%
associate-*l*71.5%
associate-*l*76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in z around inf 63.5%
if -7.0000000000000006e-61 < z < -1.95e-222Initial program 96.0%
+-commutative96.0%
associate-+r-96.0%
*-commutative96.0%
associate-*r*94.6%
*-commutative94.6%
associate-+r-94.6%
+-commutative94.6%
associate-*l*94.6%
associate-*l*90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in b around inf 64.3%
*-commutative64.3%
Simplified64.3%
div-inv64.4%
Applied egg-rr64.4%
if -1.95e-222 < z < 4.4000000000000001e-198 or 3.60000000000000008e-34 < z < 9Initial program 98.6%
+-commutative98.6%
associate-+r-98.6%
*-commutative98.6%
associate-*r*98.6%
*-commutative98.6%
associate-+r-98.6%
+-commutative98.6%
associate-*l*98.6%
associate-*l*94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in x around inf 68.4%
if 4.4000000000000001e-198 < z < 3.60000000000000008e-34Initial program 97.5%
+-commutative97.5%
associate-+r-97.5%
*-commutative97.5%
associate-*r*97.5%
*-commutative97.5%
associate-+r-97.5%
+-commutative97.5%
associate-*l*97.5%
associate-*l*95.0%
*-commutative95.0%
Simplified95.0%
Taylor expanded in b around inf 65.2%
*-commutative65.2%
Simplified65.2%
Final simplification64.2%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* (/ (* x y) c_m) (/ 9.0 z))) (t_2 (* -4.0 (/ (* t a) c_m))))
(*
c_s
(if (<= z -4.1e+141)
(* -4.0 (* t (/ a c_m)))
(if (<= z -1.15e+41)
(* x (/ (/ (* 9.0 y) c_m) z))
(if (<= z -8.4e-60)
t_2
(if (<= z -7.8e-223)
(* b (/ 1.0 (* z c_m)))
(if (<= z 1.02e-198)
t_1
(if (<= z 3.4e-34)
(/ b (* z c_m))
(if (<= z 0.65) t_1 t_2))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = ((x * y) / c_m) * (9.0 / z);
double t_2 = -4.0 * ((t * a) / c_m);
double tmp;
if (z <= -4.1e+141) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -1.15e+41) {
tmp = x * (((9.0 * y) / c_m) / z);
} else if (z <= -8.4e-60) {
tmp = t_2;
} else if (z <= -7.8e-223) {
tmp = b * (1.0 / (z * c_m));
} else if (z <= 1.02e-198) {
tmp = t_1;
} else if (z <= 3.4e-34) {
tmp = b / (z * c_m);
} else if (z <= 0.65) {
tmp = t_1;
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * y) / c_m) * (9.0d0 / z)
t_2 = (-4.0d0) * ((t * a) / c_m)
if (z <= (-4.1d+141)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (z <= (-1.15d+41)) then
tmp = x * (((9.0d0 * y) / c_m) / z)
else if (z <= (-8.4d-60)) then
tmp = t_2
else if (z <= (-7.8d-223)) then
tmp = b * (1.0d0 / (z * c_m))
else if (z <= 1.02d-198) then
tmp = t_1
else if (z <= 3.4d-34) then
tmp = b / (z * c_m)
else if (z <= 0.65d0) then
tmp = t_1
else
tmp = t_2
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = ((x * y) / c_m) * (9.0 / z);
double t_2 = -4.0 * ((t * a) / c_m);
double tmp;
if (z <= -4.1e+141) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -1.15e+41) {
tmp = x * (((9.0 * y) / c_m) / z);
} else if (z <= -8.4e-60) {
tmp = t_2;
} else if (z <= -7.8e-223) {
tmp = b * (1.0 / (z * c_m));
} else if (z <= 1.02e-198) {
tmp = t_1;
} else if (z <= 3.4e-34) {
tmp = b / (z * c_m);
} else if (z <= 0.65) {
tmp = t_1;
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = ((x * y) / c_m) * (9.0 / z) t_2 = -4.0 * ((t * a) / c_m) tmp = 0 if z <= -4.1e+141: tmp = -4.0 * (t * (a / c_m)) elif z <= -1.15e+41: tmp = x * (((9.0 * y) / c_m) / z) elif z <= -8.4e-60: tmp = t_2 elif z <= -7.8e-223: tmp = b * (1.0 / (z * c_m)) elif z <= 1.02e-198: tmp = t_1 elif z <= 3.4e-34: tmp = b / (z * c_m) elif z <= 0.65: tmp = t_1 else: tmp = t_2 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(Float64(x * y) / c_m) * Float64(9.0 / z)) t_2 = Float64(-4.0 * Float64(Float64(t * a) / c_m)) tmp = 0.0 if (z <= -4.1e+141) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (z <= -1.15e+41) tmp = Float64(x * Float64(Float64(Float64(9.0 * y) / c_m) / z)); elseif (z <= -8.4e-60) tmp = t_2; elseif (z <= -7.8e-223) tmp = Float64(b * Float64(1.0 / Float64(z * c_m))); elseif (z <= 1.02e-198) tmp = t_1; elseif (z <= 3.4e-34) tmp = Float64(b / Float64(z * c_m)); elseif (z <= 0.65) tmp = t_1; else tmp = t_2; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = ((x * y) / c_m) * (9.0 / z);
t_2 = -4.0 * ((t * a) / c_m);
tmp = 0.0;
if (z <= -4.1e+141)
tmp = -4.0 * (t * (a / c_m));
elseif (z <= -1.15e+41)
tmp = x * (((9.0 * y) / c_m) / z);
elseif (z <= -8.4e-60)
tmp = t_2;
elseif (z <= -7.8e-223)
tmp = b * (1.0 / (z * c_m));
elseif (z <= 1.02e-198)
tmp = t_1;
elseif (z <= 3.4e-34)
tmp = b / (z * c_m);
elseif (z <= 0.65)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -4.1e+141], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.15e+41], N[(x * N[(N[(N[(9.0 * y), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.4e-60], t$95$2, If[LessEqual[z, -7.8e-223], N[(b * N[(1.0 / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e-198], t$95$1, If[LessEqual[z, 3.4e-34], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.65], t$95$1, t$95$2]]]]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{x \cdot y}{c\_m} \cdot \frac{9}{z}\\
t_2 := -4 \cdot \frac{t \cdot a}{c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+141}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{+41}:\\
\;\;\;\;x \cdot \frac{\frac{9 \cdot y}{c\_m}}{z}\\
\mathbf{elif}\;z \leq -8.4 \cdot 10^{-60}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-223}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c\_m}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-198}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-34}:\\
\;\;\;\;\frac{b}{z \cdot c\_m}\\
\mathbf{elif}\;z \leq 0.65:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if z < -4.10000000000000022e141Initial program 51.7%
+-commutative51.7%
associate-+r-51.7%
*-commutative51.7%
associate-*r*52.1%
*-commutative52.1%
associate-+r-52.1%
+-commutative52.1%
associate-*l*52.1%
associate-*l*54.8%
*-commutative54.8%
Simplified54.8%
Taylor expanded in z around 0 51.7%
Taylor expanded in a around inf 57.6%
*-commutative57.6%
associate-/l*67.9%
Simplified67.9%
if -4.10000000000000022e141 < z < -1.1499999999999999e41Initial program 74.2%
+-commutative74.2%
associate-+r-74.2%
*-commutative74.2%
associate-*r*70.0%
*-commutative70.0%
associate-+r-70.0%
+-commutative70.0%
associate-*l*69.9%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in y around inf 66.2%
Taylor expanded in z around -inf 91.3%
mul-1-neg91.3%
unsub-neg91.3%
*-commutative91.3%
associate-/l*86.9%
*-commutative86.9%
associate-/l*91.6%
mul-1-neg91.6%
unsub-neg91.6%
associate-*r/91.6%
*-commutative91.6%
associate-/l*91.7%
associate-/r*87.2%
Simplified87.2%
Taylor expanded in x around inf 47.6%
*-commutative47.6%
associate-/l*41.3%
associate-*r*41.3%
associate-/r*49.7%
associate-*l/49.5%
associate-*l/49.6%
Simplified49.6%
if -1.1499999999999999e41 < z < -8.39999999999999964e-60 or 0.650000000000000022 < z Initial program 69.9%
+-commutative69.9%
associate-+r-69.9%
*-commutative69.9%
associate-*r*71.4%
*-commutative71.4%
associate-+r-71.4%
+-commutative71.4%
associate-*l*71.5%
associate-*l*76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in z around inf 63.5%
if -8.39999999999999964e-60 < z < -7.79999999999999924e-223Initial program 96.0%
+-commutative96.0%
associate-+r-96.0%
*-commutative96.0%
associate-*r*94.6%
*-commutative94.6%
associate-+r-94.6%
+-commutative94.6%
associate-*l*94.6%
associate-*l*90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in b around inf 64.3%
*-commutative64.3%
Simplified64.3%
div-inv64.4%
Applied egg-rr64.4%
if -7.79999999999999924e-223 < z < 1.01999999999999997e-198 or 3.4000000000000001e-34 < z < 0.650000000000000022Initial program 98.6%
+-commutative98.6%
associate-+r-98.6%
*-commutative98.6%
associate-*r*98.6%
*-commutative98.6%
associate-+r-98.6%
+-commutative98.6%
associate-*l*98.6%
associate-*l*94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in x around inf 68.4%
associate-*r/68.4%
associate-*r*68.4%
*-commutative68.4%
Simplified68.4%
associate-*l*68.4%
times-frac69.8%
Applied egg-rr69.8%
if 1.01999999999999997e-198 < z < 3.4000000000000001e-34Initial program 97.5%
+-commutative97.5%
associate-+r-97.5%
*-commutative97.5%
associate-*r*97.5%
*-commutative97.5%
associate-+r-97.5%
+-commutative97.5%
associate-*l*97.5%
associate-*l*95.0%
*-commutative95.0%
Simplified95.0%
Taylor expanded in b around inf 65.2%
*-commutative65.2%
Simplified65.2%
Final simplification64.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* (/ (* x y) c_m) (/ 9.0 z))) (t_2 (* -4.0 (/ (* t a) c_m))))
(*
c_s
(if (<= z -1.05e+141)
(* -4.0 (* t (/ a c_m)))
(if (<= z -1.15e+41)
(* (/ (* x 9.0) c_m) (/ y z))
(if (<= z -9.6e-60)
t_2
(if (<= z -3.7e-222)
(* b (/ 1.0 (* z c_m)))
(if (<= z 3.4e-198)
t_1
(if (<= z 3.2e-34)
(/ b (* z c_m))
(if (<= z 0.62) t_1 t_2))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = ((x * y) / c_m) * (9.0 / z);
double t_2 = -4.0 * ((t * a) / c_m);
double tmp;
if (z <= -1.05e+141) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -1.15e+41) {
tmp = ((x * 9.0) / c_m) * (y / z);
} else if (z <= -9.6e-60) {
tmp = t_2;
} else if (z <= -3.7e-222) {
tmp = b * (1.0 / (z * c_m));
} else if (z <= 3.4e-198) {
tmp = t_1;
} else if (z <= 3.2e-34) {
tmp = b / (z * c_m);
} else if (z <= 0.62) {
tmp = t_1;
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * y) / c_m) * (9.0d0 / z)
t_2 = (-4.0d0) * ((t * a) / c_m)
if (z <= (-1.05d+141)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (z <= (-1.15d+41)) then
tmp = ((x * 9.0d0) / c_m) * (y / z)
else if (z <= (-9.6d-60)) then
tmp = t_2
else if (z <= (-3.7d-222)) then
tmp = b * (1.0d0 / (z * c_m))
else if (z <= 3.4d-198) then
tmp = t_1
else if (z <= 3.2d-34) then
tmp = b / (z * c_m)
else if (z <= 0.62d0) then
tmp = t_1
else
tmp = t_2
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = ((x * y) / c_m) * (9.0 / z);
double t_2 = -4.0 * ((t * a) / c_m);
double tmp;
if (z <= -1.05e+141) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -1.15e+41) {
tmp = ((x * 9.0) / c_m) * (y / z);
} else if (z <= -9.6e-60) {
tmp = t_2;
} else if (z <= -3.7e-222) {
tmp = b * (1.0 / (z * c_m));
} else if (z <= 3.4e-198) {
tmp = t_1;
} else if (z <= 3.2e-34) {
tmp = b / (z * c_m);
} else if (z <= 0.62) {
tmp = t_1;
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = ((x * y) / c_m) * (9.0 / z) t_2 = -4.0 * ((t * a) / c_m) tmp = 0 if z <= -1.05e+141: tmp = -4.0 * (t * (a / c_m)) elif z <= -1.15e+41: tmp = ((x * 9.0) / c_m) * (y / z) elif z <= -9.6e-60: tmp = t_2 elif z <= -3.7e-222: tmp = b * (1.0 / (z * c_m)) elif z <= 3.4e-198: tmp = t_1 elif z <= 3.2e-34: tmp = b / (z * c_m) elif z <= 0.62: tmp = t_1 else: tmp = t_2 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(Float64(x * y) / c_m) * Float64(9.0 / z)) t_2 = Float64(-4.0 * Float64(Float64(t * a) / c_m)) tmp = 0.0 if (z <= -1.05e+141) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (z <= -1.15e+41) tmp = Float64(Float64(Float64(x * 9.0) / c_m) * Float64(y / z)); elseif (z <= -9.6e-60) tmp = t_2; elseif (z <= -3.7e-222) tmp = Float64(b * Float64(1.0 / Float64(z * c_m))); elseif (z <= 3.4e-198) tmp = t_1; elseif (z <= 3.2e-34) tmp = Float64(b / Float64(z * c_m)); elseif (z <= 0.62) tmp = t_1; else tmp = t_2; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = ((x * y) / c_m) * (9.0 / z);
t_2 = -4.0 * ((t * a) / c_m);
tmp = 0.0;
if (z <= -1.05e+141)
tmp = -4.0 * (t * (a / c_m));
elseif (z <= -1.15e+41)
tmp = ((x * 9.0) / c_m) * (y / z);
elseif (z <= -9.6e-60)
tmp = t_2;
elseif (z <= -3.7e-222)
tmp = b * (1.0 / (z * c_m));
elseif (z <= 3.4e-198)
tmp = t_1;
elseif (z <= 3.2e-34)
tmp = b / (z * c_m);
elseif (z <= 0.62)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -1.05e+141], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.15e+41], N[(N[(N[(x * 9.0), $MachinePrecision] / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.6e-60], t$95$2, If[LessEqual[z, -3.7e-222], N[(b * N[(1.0 / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-198], t$95$1, If[LessEqual[z, 3.2e-34], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.62], t$95$1, t$95$2]]]]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{x \cdot y}{c\_m} \cdot \frac{9}{z}\\
t_2 := -4 \cdot \frac{t \cdot a}{c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+141}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{+41}:\\
\;\;\;\;\frac{x \cdot 9}{c\_m} \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -9.6 \cdot 10^{-60}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-222}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c\_m}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-198}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-34}:\\
\;\;\;\;\frac{b}{z \cdot c\_m}\\
\mathbf{elif}\;z \leq 0.62:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if z < -1.0499999999999999e141Initial program 51.7%
+-commutative51.7%
associate-+r-51.7%
*-commutative51.7%
associate-*r*52.1%
*-commutative52.1%
associate-+r-52.1%
+-commutative52.1%
associate-*l*52.1%
associate-*l*54.8%
*-commutative54.8%
Simplified54.8%
Taylor expanded in z around 0 51.7%
Taylor expanded in a around inf 57.6%
*-commutative57.6%
associate-/l*67.9%
Simplified67.9%
if -1.0499999999999999e141 < z < -1.1499999999999999e41Initial program 74.2%
+-commutative74.2%
associate-+r-74.2%
*-commutative74.2%
associate-*r*70.0%
*-commutative70.0%
associate-+r-70.0%
+-commutative70.0%
associate-*l*69.9%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in x around inf 47.6%
associate-*r/47.6%
associate-*r*47.6%
*-commutative47.6%
Simplified47.6%
*-commutative47.6%
times-frac62.1%
*-commutative62.1%
Applied egg-rr62.1%
if -1.1499999999999999e41 < z < -9.60000000000000038e-60 or 0.619999999999999996 < z Initial program 69.9%
+-commutative69.9%
associate-+r-69.9%
*-commutative69.9%
associate-*r*71.4%
*-commutative71.4%
associate-+r-71.4%
+-commutative71.4%
associate-*l*71.5%
associate-*l*76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in z around inf 63.5%
if -9.60000000000000038e-60 < z < -3.6999999999999999e-222Initial program 96.0%
+-commutative96.0%
associate-+r-96.0%
*-commutative96.0%
associate-*r*94.6%
*-commutative94.6%
associate-+r-94.6%
+-commutative94.6%
associate-*l*94.6%
associate-*l*90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in b around inf 64.3%
*-commutative64.3%
Simplified64.3%
div-inv64.4%
Applied egg-rr64.4%
if -3.6999999999999999e-222 < z < 3.3999999999999998e-198 or 3.20000000000000003e-34 < z < 0.619999999999999996Initial program 98.6%
+-commutative98.6%
associate-+r-98.6%
*-commutative98.6%
associate-*r*98.6%
*-commutative98.6%
associate-+r-98.6%
+-commutative98.6%
associate-*l*98.6%
associate-*l*94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in x around inf 68.4%
associate-*r/68.4%
associate-*r*68.4%
*-commutative68.4%
Simplified68.4%
associate-*l*68.4%
times-frac69.8%
Applied egg-rr69.8%
if 3.3999999999999998e-198 < z < 3.20000000000000003e-34Initial program 97.5%
+-commutative97.5%
associate-+r-97.5%
*-commutative97.5%
associate-*r*97.5%
*-commutative97.5%
associate-+r-97.5%
+-commutative97.5%
associate-*l*97.5%
associate-*l*95.0%
*-commutative95.0%
Simplified95.0%
Taylor expanded in b around inf 65.2%
*-commutative65.2%
Simplified65.2%
Final simplification65.6%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (/ (* t a) c_m))) (t_2 (/ (* x y) c_m)))
(*
c_s
(if (<= z -8.2e+140)
(* -4.0 (* t (/ a c_m)))
(if (<= z -1.36e+41)
(* (/ (* x 9.0) c_m) (/ y z))
(if (<= z -6.2e-61)
t_1
(if (<= z -1.72e-221)
(* b (/ 1.0 (* z c_m)))
(if (<= z 1.35e-198)
(/ (* 9.0 t_2) z)
(if (<= z 3.8e-34)
(/ b (* z c_m))
(if (<= z 0.115) (* t_2 (/ 9.0 z)) t_1))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * ((t * a) / c_m);
double t_2 = (x * y) / c_m;
double tmp;
if (z <= -8.2e+140) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -1.36e+41) {
tmp = ((x * 9.0) / c_m) * (y / z);
} else if (z <= -6.2e-61) {
tmp = t_1;
} else if (z <= -1.72e-221) {
tmp = b * (1.0 / (z * c_m));
} else if (z <= 1.35e-198) {
tmp = (9.0 * t_2) / z;
} else if (z <= 3.8e-34) {
tmp = b / (z * c_m);
} else if (z <= 0.115) {
tmp = t_2 * (9.0 / z);
} else {
tmp = t_1;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * ((t * a) / c_m)
t_2 = (x * y) / c_m
if (z <= (-8.2d+140)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (z <= (-1.36d+41)) then
tmp = ((x * 9.0d0) / c_m) * (y / z)
else if (z <= (-6.2d-61)) then
tmp = t_1
else if (z <= (-1.72d-221)) then
tmp = b * (1.0d0 / (z * c_m))
else if (z <= 1.35d-198) then
tmp = (9.0d0 * t_2) / z
else if (z <= 3.8d-34) then
tmp = b / (z * c_m)
else if (z <= 0.115d0) then
tmp = t_2 * (9.0d0 / z)
else
tmp = t_1
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * ((t * a) / c_m);
double t_2 = (x * y) / c_m;
double tmp;
if (z <= -8.2e+140) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -1.36e+41) {
tmp = ((x * 9.0) / c_m) * (y / z);
} else if (z <= -6.2e-61) {
tmp = t_1;
} else if (z <= -1.72e-221) {
tmp = b * (1.0 / (z * c_m));
} else if (z <= 1.35e-198) {
tmp = (9.0 * t_2) / z;
} else if (z <= 3.8e-34) {
tmp = b / (z * c_m);
} else if (z <= 0.115) {
tmp = t_2 * (9.0 / z);
} else {
tmp = t_1;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = -4.0 * ((t * a) / c_m) t_2 = (x * y) / c_m tmp = 0 if z <= -8.2e+140: tmp = -4.0 * (t * (a / c_m)) elif z <= -1.36e+41: tmp = ((x * 9.0) / c_m) * (y / z) elif z <= -6.2e-61: tmp = t_1 elif z <= -1.72e-221: tmp = b * (1.0 / (z * c_m)) elif z <= 1.35e-198: tmp = (9.0 * t_2) / z elif z <= 3.8e-34: tmp = b / (z * c_m) elif z <= 0.115: tmp = t_2 * (9.0 / z) else: tmp = t_1 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(-4.0 * Float64(Float64(t * a) / c_m)) t_2 = Float64(Float64(x * y) / c_m) tmp = 0.0 if (z <= -8.2e+140) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (z <= -1.36e+41) tmp = Float64(Float64(Float64(x * 9.0) / c_m) * Float64(y / z)); elseif (z <= -6.2e-61) tmp = t_1; elseif (z <= -1.72e-221) tmp = Float64(b * Float64(1.0 / Float64(z * c_m))); elseif (z <= 1.35e-198) tmp = Float64(Float64(9.0 * t_2) / z); elseif (z <= 3.8e-34) tmp = Float64(b / Float64(z * c_m)); elseif (z <= 0.115) tmp = Float64(t_2 * Float64(9.0 / z)); else tmp = t_1; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = -4.0 * ((t * a) / c_m);
t_2 = (x * y) / c_m;
tmp = 0.0;
if (z <= -8.2e+140)
tmp = -4.0 * (t * (a / c_m));
elseif (z <= -1.36e+41)
tmp = ((x * 9.0) / c_m) * (y / z);
elseif (z <= -6.2e-61)
tmp = t_1;
elseif (z <= -1.72e-221)
tmp = b * (1.0 / (z * c_m));
elseif (z <= 1.35e-198)
tmp = (9.0 * t_2) / z;
elseif (z <= 3.8e-34)
tmp = b / (z * c_m);
elseif (z <= 0.115)
tmp = t_2 * (9.0 / z);
else
tmp = t_1;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -8.2e+140], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.36e+41], N[(N[(N[(x * 9.0), $MachinePrecision] / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-61], t$95$1, If[LessEqual[z, -1.72e-221], N[(b * N[(1.0 / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e-198], N[(N[(9.0 * t$95$2), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 3.8e-34], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.115], N[(t$95$2 * N[(9.0 / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{t \cdot a}{c\_m}\\
t_2 := \frac{x \cdot y}{c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+140}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;z \leq -1.36 \cdot 10^{+41}:\\
\;\;\;\;\frac{x \cdot 9}{c\_m} \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.72 \cdot 10^{-221}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c\_m}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-198}:\\
\;\;\;\;\frac{9 \cdot t\_2}{z}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-34}:\\
\;\;\;\;\frac{b}{z \cdot c\_m}\\
\mathbf{elif}\;z \leq 0.115:\\
\;\;\;\;t\_2 \cdot \frac{9}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if z < -8.1999999999999998e140Initial program 51.7%
+-commutative51.7%
associate-+r-51.7%
*-commutative51.7%
associate-*r*52.1%
*-commutative52.1%
associate-+r-52.1%
+-commutative52.1%
associate-*l*52.1%
associate-*l*54.8%
*-commutative54.8%
Simplified54.8%
Taylor expanded in z around 0 51.7%
Taylor expanded in a around inf 57.6%
*-commutative57.6%
associate-/l*67.9%
Simplified67.9%
if -8.1999999999999998e140 < z < -1.35999999999999995e41Initial program 74.2%
+-commutative74.2%
associate-+r-74.2%
*-commutative74.2%
associate-*r*70.0%
*-commutative70.0%
associate-+r-70.0%
+-commutative70.0%
associate-*l*69.9%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in x around inf 47.6%
associate-*r/47.6%
associate-*r*47.6%
*-commutative47.6%
Simplified47.6%
*-commutative47.6%
times-frac62.1%
*-commutative62.1%
Applied egg-rr62.1%
if -1.35999999999999995e41 < z < -6.1999999999999999e-61 or 0.115000000000000005 < z Initial program 69.9%
+-commutative69.9%
associate-+r-69.9%
*-commutative69.9%
associate-*r*71.4%
*-commutative71.4%
associate-+r-71.4%
+-commutative71.4%
associate-*l*71.5%
associate-*l*76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in z around inf 63.5%
if -6.1999999999999999e-61 < z < -1.71999999999999997e-221Initial program 96.0%
+-commutative96.0%
associate-+r-96.0%
*-commutative96.0%
associate-*r*94.6%
*-commutative94.6%
associate-+r-94.6%
+-commutative94.6%
associate-*l*94.6%
associate-*l*90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in b around inf 64.3%
*-commutative64.3%
Simplified64.3%
div-inv64.4%
Applied egg-rr64.4%
if -1.71999999999999997e-221 < z < 1.3500000000000001e-198Initial program 98.2%
+-commutative98.2%
associate-+r-98.2%
*-commutative98.2%
associate-*r*98.2%
*-commutative98.2%
associate-+r-98.2%
+-commutative98.2%
associate-*l*98.3%
associate-*l*92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in y around inf 61.5%
Taylor expanded in z around 0 86.4%
Taylor expanded in y around inf 72.7%
if 1.3500000000000001e-198 < z < 3.8000000000000001e-34Initial program 97.5%
+-commutative97.5%
associate-+r-97.5%
*-commutative97.5%
associate-*r*97.5%
*-commutative97.5%
associate-+r-97.5%
+-commutative97.5%
associate-*l*97.5%
associate-*l*95.0%
*-commutative95.0%
Simplified95.0%
Taylor expanded in b around inf 65.2%
*-commutative65.2%
Simplified65.2%
if 3.8000000000000001e-34 < z < 0.115000000000000005Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
*-commutative99.9%
associate-*r*99.7%
*-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate-*l*99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 60.8%
associate-*r/60.8%
associate-*r*61.0%
*-commutative61.0%
Simplified61.0%
associate-*l*60.8%
times-frac61.1%
Applied egg-rr61.1%
Final simplification65.6%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -8.2e+140)
(* -4.0 (* t (/ a c_m)))
(if (<= z -1.45e+41)
(* (/ (* x 9.0) c_m) (/ y z))
(if (or (<= z -8e-87) (not (<= z 0.058)))
(/ (- (/ b z) (* a (* 4.0 t))) c_m)
(/ (+ b (* x (* 9.0 y))) (* z c_m)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -8.2e+140) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -1.45e+41) {
tmp = ((x * 9.0) / c_m) * (y / z);
} else if ((z <= -8e-87) || !(z <= 0.058)) {
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
} else {
tmp = (b + (x * (9.0 * y))) / (z * c_m);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if (z <= (-8.2d+140)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (z <= (-1.45d+41)) then
tmp = ((x * 9.0d0) / c_m) * (y / z)
else if ((z <= (-8d-87)) .or. (.not. (z <= 0.058d0))) then
tmp = ((b / z) - (a * (4.0d0 * t))) / c_m
else
tmp = (b + (x * (9.0d0 * y))) / (z * c_m)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -8.2e+140) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -1.45e+41) {
tmp = ((x * 9.0) / c_m) * (y / z);
} else if ((z <= -8e-87) || !(z <= 0.058)) {
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
} else {
tmp = (b + (x * (9.0 * y))) / (z * c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if z <= -8.2e+140: tmp = -4.0 * (t * (a / c_m)) elif z <= -1.45e+41: tmp = ((x * 9.0) / c_m) * (y / z) elif (z <= -8e-87) or not (z <= 0.058): tmp = ((b / z) - (a * (4.0 * t))) / c_m else: tmp = (b + (x * (9.0 * y))) / (z * c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (z <= -8.2e+140) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (z <= -1.45e+41) tmp = Float64(Float64(Float64(x * 9.0) / c_m) * Float64(y / z)); elseif ((z <= -8e-87) || !(z <= 0.058)) tmp = Float64(Float64(Float64(b / z) - Float64(a * Float64(4.0 * t))) / c_m); else tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c_m)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (z <= -8.2e+140)
tmp = -4.0 * (t * (a / c_m));
elseif (z <= -1.45e+41)
tmp = ((x * 9.0) / c_m) * (y / z);
elseif ((z <= -8e-87) || ~((z <= 0.058)))
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
else
tmp = (b + (x * (9.0 * y))) / (z * c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -8.2e+140], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.45e+41], N[(N[(N[(x * 9.0), $MachinePrecision] / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -8e-87], N[Not[LessEqual[z, 0.058]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] - N[(a * N[(4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+140}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{+41}:\\
\;\;\;\;\frac{x \cdot 9}{c\_m} \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-87} \lor \neg \left(z \leq 0.058\right):\\
\;\;\;\;\frac{\frac{b}{z} - a \cdot \left(4 \cdot t\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c\_m}\\
\end{array}
\end{array}
if z < -8.1999999999999998e140Initial program 51.7%
+-commutative51.7%
associate-+r-51.7%
*-commutative51.7%
associate-*r*52.1%
*-commutative52.1%
associate-+r-52.1%
+-commutative52.1%
associate-*l*52.1%
associate-*l*54.8%
*-commutative54.8%
Simplified54.8%
Taylor expanded in z around 0 51.7%
Taylor expanded in a around inf 57.6%
*-commutative57.6%
associate-/l*67.9%
Simplified67.9%
if -8.1999999999999998e140 < z < -1.44999999999999994e41Initial program 74.2%
+-commutative74.2%
associate-+r-74.2%
*-commutative74.2%
associate-*r*70.0%
*-commutative70.0%
associate-+r-70.0%
+-commutative70.0%
associate-*l*69.9%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in x around inf 47.6%
associate-*r/47.6%
associate-*r*47.6%
*-commutative47.6%
Simplified47.6%
*-commutative47.6%
times-frac62.1%
*-commutative62.1%
Applied egg-rr62.1%
if -1.44999999999999994e41 < z < -8.00000000000000014e-87 or 0.0580000000000000029 < z Initial program 73.3%
+-commutative73.3%
associate-+r-73.3%
*-commutative73.3%
associate-*r*74.7%
*-commutative74.7%
associate-+r-74.7%
+-commutative74.7%
associate-*l*74.7%
associate-*l*77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in y around inf 65.6%
Taylor expanded in z around -inf 68.9%
mul-1-neg68.9%
unsub-neg68.9%
*-commutative68.9%
associate-/l*70.3%
*-commutative70.3%
associate-/l*71.4%
mul-1-neg71.4%
unsub-neg71.4%
associate-*r/71.3%
*-commutative71.3%
associate-/l*71.3%
associate-/r*74.3%
Simplified74.3%
Taylor expanded in x around 0 72.6%
mul-1-neg72.6%
associate-/r*69.1%
distribute-neg-frac269.1%
Simplified69.1%
Taylor expanded in c around -inf 76.6%
mul-1-neg76.6%
distribute-neg-frac276.6%
*-commutative76.6%
associate-*r*76.6%
Simplified76.6%
if -8.00000000000000014e-87 < z < 0.0580000000000000029Initial program 97.3%
+-commutative97.3%
associate-+r-97.3%
*-commutative97.3%
associate-*r*96.7%
*-commutative96.7%
associate-+r-96.7%
+-commutative96.7%
associate-*l*96.7%
associate-*l*93.5%
*-commutative93.5%
Simplified93.5%
Taylor expanded in x around inf 87.0%
associate-*r*87.0%
*-commutative87.0%
associate-*r*87.0%
Simplified87.0%
Final simplification79.3%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -4e+141)
(* -4.0 (* t (/ a c_m)))
(if (<= z -1.45e+41)
(/ (+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)) z)
(if (or (<= z -6.6e-88) (not (<= z 0.007)))
(/ (- (/ b z) (* a (* 4.0 t))) c_m)
(/ (+ b (* x (* 9.0 y))) (* z c_m)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -4e+141) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -1.45e+41) {
tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z;
} else if ((z <= -6.6e-88) || !(z <= 0.007)) {
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
} else {
tmp = (b + (x * (9.0 * y))) / (z * c_m);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if (z <= (-4d+141)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (z <= (-1.45d+41)) then
tmp = ((9.0d0 * ((x * y) / c_m)) + (b / c_m)) / z
else if ((z <= (-6.6d-88)) .or. (.not. (z <= 0.007d0))) then
tmp = ((b / z) - (a * (4.0d0 * t))) / c_m
else
tmp = (b + (x * (9.0d0 * y))) / (z * c_m)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -4e+141) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -1.45e+41) {
tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z;
} else if ((z <= -6.6e-88) || !(z <= 0.007)) {
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
} else {
tmp = (b + (x * (9.0 * y))) / (z * c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if z <= -4e+141: tmp = -4.0 * (t * (a / c_m)) elif z <= -1.45e+41: tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z elif (z <= -6.6e-88) or not (z <= 0.007): tmp = ((b / z) - (a * (4.0 * t))) / c_m else: tmp = (b + (x * (9.0 * y))) / (z * c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (z <= -4e+141) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (z <= -1.45e+41) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m)) / z); elseif ((z <= -6.6e-88) || !(z <= 0.007)) tmp = Float64(Float64(Float64(b / z) - Float64(a * Float64(4.0 * t))) / c_m); else tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c_m)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (z <= -4e+141)
tmp = -4.0 * (t * (a / c_m));
elseif (z <= -1.45e+41)
tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z;
elseif ((z <= -6.6e-88) || ~((z <= 0.007)))
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
else
tmp = (b + (x * (9.0 * y))) / (z * c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -4e+141], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.45e+41], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[z, -6.6e-88], N[Not[LessEqual[z, 0.007]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] - N[(a * N[(4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+141}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{+41}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c\_m} + \frac{b}{c\_m}}{z}\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-88} \lor \neg \left(z \leq 0.007\right):\\
\;\;\;\;\frac{\frac{b}{z} - a \cdot \left(4 \cdot t\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c\_m}\\
\end{array}
\end{array}
if z < -4.00000000000000007e141Initial program 51.7%
+-commutative51.7%
associate-+r-51.7%
*-commutative51.7%
associate-*r*52.1%
*-commutative52.1%
associate-+r-52.1%
+-commutative52.1%
associate-*l*52.1%
associate-*l*54.8%
*-commutative54.8%
Simplified54.8%
Taylor expanded in z around 0 51.7%
Taylor expanded in a around inf 57.6%
*-commutative57.6%
associate-/l*67.9%
Simplified67.9%
if -4.00000000000000007e141 < z < -1.44999999999999994e41Initial program 74.2%
+-commutative74.2%
associate-+r-74.2%
*-commutative74.2%
associate-*r*70.0%
*-commutative70.0%
associate-+r-70.0%
+-commutative70.0%
associate-*l*69.9%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in z around 0 70.3%
Taylor expanded in a around 0 68.7%
if -1.44999999999999994e41 < z < -6.59999999999999987e-88 or 0.00700000000000000015 < z Initial program 73.3%
+-commutative73.3%
associate-+r-73.3%
*-commutative73.3%
associate-*r*74.7%
*-commutative74.7%
associate-+r-74.7%
+-commutative74.7%
associate-*l*74.7%
associate-*l*77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in y around inf 65.6%
Taylor expanded in z around -inf 68.9%
mul-1-neg68.9%
unsub-neg68.9%
*-commutative68.9%
associate-/l*70.3%
*-commutative70.3%
associate-/l*71.4%
mul-1-neg71.4%
unsub-neg71.4%
associate-*r/71.3%
*-commutative71.3%
associate-/l*71.3%
associate-/r*74.3%
Simplified74.3%
Taylor expanded in x around 0 72.6%
mul-1-neg72.6%
associate-/r*69.1%
distribute-neg-frac269.1%
Simplified69.1%
Taylor expanded in c around -inf 76.6%
mul-1-neg76.6%
distribute-neg-frac276.6%
*-commutative76.6%
associate-*r*76.6%
Simplified76.6%
if -6.59999999999999987e-88 < z < 0.00700000000000000015Initial program 97.3%
+-commutative97.3%
associate-+r-97.3%
*-commutative97.3%
associate-*r*96.7%
*-commutative96.7%
associate-+r-96.7%
+-commutative96.7%
associate-*l*96.7%
associate-*l*93.5%
*-commutative93.5%
Simplified93.5%
Taylor expanded in x around inf 87.0%
associate-*r*87.0%
*-commutative87.0%
associate-*r*87.0%
Simplified87.0%
Final simplification79.9%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ (+ b (* x (* 9.0 y))) (* z c_m)))
(t_2 (* -4.0 (* t (/ a c_m)))))
(*
c_s
(if (<= z -9.2e+140)
t_2
(if (<= z -8.2e+35)
t_1
(if (<= z -8e-87)
t_2
(if (<= z 4e+80) t_1 (* -4.0 (/ (* t a) c_m)))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (b + (x * (9.0 * y))) / (z * c_m);
double t_2 = -4.0 * (t * (a / c_m));
double tmp;
if (z <= -9.2e+140) {
tmp = t_2;
} else if (z <= -8.2e+35) {
tmp = t_1;
} else if (z <= -8e-87) {
tmp = t_2;
} else if (z <= 4e+80) {
tmp = t_1;
} else {
tmp = -4.0 * ((t * a) / c_m);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b + (x * (9.0d0 * y))) / (z * c_m)
t_2 = (-4.0d0) * (t * (a / c_m))
if (z <= (-9.2d+140)) then
tmp = t_2
else if (z <= (-8.2d+35)) then
tmp = t_1
else if (z <= (-8d-87)) then
tmp = t_2
else if (z <= 4d+80) then
tmp = t_1
else
tmp = (-4.0d0) * ((t * a) / c_m)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (b + (x * (9.0 * y))) / (z * c_m);
double t_2 = -4.0 * (t * (a / c_m));
double tmp;
if (z <= -9.2e+140) {
tmp = t_2;
} else if (z <= -8.2e+35) {
tmp = t_1;
} else if (z <= -8e-87) {
tmp = t_2;
} else if (z <= 4e+80) {
tmp = t_1;
} else {
tmp = -4.0 * ((t * a) / c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = (b + (x * (9.0 * y))) / (z * c_m) t_2 = -4.0 * (t * (a / c_m)) tmp = 0 if z <= -9.2e+140: tmp = t_2 elif z <= -8.2e+35: tmp = t_1 elif z <= -8e-87: tmp = t_2 elif z <= 4e+80: tmp = t_1 else: tmp = -4.0 * ((t * a) / c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c_m)) t_2 = Float64(-4.0 * Float64(t * Float64(a / c_m))) tmp = 0.0 if (z <= -9.2e+140) tmp = t_2; elseif (z <= -8.2e+35) tmp = t_1; elseif (z <= -8e-87) tmp = t_2; elseif (z <= 4e+80) tmp = t_1; else tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = (b + (x * (9.0 * y))) / (z * c_m);
t_2 = -4.0 * (t * (a / c_m));
tmp = 0.0;
if (z <= -9.2e+140)
tmp = t_2;
elseif (z <= -8.2e+35)
tmp = t_1;
elseif (z <= -8e-87)
tmp = t_2;
elseif (z <= 4e+80)
tmp = t_1;
else
tmp = -4.0 * ((t * a) / c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -9.2e+140], t$95$2, If[LessEqual[z, -8.2e+35], t$95$1, If[LessEqual[z, -8e-87], t$95$2, If[LessEqual[z, 4e+80], t$95$1, N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c\_m}\\
t_2 := -4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+140}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-87}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\end{array}
\end{array}
\end{array}
if z < -9.19999999999999961e140 or -8.1999999999999997e35 < z < -8.00000000000000014e-87Initial program 67.2%
+-commutative67.2%
associate-+r-67.2%
*-commutative67.2%
associate-*r*70.5%
*-commutative70.5%
associate-+r-70.5%
+-commutative70.5%
associate-*l*70.6%
associate-*l*70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in z around 0 65.7%
Taylor expanded in a around inf 58.0%
*-commutative58.0%
associate-/l*64.1%
Simplified64.1%
if -9.19999999999999961e140 < z < -8.1999999999999997e35 or -8.00000000000000014e-87 < z < 4e80Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
*-commutative93.5%
associate-*r*92.5%
*-commutative92.5%
associate-+r-92.5%
+-commutative92.5%
associate-*l*92.5%
associate-*l*90.5%
*-commutative90.5%
Simplified90.5%
Taylor expanded in x around inf 82.1%
associate-*r*82.1%
*-commutative82.1%
associate-*r*82.1%
Simplified82.1%
if 4e80 < z Initial program 57.1%
+-commutative57.1%
associate-+r-57.1%
*-commutative57.1%
associate-*r*54.4%
*-commutative54.4%
associate-+r-54.4%
+-commutative54.4%
associate-*l*54.4%
associate-*l*63.1%
*-commutative63.1%
Simplified63.1%
Taylor expanded in z around inf 66.0%
Final simplification75.6%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -3.6e+141)
(* -4.0 (* t (/ a c_m)))
(if (<= z -1.35e+41)
(/ (+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)) z)
(if (<= z -8e-87)
(/ (- b (* (* z t) (* 4.0 a))) (* z c_m))
(if (<= z 0.096)
(/ (+ b (* x (* 9.0 y))) (* z c_m))
(/ (- (/ b z) (* a (* 4.0 t))) c_m)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -3.6e+141) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -1.35e+41) {
tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z;
} else if (z <= -8e-87) {
tmp = (b - ((z * t) * (4.0 * a))) / (z * c_m);
} else if (z <= 0.096) {
tmp = (b + (x * (9.0 * y))) / (z * c_m);
} else {
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if (z <= (-3.6d+141)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (z <= (-1.35d+41)) then
tmp = ((9.0d0 * ((x * y) / c_m)) + (b / c_m)) / z
else if (z <= (-8d-87)) then
tmp = (b - ((z * t) * (4.0d0 * a))) / (z * c_m)
else if (z <= 0.096d0) then
tmp = (b + (x * (9.0d0 * y))) / (z * c_m)
else
tmp = ((b / z) - (a * (4.0d0 * t))) / c_m
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -3.6e+141) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= -1.35e+41) {
tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z;
} else if (z <= -8e-87) {
tmp = (b - ((z * t) * (4.0 * a))) / (z * c_m);
} else if (z <= 0.096) {
tmp = (b + (x * (9.0 * y))) / (z * c_m);
} else {
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if z <= -3.6e+141: tmp = -4.0 * (t * (a / c_m)) elif z <= -1.35e+41: tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z elif z <= -8e-87: tmp = (b - ((z * t) * (4.0 * a))) / (z * c_m) elif z <= 0.096: tmp = (b + (x * (9.0 * y))) / (z * c_m) else: tmp = ((b / z) - (a * (4.0 * t))) / c_m return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (z <= -3.6e+141) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (z <= -1.35e+41) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m)) / z); elseif (z <= -8e-87) tmp = Float64(Float64(b - Float64(Float64(z * t) * Float64(4.0 * a))) / Float64(z * c_m)); elseif (z <= 0.096) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c_m)); else tmp = Float64(Float64(Float64(b / z) - Float64(a * Float64(4.0 * t))) / c_m); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (z <= -3.6e+141)
tmp = -4.0 * (t * (a / c_m));
elseif (z <= -1.35e+41)
tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z;
elseif (z <= -8e-87)
tmp = (b - ((z * t) * (4.0 * a))) / (z * c_m);
elseif (z <= 0.096)
tmp = (b + (x * (9.0 * y))) / (z * c_m);
else
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -3.6e+141], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.35e+41], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -8e-87], N[(N[(b - N[(N[(z * t), $MachinePrecision] * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.096], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / z), $MachinePrecision] - N[(a * N[(4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+141}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{+41}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c\_m} + \frac{b}{c\_m}}{z}\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-87}:\\
\;\;\;\;\frac{b - \left(z \cdot t\right) \cdot \left(4 \cdot a\right)}{z \cdot c\_m}\\
\mathbf{elif}\;z \leq 0.096:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} - a \cdot \left(4 \cdot t\right)}{c\_m}\\
\end{array}
\end{array}
if z < -3.6000000000000001e141Initial program 51.7%
+-commutative51.7%
associate-+r-51.7%
*-commutative51.7%
associate-*r*52.1%
*-commutative52.1%
associate-+r-52.1%
+-commutative52.1%
associate-*l*52.1%
associate-*l*54.8%
*-commutative54.8%
Simplified54.8%
Taylor expanded in z around 0 51.7%
Taylor expanded in a around inf 57.6%
*-commutative57.6%
associate-/l*67.9%
Simplified67.9%
if -3.6000000000000001e141 < z < -1.35e41Initial program 74.2%
+-commutative74.2%
associate-+r-74.2%
*-commutative74.2%
associate-*r*70.0%
*-commutative70.0%
associate-+r-70.0%
+-commutative70.0%
associate-*l*69.9%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in z around 0 70.3%
Taylor expanded in a around 0 68.7%
if -1.35e41 < z < -8.00000000000000014e-87Initial program 89.2%
+-commutative89.2%
associate-+r-89.2%
*-commutative89.2%
associate-*r*96.2%
*-commutative96.2%
associate-+r-96.2%
+-commutative96.2%
associate-*l*96.2%
associate-*l*92.8%
*-commutative92.8%
Simplified92.8%
Taylor expanded in x around 0 74.7%
associate-*r*74.7%
*-commutative74.7%
Simplified74.7%
if -8.00000000000000014e-87 < z < 0.096000000000000002Initial program 97.3%
+-commutative97.3%
associate-+r-97.3%
*-commutative97.3%
associate-*r*96.7%
*-commutative96.7%
associate-+r-96.7%
+-commutative96.7%
associate-*l*96.7%
associate-*l*93.5%
*-commutative93.5%
Simplified93.5%
Taylor expanded in x around inf 87.0%
associate-*r*87.0%
*-commutative87.0%
associate-*r*87.0%
Simplified87.0%
if 0.096000000000000002 < z Initial program 63.1%
+-commutative63.1%
associate-+r-63.1%
*-commutative63.1%
associate-*r*60.8%
*-commutative60.8%
associate-+r-60.8%
+-commutative60.8%
associate-*l*60.9%
associate-*l*68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in y around inf 64.9%
Taylor expanded in z around -inf 65.3%
mul-1-neg65.3%
unsub-neg65.3%
*-commutative65.3%
associate-/l*67.6%
*-commutative67.6%
associate-/l*71.7%
mul-1-neg71.7%
unsub-neg71.7%
associate-*r/71.6%
*-commutative71.6%
associate-/l*71.6%
associate-/r*74.0%
Simplified74.0%
Taylor expanded in x around 0 71.3%
mul-1-neg71.3%
associate-/r*65.6%
distribute-neg-frac265.6%
Simplified65.6%
Taylor expanded in c around -inf 78.0%
mul-1-neg78.0%
distribute-neg-frac278.0%
*-commutative78.0%
associate-*r*78.0%
Simplified78.0%
Final simplification79.9%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (+ (* -4.0 (* t (/ a c_m))) (/ (/ b c_m) z))))
(*
c_s
(if (<= z -8.2e+140)
t_1
(if (<= z -1.08e+41)
(/ (+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)) z)
(if (<= z -8e-87)
t_1
(if (<= z 0.78)
(/ (+ b (* x (* 9.0 y))) (* z c_m))
(/ (- (/ b z) (* a (* 4.0 t))) c_m))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (-4.0 * (t * (a / c_m))) + ((b / c_m) / z);
double tmp;
if (z <= -8.2e+140) {
tmp = t_1;
} else if (z <= -1.08e+41) {
tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z;
} else if (z <= -8e-87) {
tmp = t_1;
} else if (z <= 0.78) {
tmp = (b + (x * (9.0 * y))) / (z * c_m);
} else {
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: tmp
t_1 = ((-4.0d0) * (t * (a / c_m))) + ((b / c_m) / z)
if (z <= (-8.2d+140)) then
tmp = t_1
else if (z <= (-1.08d+41)) then
tmp = ((9.0d0 * ((x * y) / c_m)) + (b / c_m)) / z
else if (z <= (-8d-87)) then
tmp = t_1
else if (z <= 0.78d0) then
tmp = (b + (x * (9.0d0 * y))) / (z * c_m)
else
tmp = ((b / z) - (a * (4.0d0 * t))) / c_m
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (-4.0 * (t * (a / c_m))) + ((b / c_m) / z);
double tmp;
if (z <= -8.2e+140) {
tmp = t_1;
} else if (z <= -1.08e+41) {
tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z;
} else if (z <= -8e-87) {
tmp = t_1;
} else if (z <= 0.78) {
tmp = (b + (x * (9.0 * y))) / (z * c_m);
} else {
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = (-4.0 * (t * (a / c_m))) + ((b / c_m) / z) tmp = 0 if z <= -8.2e+140: tmp = t_1 elif z <= -1.08e+41: tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z elif z <= -8e-87: tmp = t_1 elif z <= 0.78: tmp = (b + (x * (9.0 * y))) / (z * c_m) else: tmp = ((b / z) - (a * (4.0 * t))) / c_m return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(-4.0 * Float64(t * Float64(a / c_m))) + Float64(Float64(b / c_m) / z)) tmp = 0.0 if (z <= -8.2e+140) tmp = t_1; elseif (z <= -1.08e+41) tmp = Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m)) / z); elseif (z <= -8e-87) tmp = t_1; elseif (z <= 0.78) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c_m)); else tmp = Float64(Float64(Float64(b / z) - Float64(a * Float64(4.0 * t))) / c_m); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = (-4.0 * (t * (a / c_m))) + ((b / c_m) / z);
tmp = 0.0;
if (z <= -8.2e+140)
tmp = t_1;
elseif (z <= -1.08e+41)
tmp = ((9.0 * ((x * y) / c_m)) + (b / c_m)) / z;
elseif (z <= -8e-87)
tmp = t_1;
elseif (z <= 0.78)
tmp = (b + (x * (9.0 * y))) / (z * c_m);
else
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -8.2e+140], t$95$1, If[LessEqual[z, -1.08e+41], N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -8e-87], t$95$1, If[LessEqual[z, 0.78], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / z), $MachinePrecision] - N[(a * N[(4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c\_m}\right) + \frac{\frac{b}{c\_m}}{z}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.08 \cdot 10^{+41}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c\_m} + \frac{b}{c\_m}}{z}\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.78:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} - a \cdot \left(4 \cdot t\right)}{c\_m}\\
\end{array}
\end{array}
\end{array}
if z < -8.1999999999999998e140 or -1.08000000000000004e41 < z < -8.00000000000000014e-87Initial program 67.8%
+-commutative67.8%
associate-+r-67.8%
*-commutative67.8%
associate-*r*71.0%
*-commutative71.0%
associate-+r-71.0%
+-commutative71.0%
associate-*l*71.0%
associate-*l*71.1%
*-commutative71.1%
Simplified71.1%
Taylor expanded in y around inf 64.6%
Taylor expanded in z around -inf 69.9%
mul-1-neg69.9%
unsub-neg69.9%
*-commutative69.9%
associate-/l*75.8%
*-commutative75.8%
associate-/l*75.8%
mul-1-neg75.8%
unsub-neg75.8%
associate-*r/75.8%
*-commutative75.8%
associate-/l*75.9%
associate-/r*75.9%
Simplified75.9%
Taylor expanded in x around 0 73.9%
mul-1-neg73.9%
associate-/r*75.3%
distribute-neg-frac275.3%
Simplified75.3%
if -8.1999999999999998e140 < z < -1.08000000000000004e41Initial program 74.2%
+-commutative74.2%
associate-+r-74.2%
*-commutative74.2%
associate-*r*70.0%
*-commutative70.0%
associate-+r-70.0%
+-commutative70.0%
associate-*l*69.9%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in z around 0 70.3%
Taylor expanded in a around 0 68.7%
if -8.00000000000000014e-87 < z < 0.78000000000000003Initial program 97.3%
+-commutative97.3%
associate-+r-97.3%
*-commutative97.3%
associate-*r*96.7%
*-commutative96.7%
associate-+r-96.7%
+-commutative96.7%
associate-*l*96.7%
associate-*l*93.5%
*-commutative93.5%
Simplified93.5%
Taylor expanded in x around inf 87.0%
associate-*r*87.0%
*-commutative87.0%
associate-*r*87.0%
Simplified87.0%
if 0.78000000000000003 < z Initial program 63.1%
+-commutative63.1%
associate-+r-63.1%
*-commutative63.1%
associate-*r*60.8%
*-commutative60.8%
associate-+r-60.8%
+-commutative60.8%
associate-*l*60.9%
associate-*l*68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in y around inf 64.9%
Taylor expanded in z around -inf 65.3%
mul-1-neg65.3%
unsub-neg65.3%
*-commutative65.3%
associate-/l*67.6%
*-commutative67.6%
associate-/l*71.7%
mul-1-neg71.7%
unsub-neg71.7%
associate-*r/71.6%
*-commutative71.6%
associate-/l*71.6%
associate-/r*74.0%
Simplified74.0%
Taylor expanded in x around 0 71.3%
mul-1-neg71.3%
associate-/r*65.6%
distribute-neg-frac265.6%
Simplified65.6%
Taylor expanded in c around -inf 78.0%
mul-1-neg78.0%
distribute-neg-frac278.0%
*-commutative78.0%
associate-*r*78.0%
Simplified78.0%
Final simplification81.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (+ (* -4.0 (* t (/ a c_m))) (/ (/ b c_m) z))))
(*
c_s
(if (<= z -6.8e+137)
t_1
(if (<= z -1.4e+41)
(/ (* y (+ (* 9.0 (/ x c_m)) (/ b (* y c_m)))) z)
(if (<= z -1.25e-87)
t_1
(if (<= z 0.01)
(/ (+ b (* x (* 9.0 y))) (* z c_m))
(/ (- (/ b z) (* a (* 4.0 t))) c_m))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (-4.0 * (t * (a / c_m))) + ((b / c_m) / z);
double tmp;
if (z <= -6.8e+137) {
tmp = t_1;
} else if (z <= -1.4e+41) {
tmp = (y * ((9.0 * (x / c_m)) + (b / (y * c_m)))) / z;
} else if (z <= -1.25e-87) {
tmp = t_1;
} else if (z <= 0.01) {
tmp = (b + (x * (9.0 * y))) / (z * c_m);
} else {
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: t_1
real(8) :: tmp
t_1 = ((-4.0d0) * (t * (a / c_m))) + ((b / c_m) / z)
if (z <= (-6.8d+137)) then
tmp = t_1
else if (z <= (-1.4d+41)) then
tmp = (y * ((9.0d0 * (x / c_m)) + (b / (y * c_m)))) / z
else if (z <= (-1.25d-87)) then
tmp = t_1
else if (z <= 0.01d0) then
tmp = (b + (x * (9.0d0 * y))) / (z * c_m)
else
tmp = ((b / z) - (a * (4.0d0 * t))) / c_m
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (-4.0 * (t * (a / c_m))) + ((b / c_m) / z);
double tmp;
if (z <= -6.8e+137) {
tmp = t_1;
} else if (z <= -1.4e+41) {
tmp = (y * ((9.0 * (x / c_m)) + (b / (y * c_m)))) / z;
} else if (z <= -1.25e-87) {
tmp = t_1;
} else if (z <= 0.01) {
tmp = (b + (x * (9.0 * y))) / (z * c_m);
} else {
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = (-4.0 * (t * (a / c_m))) + ((b / c_m) / z) tmp = 0 if z <= -6.8e+137: tmp = t_1 elif z <= -1.4e+41: tmp = (y * ((9.0 * (x / c_m)) + (b / (y * c_m)))) / z elif z <= -1.25e-87: tmp = t_1 elif z <= 0.01: tmp = (b + (x * (9.0 * y))) / (z * c_m) else: tmp = ((b / z) - (a * (4.0 * t))) / c_m return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(-4.0 * Float64(t * Float64(a / c_m))) + Float64(Float64(b / c_m) / z)) tmp = 0.0 if (z <= -6.8e+137) tmp = t_1; elseif (z <= -1.4e+41) tmp = Float64(Float64(y * Float64(Float64(9.0 * Float64(x / c_m)) + Float64(b / Float64(y * c_m)))) / z); elseif (z <= -1.25e-87) tmp = t_1; elseif (z <= 0.01) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c_m)); else tmp = Float64(Float64(Float64(b / z) - Float64(a * Float64(4.0 * t))) / c_m); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = (-4.0 * (t * (a / c_m))) + ((b / c_m) / z);
tmp = 0.0;
if (z <= -6.8e+137)
tmp = t_1;
elseif (z <= -1.4e+41)
tmp = (y * ((9.0 * (x / c_m)) + (b / (y * c_m)))) / z;
elseif (z <= -1.25e-87)
tmp = t_1;
elseif (z <= 0.01)
tmp = (b + (x * (9.0 * y))) / (z * c_m);
else
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -6.8e+137], t$95$1, If[LessEqual[z, -1.4e+41], N[(N[(y * N[(N[(9.0 * N[(x / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / N[(y * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -1.25e-87], t$95$1, If[LessEqual[z, 0.01], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / z), $MachinePrecision] - N[(a * N[(4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c\_m}\right) + \frac{\frac{b}{c\_m}}{z}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{+41}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{c\_m} + \frac{b}{y \cdot c\_m}\right)}{z}\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.01:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} - a \cdot \left(4 \cdot t\right)}{c\_m}\\
\end{array}
\end{array}
\end{array}
if z < -6.79999999999999973e137 or -1.4e41 < z < -1.25000000000000011e-87Initial program 68.3%
+-commutative68.3%
associate-+r-68.3%
*-commutative68.3%
associate-*r*71.4%
*-commutative71.4%
associate-+r-71.4%
+-commutative71.4%
associate-*l*71.5%
associate-*l*71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in y around inf 63.6%
Taylor expanded in z around -inf 70.3%
mul-1-neg70.3%
unsub-neg70.3%
*-commutative70.3%
associate-/l*76.2%
*-commutative76.2%
associate-/l*76.1%
mul-1-neg76.1%
unsub-neg76.1%
associate-*r/76.2%
*-commutative76.2%
associate-/l*76.2%
associate-/r*76.3%
Simplified76.3%
Taylor expanded in x around 0 74.3%
mul-1-neg74.3%
associate-/r*75.7%
distribute-neg-frac275.7%
Simplified75.7%
if -6.79999999999999973e137 < z < -1.4e41Initial program 73.0%
+-commutative73.0%
associate-+r-73.0%
*-commutative73.0%
associate-*r*68.6%
*-commutative68.6%
associate-+r-68.6%
+-commutative68.6%
associate-*l*68.5%
associate-*l*72.9%
*-commutative72.9%
Simplified72.9%
Taylor expanded in y around inf 69.0%
Taylor expanded in z around 0 76.0%
if -1.25000000000000011e-87 < z < 0.0100000000000000002Initial program 97.3%
+-commutative97.3%
associate-+r-97.3%
*-commutative97.3%
associate-*r*96.7%
*-commutative96.7%
associate-+r-96.7%
+-commutative96.7%
associate-*l*96.7%
associate-*l*93.5%
*-commutative93.5%
Simplified93.5%
Taylor expanded in x around inf 87.0%
associate-*r*87.0%
*-commutative87.0%
associate-*r*87.0%
Simplified87.0%
if 0.0100000000000000002 < z Initial program 63.1%
+-commutative63.1%
associate-+r-63.1%
*-commutative63.1%
associate-*r*60.8%
*-commutative60.8%
associate-+r-60.8%
+-commutative60.8%
associate-*l*60.9%
associate-*l*68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in y around inf 64.9%
Taylor expanded in z around -inf 65.3%
mul-1-neg65.3%
unsub-neg65.3%
*-commutative65.3%
associate-/l*67.6%
*-commutative67.6%
associate-/l*71.7%
mul-1-neg71.7%
unsub-neg71.7%
associate-*r/71.6%
*-commutative71.6%
associate-/l*71.6%
associate-/r*74.0%
Simplified74.0%
Taylor expanded in x around 0 71.3%
mul-1-neg71.3%
associate-/r*65.6%
distribute-neg-frac265.6%
Simplified65.6%
Taylor expanded in c around -inf 78.0%
mul-1-neg78.0%
distribute-neg-frac278.0%
*-commutative78.0%
associate-*r*78.0%
Simplified78.0%
Final simplification81.8%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -1e+86)
(- (* -4.0 (* t (/ a c_m))) (* -9.0 (* x (/ (/ y c_m) z))))
(if (<= z 7.2e+164)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* z c_m))
(/ (- (/ b z) (* a (* 4.0 t))) c_m)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -1e+86) {
tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z)));
} else if (z <= 7.2e+164) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
} else {
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if (z <= (-1d+86)) then
tmp = ((-4.0d0) * (t * (a / c_m))) - ((-9.0d0) * (x * ((y / c_m) / z)))
else if (z <= 7.2d+164) then
tmp = (b + ((x * (9.0d0 * y)) - ((z * 4.0d0) * (t * a)))) / (z * c_m)
else
tmp = ((b / z) - (a * (4.0d0 * t))) / c_m
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -1e+86) {
tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z)));
} else if (z <= 7.2e+164) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
} else {
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if z <= -1e+86: tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z))) elif z <= 7.2e+164: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m) else: tmp = ((b / z) - (a * (4.0 * t))) / c_m return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (z <= -1e+86) tmp = Float64(Float64(-4.0 * Float64(t * Float64(a / c_m))) - Float64(-9.0 * Float64(x * Float64(Float64(y / c_m) / z)))); elseif (z <= 7.2e+164) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c_m)); else tmp = Float64(Float64(Float64(b / z) - Float64(a * Float64(4.0 * t))) / c_m); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (z <= -1e+86)
tmp = (-4.0 * (t * (a / c_m))) - (-9.0 * (x * ((y / c_m) / z)));
elseif (z <= 7.2e+164)
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
else
tmp = ((b / z) - (a * (4.0 * t))) / c_m;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -1e+86], N[(N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+164], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / z), $MachinePrecision] - N[(a * N[(4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+86}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right) - -9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+164}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} - a \cdot \left(4 \cdot t\right)}{c\_m}\\
\end{array}
\end{array}
if z < -1e86Initial program 56.4%
+-commutative56.4%
associate-+r-56.4%
*-commutative56.4%
associate-*r*56.7%
*-commutative56.7%
associate-+r-56.7%
+-commutative56.7%
associate-*l*56.6%
associate-*l*58.6%
*-commutative58.6%
Simplified58.6%
Taylor expanded in y around inf 62.8%
Taylor expanded in z around -inf 73.1%
mul-1-neg73.1%
unsub-neg73.1%
*-commutative73.1%
associate-/l*78.7%
*-commutative78.7%
associate-/l*80.9%
mul-1-neg80.9%
unsub-neg80.9%
associate-*r/81.1%
*-commutative81.1%
associate-/l*81.1%
associate-/r*77.0%
Simplified77.0%
Taylor expanded in x around inf 62.3%
associate-/l*66.7%
associate-/r*70.4%
Simplified70.4%
if -1e86 < z < 7.19999999999999981e164Initial program 93.3%
+-commutative93.3%
associate-+r-93.3%
*-commutative93.3%
associate-*r*93.4%
*-commutative93.4%
associate-+r-93.4%
+-commutative93.4%
associate-*l*93.4%
associate-*l*91.2%
*-commutative91.2%
Simplified91.2%
if 7.19999999999999981e164 < z Initial program 51.4%
+-commutative51.4%
associate-+r-51.4%
*-commutative51.4%
associate-*r*47.6%
*-commutative47.6%
associate-+r-47.6%
+-commutative47.6%
associate-*l*47.6%
associate-*l*59.9%
*-commutative59.9%
Simplified59.9%
Taylor expanded in y around inf 59.7%
Taylor expanded in z around -inf 59.5%
mul-1-neg59.5%
unsub-neg59.5%
*-commutative59.5%
associate-/l*59.6%
*-commutative59.6%
associate-/l*59.0%
mul-1-neg59.0%
unsub-neg59.0%
associate-*r/59.1%
*-commutative59.1%
associate-/l*59.0%
associate-/r*63.2%
Simplified63.2%
Taylor expanded in x around 0 73.9%
mul-1-neg73.9%
associate-/r*68.0%
distribute-neg-frac268.0%
Simplified68.0%
Taylor expanded in c around -inf 85.9%
mul-1-neg85.9%
distribute-neg-frac285.9%
*-commutative85.9%
associate-*r*85.9%
Simplified85.9%
Final simplification86.7%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= b -4.5e-41)
(/ (+ b (* x (* 9.0 y))) (* z c_m))
(if (<= b 1.2e+91)
(/ (- (* -4.0 (* t a)) (/ (* (* x y) -9.0) z)) c_m)
(+ (* -4.0 (* t (/ a c_m))) (/ (/ b c_m) z))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -4.5e-41) {
tmp = (b + (x * (9.0 * y))) / (z * c_m);
} else if (b <= 1.2e+91) {
tmp = ((-4.0 * (t * a)) - (((x * y) * -9.0) / z)) / c_m;
} else {
tmp = (-4.0 * (t * (a / c_m))) + ((b / c_m) / z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if (b <= (-4.5d-41)) then
tmp = (b + (x * (9.0d0 * y))) / (z * c_m)
else if (b <= 1.2d+91) then
tmp = (((-4.0d0) * (t * a)) - (((x * y) * (-9.0d0)) / z)) / c_m
else
tmp = ((-4.0d0) * (t * (a / c_m))) + ((b / c_m) / z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -4.5e-41) {
tmp = (b + (x * (9.0 * y))) / (z * c_m);
} else if (b <= 1.2e+91) {
tmp = ((-4.0 * (t * a)) - (((x * y) * -9.0) / z)) / c_m;
} else {
tmp = (-4.0 * (t * (a / c_m))) + ((b / c_m) / z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if b <= -4.5e-41: tmp = (b + (x * (9.0 * y))) / (z * c_m) elif b <= 1.2e+91: tmp = ((-4.0 * (t * a)) - (((x * y) * -9.0) / z)) / c_m else: tmp = (-4.0 * (t * (a / c_m))) + ((b / c_m) / z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (b <= -4.5e-41) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(z * c_m)); elseif (b <= 1.2e+91) tmp = Float64(Float64(Float64(-4.0 * Float64(t * a)) - Float64(Float64(Float64(x * y) * -9.0) / z)) / c_m); else tmp = Float64(Float64(-4.0 * Float64(t * Float64(a / c_m))) + Float64(Float64(b / c_m) / z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (b <= -4.5e-41)
tmp = (b + (x * (9.0 * y))) / (z * c_m);
elseif (b <= 1.2e+91)
tmp = ((-4.0 * (t * a)) - (((x * y) * -9.0) / z)) / c_m;
else
tmp = (-4.0 * (t * (a / c_m))) + ((b / c_m) / z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -4.5e-41], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.2e+91], N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * y), $MachinePrecision] * -9.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -4.5 \cdot 10^{-41}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{z \cdot c\_m}\\
\mathbf{elif}\;b \leq 1.2 \cdot 10^{+91}:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right) - \frac{\left(x \cdot y\right) \cdot -9}{z}}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right) + \frac{\frac{b}{c\_m}}{z}\\
\end{array}
\end{array}
if b < -4.5e-41Initial program 87.0%
+-commutative87.0%
associate-+r-87.0%
*-commutative87.0%
associate-*r*82.7%
*-commutative82.7%
associate-+r-82.7%
+-commutative82.7%
associate-*l*82.7%
associate-*l*87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in x around inf 81.3%
associate-*r*81.3%
*-commutative81.3%
associate-*r*81.4%
Simplified81.4%
if -4.5e-41 < b < 1.19999999999999991e91Initial program 80.9%
+-commutative80.9%
associate-+r-80.9%
*-commutative80.9%
associate-*r*83.2%
*-commutative83.2%
associate-+r-83.2%
+-commutative83.2%
associate-*l*83.2%
associate-*l*82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y around inf 68.9%
Taylor expanded in z around -inf 82.0%
mul-1-neg82.0%
unsub-neg82.0%
*-commutative82.0%
associate-/l*80.8%
*-commutative80.8%
associate-/l*79.4%
mul-1-neg79.4%
unsub-neg79.4%
associate-*r/79.4%
*-commutative79.4%
associate-/l*79.4%
associate-/r*79.6%
Simplified79.6%
Taylor expanded in c around 0 92.2%
Taylor expanded in y around inf 84.1%
*-commutative84.1%
Simplified84.1%
if 1.19999999999999991e91 < b Initial program 80.0%
+-commutative80.0%
associate-+r-80.0%
*-commutative80.0%
associate-*r*78.0%
*-commutative78.0%
associate-+r-78.0%
+-commutative78.0%
associate-*l*78.0%
associate-*l*73.9%
*-commutative73.9%
Simplified73.9%
Taylor expanded in y around inf 56.0%
Taylor expanded in z around -inf 62.4%
mul-1-neg62.4%
unsub-neg62.4%
*-commutative62.4%
associate-/l*68.1%
*-commutative68.1%
associate-/l*70.0%
mul-1-neg70.0%
unsub-neg70.0%
associate-*r/70.0%
*-commutative70.0%
associate-/l*70.0%
associate-/r*70.0%
Simplified70.0%
Taylor expanded in x around 0 85.1%
mul-1-neg85.1%
associate-/r*82.1%
distribute-neg-frac282.1%
Simplified82.1%
Final simplification83.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -1.9e-60) (not (<= z 12.5)))
(* -4.0 (* t (/ a c_m)))
(/ b (* z c_m)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -1.9e-60) || !(z <= 12.5)) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = b / (z * c_m);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if ((z <= (-1.9d-60)) .or. (.not. (z <= 12.5d0))) then
tmp = (-4.0d0) * (t * (a / c_m))
else
tmp = b / (z * c_m)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -1.9e-60) || !(z <= 12.5)) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = b / (z * c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -1.9e-60) or not (z <= 12.5): tmp = -4.0 * (t * (a / c_m)) else: tmp = b / (z * c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -1.9e-60) || !(z <= 12.5)) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); else tmp = Float64(b / Float64(z * c_m)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -1.9e-60) || ~((z <= 12.5)))
tmp = -4.0 * (t * (a / c_m));
else
tmp = b / (z * c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -1.9e-60], N[Not[LessEqual[z, 12.5]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-60} \lor \neg \left(z \leq 12.5\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c\_m}\\
\end{array}
\end{array}
if z < -1.89999999999999997e-60 or 12.5 < z Initial program 65.2%
+-commutative65.2%
associate-+r-65.2%
*-commutative65.2%
associate-*r*65.3%
*-commutative65.3%
associate-+r-65.3%
+-commutative65.3%
associate-*l*65.4%
associate-*l*69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in z around 0 63.0%
Taylor expanded in a around inf 55.1%
*-commutative55.1%
associate-/l*55.1%
Simplified55.1%
if -1.89999999999999997e-60 < z < 12.5Initial program 97.4%
+-commutative97.4%
associate-+r-97.4%
*-commutative97.4%
associate-*r*96.9%
*-commutative96.9%
associate-+r-96.9%
+-commutative96.9%
associate-*l*96.9%
associate-*l*93.1%
*-commutative93.1%
Simplified93.1%
Taylor expanded in b around inf 56.9%
*-commutative56.9%
Simplified56.9%
Final simplification56.1%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -7.5e-61)
(* -4.0 (* t (/ a c_m)))
(if (<= z 0.002) (/ b (* z c_m)) (* -4.0 (/ (* t a) c_m))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -7.5e-61) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= 0.002) {
tmp = b / (z * c_m);
} else {
tmp = -4.0 * ((t * a) / c_m);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if (z <= (-7.5d-61)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (z <= 0.002d0) then
tmp = b / (z * c_m)
else
tmp = (-4.0d0) * ((t * a) / c_m)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -7.5e-61) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= 0.002) {
tmp = b / (z * c_m);
} else {
tmp = -4.0 * ((t * a) / c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if z <= -7.5e-61: tmp = -4.0 * (t * (a / c_m)) elif z <= 0.002: tmp = b / (z * c_m) else: tmp = -4.0 * ((t * a) / c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (z <= -7.5e-61) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (z <= 0.002) tmp = Float64(b / Float64(z * c_m)); else tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (z <= -7.5e-61)
tmp = -4.0 * (t * (a / c_m));
elseif (z <= 0.002)
tmp = b / (z * c_m);
else
tmp = -4.0 * ((t * a) / c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -7.5e-61], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.002], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-61}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;z \leq 0.002:\\
\;\;\;\;\frac{b}{z \cdot c\_m}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\end{array}
\end{array}
if z < -7.50000000000000047e-61Initial program 66.4%
+-commutative66.4%
associate-+r-66.4%
*-commutative66.4%
associate-*r*67.8%
*-commutative67.8%
associate-+r-67.8%
+-commutative67.8%
associate-*l*67.8%
associate-*l*70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in z around 0 65.3%
Taylor expanded in a around inf 50.7%
*-commutative50.7%
associate-/l*53.1%
Simplified53.1%
if -7.50000000000000047e-61 < z < 2e-3Initial program 97.4%
+-commutative97.4%
associate-+r-97.4%
*-commutative97.4%
associate-*r*96.9%
*-commutative96.9%
associate-+r-96.9%
+-commutative96.9%
associate-*l*96.9%
associate-*l*93.1%
*-commutative93.1%
Simplified93.1%
Taylor expanded in b around inf 56.9%
*-commutative56.9%
Simplified56.9%
if 2e-3 < z Initial program 63.1%
+-commutative63.1%
associate-+r-63.1%
*-commutative63.1%
associate-*r*60.8%
*-commutative60.8%
associate-+r-60.8%
+-commutative60.8%
associate-*l*60.9%
associate-*l*68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in z around inf 63.2%
Final simplification56.8%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -1.45e-60)
(* -4.0 (* t (/ a c_m)))
(if (<= z 1.75) (* b (/ 1.0 (* z c_m))) (* -4.0 (/ (* t a) c_m))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -1.45e-60) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= 1.75) {
tmp = b * (1.0 / (z * c_m));
} else {
tmp = -4.0 * ((t * a) / c_m);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
real(8) :: tmp
if (z <= (-1.45d-60)) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (z <= 1.75d0) then
tmp = b * (1.0d0 / (z * c_m))
else
tmp = (-4.0d0) * ((t * a) / c_m)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -1.45e-60) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= 1.75) {
tmp = b * (1.0 / (z * c_m));
} else {
tmp = -4.0 * ((t * a) / c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if z <= -1.45e-60: tmp = -4.0 * (t * (a / c_m)) elif z <= 1.75: tmp = b * (1.0 / (z * c_m)) else: tmp = -4.0 * ((t * a) / c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (z <= -1.45e-60) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (z <= 1.75) tmp = Float64(b * Float64(1.0 / Float64(z * c_m))); else tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (z <= -1.45e-60)
tmp = -4.0 * (t * (a / c_m));
elseif (z <= 1.75)
tmp = b * (1.0 / (z * c_m));
else
tmp = -4.0 * ((t * a) / c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -1.45e-60], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75], N[(b * N[(1.0 / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{-60}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{elif}\;z \leq 1.75:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c\_m}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\end{array}
\end{array}
if z < -1.45e-60Initial program 66.4%
+-commutative66.4%
associate-+r-66.4%
*-commutative66.4%
associate-*r*67.8%
*-commutative67.8%
associate-+r-67.8%
+-commutative67.8%
associate-*l*67.8%
associate-*l*70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in z around 0 65.3%
Taylor expanded in a around inf 50.7%
*-commutative50.7%
associate-/l*53.1%
Simplified53.1%
if -1.45e-60 < z < 1.75Initial program 97.4%
+-commutative97.4%
associate-+r-97.4%
*-commutative97.4%
associate-*r*96.9%
*-commutative96.9%
associate-+r-96.9%
+-commutative96.9%
associate-*l*96.9%
associate-*l*93.1%
*-commutative93.1%
Simplified93.1%
Taylor expanded in b around inf 56.9%
*-commutative56.9%
Simplified56.9%
div-inv57.6%
Applied egg-rr57.6%
if 1.75 < z Initial program 63.1%
+-commutative63.1%
associate-+r-63.1%
*-commutative63.1%
associate-*r*60.8%
*-commutative60.8%
associate-+r-60.8%
+-commutative60.8%
associate-*l*60.9%
associate-*l*68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in z around inf 63.2%
Final simplification57.2%
c\_m = (fabs.f64 c) c\_s = (copysign.f64 #s(literal 1 binary64) c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (/ b (* z c_m))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
return c_s * (b / (z * c_m));
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
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_m
code = c_s * (b / (z * c_m))
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
return c_s * (b / (z * c_m));
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): return c_s * (b / (z * c_m))
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) return Float64(c_s * Float64(b / Float64(z * c_m))) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp = code(c_s, x, y, z, t, a, b, c_m)
tmp = c_s * (b / (z * c_m));
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \frac{b}{z \cdot c\_m}
\end{array}
Initial program 82.3%
+-commutative82.3%
associate-+r-82.3%
*-commutative82.3%
associate-*r*82.1%
*-commutative82.1%
associate-+r-82.1%
+-commutative82.1%
associate-*l*82.1%
associate-*l*82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in b around inf 40.4%
*-commutative40.4%
Simplified40.4%
Final simplification40.4%
(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 2024060
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))