
(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 19 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
(*
c_s
(if (<= c_m 240.0)
(/ (- (* -4.0 (* a t)) (/ (* x (- (* -9.0 y) (/ b x))) z)) c_m)
(if (<= c_m 7.5e+131)
(fma
9.0
(* y (/ (/ x c_m) z))
(fma (* a (/ t c_m)) -4.0 (/ b (* c_m z))))
(+
(* a (/ (* -4.0 t) c_m))
(* (/ x z) (- (/ b (* c_m x)) (* -9.0 (/ y 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 (c_m <= 240.0) {
tmp = ((-4.0 * (a * t)) - ((x * ((-9.0 * y) - (b / x))) / z)) / c_m;
} else if (c_m <= 7.5e+131) {
tmp = fma(9.0, (y * ((x / c_m) / z)), fma((a * (t / c_m)), -4.0, (b / (c_m * z))));
} else {
tmp = (a * ((-4.0 * t) / c_m)) + ((x / z) * ((b / (c_m * x)) - (-9.0 * (y / 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 (c_m <= 240.0) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) - Float64(Float64(x * Float64(Float64(-9.0 * y) - Float64(b / x))) / z)) / c_m); elseif (c_m <= 7.5e+131) tmp = fma(9.0, Float64(y * Float64(Float64(x / c_m) / z)), fma(Float64(a * Float64(t / c_m)), -4.0, Float64(b / Float64(c_m * z)))); else tmp = Float64(Float64(a * Float64(Float64(-4.0 * t) / c_m)) + Float64(Float64(x / z) * Float64(Float64(b / Float64(c_m * x)) - Float64(-9.0 * Float64(y / c_m))))); 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_] := N[(c$95$s * If[LessEqual[c$95$m, 240.0], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(N[(-9.0 * y), $MachinePrecision] - N[(b / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[c$95$m, 7.5e+131], N[(9.0 * N[(y * N[(N[(x / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision] * -4.0 + N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] * N[(N[(b / N[(c$95$m * x), $MachinePrecision]), $MachinePrecision] - N[(-9.0 * N[(y / c$95$m), $MachinePrecision]), $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])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 240:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) - \frac{x \cdot \left(-9 \cdot y - \frac{b}{x}\right)}{z}}{c\_m}\\
\mathbf{elif}\;c\_m \leq 7.5 \cdot 10^{+131}:\\
\;\;\;\;\mathsf{fma}\left(9, y \cdot \frac{\frac{x}{c\_m}}{z}, \mathsf{fma}\left(a \cdot \frac{t}{c\_m}, -4, \frac{b}{c\_m \cdot z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c\_m} + \frac{x}{z} \cdot \left(\frac{b}{c\_m \cdot x} - -9 \cdot \frac{y}{c\_m}\right)\\
\end{array}
\end{array}
if c < 240Initial program 82.9%
associate-+l-82.9%
*-commutative82.9%
associate-*r*85.1%
*-commutative85.1%
associate-+l-85.1%
associate-*l*85.1%
associate-*l*85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in x around inf 69.5%
Taylor expanded in z around -inf 73.6%
associate-*r/73.6%
*-commutative73.6%
associate-*r/73.6%
associate-*r*72.4%
mul-1-neg72.4%
unsub-neg72.4%
associate-*r/72.4%
*-commutative72.4%
associate-/l*68.7%
mul-1-neg68.7%
unsub-neg68.7%
Simplified68.7%
Taylor expanded in c around 0 85.7%
if 240 < c < 7.4999999999999995e131Initial program 71.8%
associate-+l-71.8%
*-commutative71.8%
associate-*r*75.3%
*-commutative75.3%
associate-+l-75.3%
associate-*l*75.3%
associate-*l*75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in x around 0 86.0%
associate--l+86.0%
fma-define85.9%
*-commutative85.9%
*-commutative85.9%
associate-/l*86.0%
*-commutative86.0%
associate-/r*86.1%
cancel-sign-sub-inv86.1%
metadata-eval86.1%
+-commutative86.1%
*-commutative86.1%
fma-define86.1%
associate-/l*92.6%
*-commutative92.6%
Simplified92.6%
if 7.4999999999999995e131 < c Initial program 60.6%
associate-+l-60.6%
*-commutative60.6%
associate-*r*60.7%
*-commutative60.7%
associate-+l-60.7%
associate-*l*60.6%
associate-*l*58.4%
*-commutative58.4%
Simplified58.4%
Taylor expanded in x around inf 54.4%
Taylor expanded in z around -inf 78.9%
associate-*r/78.9%
*-commutative78.9%
associate-*r/78.8%
associate-*r*85.4%
mul-1-neg85.4%
unsub-neg85.4%
associate-*r/85.5%
*-commutative85.5%
associate-/l*75.0%
mul-1-neg75.0%
unsub-neg75.0%
Simplified75.0%
Final simplification84.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
(let* ((t_1 (/ (- (* -4.0 (* a t)) (/ (* x (- (* -9.0 y) (/ b x))) z)) c_m))
(t_2 (/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* c_m z))))
(*
c_s
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -1e-13)
t_2
(if (<= t_2 2e+28)
t_1
(if (<= t_2 INFINITY)
t_2
(- (* a (/ (* -4.0 t) c_m)) (* x (/ (* y (/ -9.0 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 = ((-4.0 * (a * t)) - ((x * ((-9.0 * y) - (b / x))) / z)) / c_m;
double t_2 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -1e-13) {
tmp = t_2;
} else if (t_2 <= 2e+28) {
tmp = t_1;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = (a * ((-4.0 * t) / c_m)) - (x * ((y * (-9.0 / 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 = ((-4.0 * (a * t)) - ((x * ((-9.0 * y) - (b / x))) / z)) / c_m;
double t_2 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -1e-13) {
tmp = t_2;
} else if (t_2 <= 2e+28) {
tmp = t_1;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = (a * ((-4.0 * t) / c_m)) - (x * ((y * (-9.0 / 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 = ((-4.0 * (a * t)) - ((x * ((-9.0 * y) - (b / x))) / z)) / c_m t_2 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -1e-13: tmp = t_2 elif t_2 <= 2e+28: tmp = t_1 elif t_2 <= math.inf: tmp = t_2 else: tmp = (a * ((-4.0 * t) / c_m)) - (x * ((y * (-9.0 / 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(-4.0 * Float64(a * t)) - Float64(Float64(x * Float64(Float64(-9.0 * y) - Float64(b / x))) / z)) / c_m) t_2 = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -1e-13) tmp = t_2; elseif (t_2 <= 2e+28) tmp = t_1; elseif (t_2 <= Inf) tmp = t_2; else tmp = Float64(Float64(a * Float64(Float64(-4.0 * t) / c_m)) - Float64(x * Float64(Float64(y * Float64(-9.0 / 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 = ((-4.0 * (a * t)) - ((x * ((-9.0 * y) - (b / x))) / z)) / c_m;
t_2 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
tmp = 0.0;
if (t_2 <= -Inf)
tmp = t_1;
elseif (t_2 <= -1e-13)
tmp = t_2;
elseif (t_2 <= 2e+28)
tmp = t_1;
elseif (t_2 <= Inf)
tmp = t_2;
else
tmp = (a * ((-4.0 * t) / c_m)) - (x * ((y * (-9.0 / 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[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(N[(-9.0 * y), $MachinePrecision] - N[(b / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-13], t$95$2, If[LessEqual[t$95$2, 2e+28], t$95$1, If[LessEqual[t$95$2, Infinity], t$95$2, N[(N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[(y * N[(-9.0 / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $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{-4 \cdot \left(a \cdot t\right) - \frac{x \cdot \left(-9 \cdot y - \frac{b}{x}\right)}{z}}{c\_m}\\
t_2 := \frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c\_m \cdot z}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c\_m} - x \cdot \frac{y \cdot \frac{-9}{c\_m}}{z}\\
\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)) < -inf.0 or -1e-13 < (/.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.99999999999999992e28Initial program 78.5%
associate-+l-78.5%
*-commutative78.5%
associate-*r*79.7%
*-commutative79.7%
associate-+l-79.7%
associate-*l*79.7%
associate-*l*81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in x around inf 75.4%
Taylor expanded in z around -inf 79.1%
associate-*r/79.1%
*-commutative79.1%
associate-*r/79.0%
associate-*r*79.0%
mul-1-neg79.0%
unsub-neg79.0%
associate-*r/79.0%
*-commutative79.0%
associate-/l*76.1%
mul-1-neg76.1%
unsub-neg76.1%
Simplified76.1%
Taylor expanded in c around 0 92.0%
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)) < -1e-13 or 1.99999999999999992e28 < (/.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 91.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%
associate-+l-0.0%
*-commutative0.0%
associate-*r*6.1%
*-commutative6.1%
associate-+l-6.1%
associate-*l*6.1%
associate-*l*6.1%
*-commutative6.1%
Simplified6.1%
Taylor expanded in x around inf 29.1%
Taylor expanded in z around -inf 68.2%
associate-*r/68.2%
*-commutative68.2%
associate-*r/68.3%
associate-*r*89.8%
mul-1-neg89.8%
unsub-neg89.8%
associate-*r/89.8%
*-commutative89.8%
associate-/l*89.4%
mul-1-neg89.4%
unsub-neg89.4%
Simplified89.4%
Taylor expanded in y around inf 54.4%
*-commutative54.4%
associate-/l*69.7%
associate-*r*69.7%
*-commutative69.7%
associate-*r/69.7%
associate-/r*89.9%
*-commutative89.9%
associate-/l*89.9%
Simplified89.9%
Final simplification91.4%
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 (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* c_m z))))
(*
c_s
(if (<= t_1 -1e-146)
(/ (+ b (- (* x (* y 9.0)) (* (* a t) (* z 4.0)))) (* c_m z))
(if (<= t_1 0.0)
(/ (- (* -4.0 (* a t)) (/ (* -9.0 (* x y)) z)) c_m)
(if (<= t_1 INFINITY)
t_1
(- (* a (/ (* -4.0 t) c_m)) (* x (/ (* y (/ -9.0 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 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
double tmp;
if (t_1 <= -1e-146) {
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z);
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * (a * t)) - ((-9.0 * (x * y)) / z)) / c_m;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (a * ((-4.0 * t) / c_m)) - (x * ((y * (-9.0 / 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 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
double tmp;
if (t_1 <= -1e-146) {
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z);
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * (a * t)) - ((-9.0 * (x * y)) / z)) / c_m;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (a * ((-4.0 * t) / c_m)) - (x * ((y * (-9.0 / 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 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z) tmp = 0 if t_1 <= -1e-146: tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z) elif t_1 <= 0.0: tmp = ((-4.0 * (a * t)) - ((-9.0 * (x * y)) / z)) / c_m elif t_1 <= math.inf: tmp = t_1 else: tmp = (a * ((-4.0 * t) / c_m)) - (x * ((y * (-9.0 / 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(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)) tmp = 0.0 if (t_1 <= -1e-146) tmp = Float64(Float64(b + Float64(Float64(x * Float64(y * 9.0)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(c_m * z)); elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) - Float64(Float64(-9.0 * Float64(x * y)) / z)) / c_m); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(a * Float64(Float64(-4.0 * t) / c_m)) - Float64(x * Float64(Float64(y * Float64(-9.0 / 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 = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z);
tmp = 0.0;
if (t_1 <= -1e-146)
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z);
elseif (t_1 <= 0.0)
tmp = ((-4.0 * (a * t)) - ((-9.0 * (x * y)) / z)) / c_m;
elseif (t_1 <= Inf)
tmp = t_1;
else
tmp = (a * ((-4.0 * t) / c_m)) - (x * ((y * (-9.0 / 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[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -1e-146], N[(N[(b + N[(N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] - N[(N[(-9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[(y * N[(-9.0 / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $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{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c\_m \cdot z}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-146}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(y \cdot 9\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{c\_m \cdot z}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) - \frac{-9 \cdot \left(x \cdot y\right)}{z}}{c\_m}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c\_m} - x \cdot \frac{y \cdot \frac{-9}{c\_m}}{z}\\
\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.00000000000000003e-146Initial program 85.2%
associate-+l-85.2%
*-commutative85.2%
associate-*r*84.2%
*-commutative84.2%
associate-+l-84.2%
associate-*l*84.3%
associate-*l*85.8%
*-commutative85.8%
Simplified85.8%
if -1.00000000000000003e-146 < (/.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 57.9%
associate-+l-57.9%
*-commutative57.9%
associate-*r*61.5%
*-commutative61.5%
associate-+l-61.5%
associate-*l*61.5%
associate-*l*61.7%
*-commutative61.7%
Simplified61.7%
Taylor expanded in x around inf 69.1%
Taylor expanded in z around -inf 91.9%
associate-*r/91.9%
*-commutative91.9%
associate-*r/91.7%
associate-*r*84.2%
mul-1-neg84.2%
unsub-neg84.2%
associate-*r/84.2%
*-commutative84.2%
associate-/l*84.4%
mul-1-neg84.4%
unsub-neg84.4%
Simplified84.4%
Taylor expanded in c around 0 95.6%
Taylor expanded in x around inf 80.6%
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 91.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%
associate-+l-0.0%
*-commutative0.0%
associate-*r*6.1%
*-commutative6.1%
associate-+l-6.1%
associate-*l*6.1%
associate-*l*6.1%
*-commutative6.1%
Simplified6.1%
Taylor expanded in x around inf 29.1%
Taylor expanded in z around -inf 68.2%
associate-*r/68.2%
*-commutative68.2%
associate-*r/68.3%
associate-*r*89.8%
mul-1-neg89.8%
unsub-neg89.8%
associate-*r/89.8%
*-commutative89.8%
associate-/l*89.4%
mul-1-neg89.4%
unsub-neg89.4%
Simplified89.4%
Taylor expanded in y around inf 54.4%
*-commutative54.4%
associate-/l*69.7%
associate-*r*69.7%
*-commutative69.7%
associate-*r/69.7%
associate-/r*89.9%
*-commutative89.9%
associate-/l*89.9%
Simplified89.9%
Final simplification88.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 (<= y -9.8e-48)
(* x (* (/ y c_m) (/ 9.0 z)))
(if (<= y 1.55e+53)
(+ (* -4.0 (/ (* a t) c_m)) (/ (/ b c_m) z))
(if (or (<= y 5.2e+159) (not (<= y 2e+207)))
(- (* a (/ (* -4.0 t) c_m)) (* -9.0 (* x (/ y (* c_m z)))))
(/ (* x (+ (* 9.0 (/ y z)) (/ b (* x 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 (y <= -9.8e-48) {
tmp = x * ((y / c_m) * (9.0 / z));
} else if (y <= 1.55e+53) {
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
} else if ((y <= 5.2e+159) || !(y <= 2e+207)) {
tmp = (a * ((-4.0 * t) / c_m)) - (-9.0 * (x * (y / (c_m * z))));
} else {
tmp = (x * ((9.0 * (y / z)) + (b / (x * 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 (y <= (-9.8d-48)) then
tmp = x * ((y / c_m) * (9.0d0 / z))
else if (y <= 1.55d+53) then
tmp = ((-4.0d0) * ((a * t) / c_m)) + ((b / c_m) / z)
else if ((y <= 5.2d+159) .or. (.not. (y <= 2d+207))) then
tmp = (a * (((-4.0d0) * t) / c_m)) - ((-9.0d0) * (x * (y / (c_m * z))))
else
tmp = (x * ((9.0d0 * (y / z)) + (b / (x * 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 (y <= -9.8e-48) {
tmp = x * ((y / c_m) * (9.0 / z));
} else if (y <= 1.55e+53) {
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
} else if ((y <= 5.2e+159) || !(y <= 2e+207)) {
tmp = (a * ((-4.0 * t) / c_m)) - (-9.0 * (x * (y / (c_m * z))));
} else {
tmp = (x * ((9.0 * (y / z)) + (b / (x * 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 y <= -9.8e-48: tmp = x * ((y / c_m) * (9.0 / z)) elif y <= 1.55e+53: tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z) elif (y <= 5.2e+159) or not (y <= 2e+207): tmp = (a * ((-4.0 * t) / c_m)) - (-9.0 * (x * (y / (c_m * z)))) else: tmp = (x * ((9.0 * (y / z)) + (b / (x * 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 (y <= -9.8e-48) tmp = Float64(x * Float64(Float64(y / c_m) * Float64(9.0 / z))); elseif (y <= 1.55e+53) tmp = Float64(Float64(-4.0 * Float64(Float64(a * t) / c_m)) + Float64(Float64(b / c_m) / z)); elseif ((y <= 5.2e+159) || !(y <= 2e+207)) tmp = Float64(Float64(a * Float64(Float64(-4.0 * t) / c_m)) - Float64(-9.0 * Float64(x * Float64(y / Float64(c_m * z))))); else tmp = Float64(Float64(x * Float64(Float64(9.0 * Float64(y / z)) + Float64(b / Float64(x * 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 (y <= -9.8e-48)
tmp = x * ((y / c_m) * (9.0 / z));
elseif (y <= 1.55e+53)
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
elseif ((y <= 5.2e+159) || ~((y <= 2e+207)))
tmp = (a * ((-4.0 * t) / c_m)) - (-9.0 * (x * (y / (c_m * z))));
else
tmp = (x * ((9.0 * (y / z)) + (b / (x * 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[y, -9.8e-48], N[(x * N[(N[(y / c$95$m), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e+53], N[(N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 5.2e+159], N[Not[LessEqual[y, 2e+207]], $MachinePrecision]], N[(N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] - N[(-9.0 * N[(x * N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(x * z), $MachinePrecision]), $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}\;y \leq -9.8 \cdot 10^{-48}:\\
\;\;\;\;x \cdot \left(\frac{y}{c\_m} \cdot \frac{9}{z}\right)\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+53}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m} + \frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+159} \lor \neg \left(y \leq 2 \cdot 10^{+207}\right):\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c\_m} - -9 \cdot \left(x \cdot \frac{y}{c\_m \cdot z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(9 \cdot \frac{y}{z} + \frac{b}{x \cdot z}\right)}{c\_m}\\
\end{array}
\end{array}
if y < -9.8000000000000005e-48Initial program 71.3%
associate-+l-71.3%
*-commutative71.3%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*72.9%
*-commutative72.9%
Simplified72.9%
Taylor expanded in x around inf 63.7%
associate-*r*63.7%
Simplified63.7%
Taylor expanded in x around inf 48.6%
associate-/l*56.1%
associate-*r*56.0%
*-commutative56.0%
associate-*r*56.0%
associate-*r/55.9%
*-commutative55.9%
times-frac60.7%
Simplified60.7%
if -9.8000000000000005e-48 < y < 1.5500000000000001e53Initial program 81.8%
associate-+l-81.8%
*-commutative81.8%
associate-*r*84.6%
*-commutative84.6%
associate-+l-84.6%
associate-*l*84.6%
associate-*l*85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in x around inf 69.4%
Taylor expanded in z around inf 74.4%
Taylor expanded in x around 0 74.9%
if 1.5500000000000001e53 < y < 5.2000000000000001e159 or 2.0000000000000001e207 < y Initial program 75.7%
associate-+l-75.7%
*-commutative75.7%
associate-*r*76.0%
*-commutative76.0%
associate-+l-76.0%
associate-*l*76.0%
associate-*l*76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in x around inf 57.0%
Taylor expanded in z around -inf 72.9%
associate-*r/72.9%
*-commutative72.9%
associate-*r/72.9%
associate-*r*78.6%
mul-1-neg78.6%
unsub-neg78.6%
associate-*r/78.6%
*-commutative78.6%
associate-/l*78.7%
mul-1-neg78.7%
unsub-neg78.7%
Simplified78.7%
Taylor expanded in y around inf 74.7%
associate-/l*75.0%
Simplified75.0%
if 5.2000000000000001e159 < y < 2.0000000000000001e207Initial program 77.8%
associate-+l-77.8%
*-commutative77.8%
associate-*r*77.8%
*-commutative77.8%
associate-+l-77.8%
associate-*l*77.6%
associate-*l*77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in x around inf 77.8%
associate-*r*77.8%
Simplified77.8%
Taylor expanded in x around inf 78.1%
Taylor expanded in c around 0 92.1%
Final simplification72.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 (* a (/ (* -4.0 t) c_m))))
(*
c_s
(if (<= y -9.8e-48)
(* x (* (/ y c_m) (/ 9.0 z)))
(if (<= y 8.8e+52)
(+ (* -4.0 (/ (* a t) c_m)) (/ (/ b c_m) z))
(if (<= y 3.5e+159)
(- t_1 (* -9.0 (* x (/ y (* c_m z)))))
(if (<= y 1.8e+207)
(/ (* x (+ (* 9.0 (/ y z)) (/ b (* x z)))) c_m)
(- t_1 (* x (/ (* y (/ -9.0 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 = a * ((-4.0 * t) / c_m);
double tmp;
if (y <= -9.8e-48) {
tmp = x * ((y / c_m) * (9.0 / z));
} else if (y <= 8.8e+52) {
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
} else if (y <= 3.5e+159) {
tmp = t_1 - (-9.0 * (x * (y / (c_m * z))));
} else if (y <= 1.8e+207) {
tmp = (x * ((9.0 * (y / z)) + (b / (x * z)))) / c_m;
} else {
tmp = t_1 - (x * ((y * (-9.0 / 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) :: t_1
real(8) :: tmp
t_1 = a * (((-4.0d0) * t) / c_m)
if (y <= (-9.8d-48)) then
tmp = x * ((y / c_m) * (9.0d0 / z))
else if (y <= 8.8d+52) then
tmp = ((-4.0d0) * ((a * t) / c_m)) + ((b / c_m) / z)
else if (y <= 3.5d+159) then
tmp = t_1 - ((-9.0d0) * (x * (y / (c_m * z))))
else if (y <= 1.8d+207) then
tmp = (x * ((9.0d0 * (y / z)) + (b / (x * z)))) / c_m
else
tmp = t_1 - (x * ((y * ((-9.0d0) / 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 t_1 = a * ((-4.0 * t) / c_m);
double tmp;
if (y <= -9.8e-48) {
tmp = x * ((y / c_m) * (9.0 / z));
} else if (y <= 8.8e+52) {
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
} else if (y <= 3.5e+159) {
tmp = t_1 - (-9.0 * (x * (y / (c_m * z))));
} else if (y <= 1.8e+207) {
tmp = (x * ((9.0 * (y / z)) + (b / (x * z)))) / c_m;
} else {
tmp = t_1 - (x * ((y * (-9.0 / 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 = a * ((-4.0 * t) / c_m) tmp = 0 if y <= -9.8e-48: tmp = x * ((y / c_m) * (9.0 / z)) elif y <= 8.8e+52: tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z) elif y <= 3.5e+159: tmp = t_1 - (-9.0 * (x * (y / (c_m * z)))) elif y <= 1.8e+207: tmp = (x * ((9.0 * (y / z)) + (b / (x * z)))) / c_m else: tmp = t_1 - (x * ((y * (-9.0 / 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(a * Float64(Float64(-4.0 * t) / c_m)) tmp = 0.0 if (y <= -9.8e-48) tmp = Float64(x * Float64(Float64(y / c_m) * Float64(9.0 / z))); elseif (y <= 8.8e+52) tmp = Float64(Float64(-4.0 * Float64(Float64(a * t) / c_m)) + Float64(Float64(b / c_m) / z)); elseif (y <= 3.5e+159) tmp = Float64(t_1 - Float64(-9.0 * Float64(x * Float64(y / Float64(c_m * z))))); elseif (y <= 1.8e+207) tmp = Float64(Float64(x * Float64(Float64(9.0 * Float64(y / z)) + Float64(b / Float64(x * z)))) / c_m); else tmp = Float64(t_1 - Float64(x * Float64(Float64(y * Float64(-9.0 / 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 = a * ((-4.0 * t) / c_m);
tmp = 0.0;
if (y <= -9.8e-48)
tmp = x * ((y / c_m) * (9.0 / z));
elseif (y <= 8.8e+52)
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
elseif (y <= 3.5e+159)
tmp = t_1 - (-9.0 * (x * (y / (c_m * z))));
elseif (y <= 1.8e+207)
tmp = (x * ((9.0 * (y / z)) + (b / (x * z)))) / c_m;
else
tmp = t_1 - (x * ((y * (-9.0 / 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[(a * N[(N[(-4.0 * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[y, -9.8e-48], N[(x * N[(N[(y / c$95$m), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.8e+52], N[(N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+159], N[(t$95$1 - N[(-9.0 * N[(x * N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+207], N[(N[(x * N[(N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(t$95$1 - N[(x * N[(N[(y * N[(-9.0 / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $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 := a \cdot \frac{-4 \cdot t}{c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -9.8 \cdot 10^{-48}:\\
\;\;\;\;x \cdot \left(\frac{y}{c\_m} \cdot \frac{9}{z}\right)\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{+52}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m} + \frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+159}:\\
\;\;\;\;t\_1 - -9 \cdot \left(x \cdot \frac{y}{c\_m \cdot z}\right)\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+207}:\\
\;\;\;\;\frac{x \cdot \left(9 \cdot \frac{y}{z} + \frac{b}{x \cdot z}\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;t\_1 - x \cdot \frac{y \cdot \frac{-9}{c\_m}}{z}\\
\end{array}
\end{array}
\end{array}
if y < -9.8000000000000005e-48Initial program 71.3%
associate-+l-71.3%
*-commutative71.3%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*72.9%
*-commutative72.9%
Simplified72.9%
Taylor expanded in x around inf 63.7%
associate-*r*63.7%
Simplified63.7%
Taylor expanded in x around inf 48.6%
associate-/l*56.1%
associate-*r*56.0%
*-commutative56.0%
associate-*r*56.0%
associate-*r/55.9%
*-commutative55.9%
times-frac60.7%
Simplified60.7%
if -9.8000000000000005e-48 < y < 8.7999999999999999e52Initial program 81.8%
associate-+l-81.8%
*-commutative81.8%
associate-*r*84.6%
*-commutative84.6%
associate-+l-84.6%
associate-*l*84.6%
associate-*l*85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in x around inf 69.4%
Taylor expanded in z around inf 74.4%
Taylor expanded in x around 0 74.9%
if 8.7999999999999999e52 < y < 3.4999999999999999e159Initial program 76.3%
associate-+l-76.3%
*-commutative76.3%
associate-*r*76.9%
*-commutative76.9%
associate-+l-76.9%
associate-*l*76.9%
associate-*l*76.8%
*-commutative76.8%
Simplified76.8%
Taylor expanded in x around inf 68.8%
Taylor expanded in z around -inf 76.8%
associate-*r/76.8%
*-commutative76.8%
associate-*r/76.8%
associate-*r*76.5%
mul-1-neg76.5%
unsub-neg76.5%
associate-*r/76.4%
*-commutative76.4%
associate-/l*82.1%
mul-1-neg82.1%
unsub-neg82.1%
Simplified82.1%
Taylor expanded in y around inf 85.5%
associate-/l*85.6%
Simplified85.6%
if 3.4999999999999999e159 < y < 1.80000000000000007e207Initial program 77.8%
associate-+l-77.8%
*-commutative77.8%
associate-*r*77.8%
*-commutative77.8%
associate-+l-77.8%
associate-*l*77.6%
associate-*l*77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in x around inf 77.8%
associate-*r*77.8%
Simplified77.8%
Taylor expanded in x around inf 78.1%
Taylor expanded in c around 0 92.1%
if 1.80000000000000007e207 < y Initial program 75.1%
associate-+l-75.1%
*-commutative75.1%
associate-*r*75.1%
*-commutative75.1%
associate-+l-75.1%
associate-*l*75.1%
associate-*l*75.1%
*-commutative75.1%
Simplified75.1%
Taylor expanded in x around inf 44.4%
Taylor expanded in z around -inf 68.9%
associate-*r/68.9%
*-commutative68.9%
associate-*r/68.9%
associate-*r*80.9%
mul-1-neg80.9%
unsub-neg80.9%
associate-*r/80.9%
*-commutative80.9%
associate-/l*75.2%
mul-1-neg75.2%
unsub-neg75.2%
Simplified75.2%
Taylor expanded in y around inf 63.2%
*-commutative63.2%
associate-/l*63.8%
associate-*r*63.8%
*-commutative63.8%
associate-*r/63.9%
associate-/r*63.9%
*-commutative63.9%
associate-/l*63.9%
Simplified63.9%
Final simplification72.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
(if (or (<= c_m 4.5e+48) (and (not (<= c_m 2.55e+190)) (<= c_m 6e+221)))
(/ (+ b (- (* x (* y 9.0)) (* (* a t) (* z 4.0)))) (* c_m z))
(- (* a (/ (* -4.0 t) c_m)) (* x (/ (* y (/ -9.0 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 ((c_m <= 4.5e+48) || (!(c_m <= 2.55e+190) && (c_m <= 6e+221))) {
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z);
} else {
tmp = (a * ((-4.0 * t) / c_m)) - (x * ((y * (-9.0 / 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 ((c_m <= 4.5d+48) .or. (.not. (c_m <= 2.55d+190)) .and. (c_m <= 6d+221)) then
tmp = (b + ((x * (y * 9.0d0)) - ((a * t) * (z * 4.0d0)))) / (c_m * z)
else
tmp = (a * (((-4.0d0) * t) / c_m)) - (x * ((y * ((-9.0d0) / 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 ((c_m <= 4.5e+48) || (!(c_m <= 2.55e+190) && (c_m <= 6e+221))) {
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z);
} else {
tmp = (a * ((-4.0 * t) / c_m)) - (x * ((y * (-9.0 / 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 (c_m <= 4.5e+48) or (not (c_m <= 2.55e+190) and (c_m <= 6e+221)): tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z) else: tmp = (a * ((-4.0 * t) / c_m)) - (x * ((y * (-9.0 / 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 ((c_m <= 4.5e+48) || (!(c_m <= 2.55e+190) && (c_m <= 6e+221))) tmp = Float64(Float64(b + Float64(Float64(x * Float64(y * 9.0)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(c_m * z)); else tmp = Float64(Float64(a * Float64(Float64(-4.0 * t) / c_m)) - Float64(x * Float64(Float64(y * Float64(-9.0 / 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 ((c_m <= 4.5e+48) || (~((c_m <= 2.55e+190)) && (c_m <= 6e+221)))
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z);
else
tmp = (a * ((-4.0 * t) / c_m)) - (x * ((y * (-9.0 / 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[Or[LessEqual[c$95$m, 4.5e+48], And[N[Not[LessEqual[c$95$m, 2.55e+190]], $MachinePrecision], LessEqual[c$95$m, 6e+221]]], N[(N[(b + N[(N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[(y * N[(-9.0 / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $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])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 4.5 \cdot 10^{+48} \lor \neg \left(c\_m \leq 2.55 \cdot 10^{+190}\right) \land c\_m \leq 6 \cdot 10^{+221}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(y \cdot 9\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c\_m} - x \cdot \frac{y \cdot \frac{-9}{c\_m}}{z}\\
\end{array}
\end{array}
if c < 4.49999999999999995e48 or 2.55000000000000015e190 < c < 6.0000000000000003e221Initial program 83.3%
associate-+l-83.3%
*-commutative83.3%
associate-*r*85.8%
*-commutative85.8%
associate-+l-85.8%
associate-*l*85.8%
associate-*l*86.9%
*-commutative86.9%
Simplified86.9%
if 4.49999999999999995e48 < c < 2.55000000000000015e190 or 6.0000000000000003e221 < c Initial program 57.6%
associate-+l-57.6%
*-commutative57.6%
associate-*r*57.7%
*-commutative57.7%
associate-+l-57.7%
associate-*l*57.6%
associate-*l*54.2%
*-commutative54.2%
Simplified54.2%
Taylor expanded in x around inf 54.3%
Taylor expanded in z around -inf 76.0%
associate-*r/76.0%
*-commutative76.0%
associate-*r/76.0%
associate-*r*84.8%
mul-1-neg84.8%
unsub-neg84.8%
associate-*r/84.9%
*-commutative84.9%
associate-/l*80.2%
mul-1-neg80.2%
unsub-neg80.2%
Simplified80.2%
Taylor expanded in y around inf 65.9%
*-commutative65.9%
associate-/l*71.8%
associate-*r*71.9%
*-commutative71.9%
associate-*r/71.9%
associate-/r*70.1%
*-commutative70.1%
associate-/l*70.0%
Simplified70.0%
Final simplification83.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 (<= y -9.8e-48)
(* x (* (/ y c_m) (/ 9.0 z)))
(if (<= y 1.5e+57)
(+ (* -4.0 (/ (* a t) c_m)) (/ (/ b c_m) z))
(if (<= y 5.5e+225)
(/ (- (* -4.0 (* a t)) (/ (* -9.0 (* x y)) z)) c_m)
(/ (* x (+ (/ b (* c_m x)) (* 9.0 (/ 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 tmp;
if (y <= -9.8e-48) {
tmp = x * ((y / c_m) * (9.0 / z));
} else if (y <= 1.5e+57) {
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
} else if (y <= 5.5e+225) {
tmp = ((-4.0 * (a * t)) - ((-9.0 * (x * y)) / z)) / c_m;
} else {
tmp = (x * ((b / (c_m * x)) + (9.0 * (y / 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 (y <= (-9.8d-48)) then
tmp = x * ((y / c_m) * (9.0d0 / z))
else if (y <= 1.5d+57) then
tmp = ((-4.0d0) * ((a * t) / c_m)) + ((b / c_m) / z)
else if (y <= 5.5d+225) then
tmp = (((-4.0d0) * (a * t)) - (((-9.0d0) * (x * y)) / z)) / c_m
else
tmp = (x * ((b / (c_m * x)) + (9.0d0 * (y / 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 (y <= -9.8e-48) {
tmp = x * ((y / c_m) * (9.0 / z));
} else if (y <= 1.5e+57) {
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
} else if (y <= 5.5e+225) {
tmp = ((-4.0 * (a * t)) - ((-9.0 * (x * y)) / z)) / c_m;
} else {
tmp = (x * ((b / (c_m * x)) + (9.0 * (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): tmp = 0 if y <= -9.8e-48: tmp = x * ((y / c_m) * (9.0 / z)) elif y <= 1.5e+57: tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z) elif y <= 5.5e+225: tmp = ((-4.0 * (a * t)) - ((-9.0 * (x * y)) / z)) / c_m else: tmp = (x * ((b / (c_m * x)) + (9.0 * (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) tmp = 0.0 if (y <= -9.8e-48) tmp = Float64(x * Float64(Float64(y / c_m) * Float64(9.0 / z))); elseif (y <= 1.5e+57) tmp = Float64(Float64(-4.0 * Float64(Float64(a * t) / c_m)) + Float64(Float64(b / c_m) / z)); elseif (y <= 5.5e+225) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) - Float64(Float64(-9.0 * Float64(x * y)) / z)) / c_m); else tmp = Float64(Float64(x * Float64(Float64(b / Float64(c_m * x)) + Float64(9.0 * 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)
tmp = 0.0;
if (y <= -9.8e-48)
tmp = x * ((y / c_m) * (9.0 / z));
elseif (y <= 1.5e+57)
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
elseif (y <= 5.5e+225)
tmp = ((-4.0 * (a * t)) - ((-9.0 * (x * y)) / z)) / c_m;
else
tmp = (x * ((b / (c_m * x)) + (9.0 * (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_] := N[(c$95$s * If[LessEqual[y, -9.8e-48], N[(x * N[(N[(y / c$95$m), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+57], N[(N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e+225], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] - N[(N[(-9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(x * N[(N[(b / N[(c$95$m * x), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(y / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $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}\;y \leq -9.8 \cdot 10^{-48}:\\
\;\;\;\;x \cdot \left(\frac{y}{c\_m} \cdot \frac{9}{z}\right)\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+57}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m} + \frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+225}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) - \frac{-9 \cdot \left(x \cdot y\right)}{z}}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\frac{b}{c\_m \cdot x} + 9 \cdot \frac{y}{c\_m}\right)}{z}\\
\end{array}
\end{array}
if y < -9.8000000000000005e-48Initial program 71.3%
associate-+l-71.3%
*-commutative71.3%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*72.9%
*-commutative72.9%
Simplified72.9%
Taylor expanded in x around inf 63.7%
associate-*r*63.7%
Simplified63.7%
Taylor expanded in x around inf 48.6%
associate-/l*56.1%
associate-*r*56.0%
*-commutative56.0%
associate-*r*56.0%
associate-*r/55.9%
*-commutative55.9%
times-frac60.7%
Simplified60.7%
if -9.8000000000000005e-48 < y < 1.5e57Initial program 81.8%
associate-+l-81.8%
*-commutative81.8%
associate-*r*84.6%
*-commutative84.6%
associate-+l-84.6%
associate-*l*84.6%
associate-*l*85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in x around inf 69.4%
Taylor expanded in z around inf 74.4%
Taylor expanded in x around 0 74.9%
if 1.5e57 < y < 5.49999999999999985e225Initial program 71.8%
associate-+l-71.8%
*-commutative71.8%
associate-*r*72.1%
*-commutative72.1%
associate-+l-72.1%
associate-*l*72.0%
associate-*l*72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in x around inf 65.5%
Taylor expanded in z around -inf 72.3%
associate-*r/72.3%
*-commutative72.3%
associate-*r/72.3%
associate-*r*77.5%
mul-1-neg77.5%
unsub-neg77.5%
associate-*r/77.5%
*-commutative77.5%
associate-/l*82.9%
mul-1-neg82.9%
unsub-neg82.9%
Simplified82.9%
Taylor expanded in c around 0 80.5%
Taylor expanded in x around inf 77.6%
if 5.49999999999999985e225 < y Initial program 90.6%
associate-+l-90.6%
*-commutative90.6%
associate-*r*90.6%
*-commutative90.6%
associate-+l-90.6%
associate-*l*90.6%
associate-*l*90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in x around inf 54.8%
Taylor expanded in z around 0 72.7%
Final simplification71.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 (* 9.0 (* (/ y c_m) (/ x z)))))
(*
c_s
(if (<= t -9.475e+155)
(* -4.0 (* a (/ t c_m)))
(if (<= t -1.05e+59)
t_1
(if (<= t -9.8e-231)
(/ b (* c_m z))
(if (<= t 3.5e-97) t_1 (* (/ a c_m) (* -4.0 t)))))))))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 * ((y / c_m) * (x / z));
double tmp;
if (t <= -9.475e+155) {
tmp = -4.0 * (a * (t / c_m));
} else if (t <= -1.05e+59) {
tmp = t_1;
} else if (t <= -9.8e-231) {
tmp = b / (c_m * z);
} else if (t <= 3.5e-97) {
tmp = t_1;
} else {
tmp = (a / c_m) * (-4.0 * t);
}
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 = 9.0d0 * ((y / c_m) * (x / z))
if (t <= (-9.475d+155)) then
tmp = (-4.0d0) * (a * (t / c_m))
else if (t <= (-1.05d+59)) then
tmp = t_1
else if (t <= (-9.8d-231)) then
tmp = b / (c_m * z)
else if (t <= 3.5d-97) then
tmp = t_1
else
tmp = (a / c_m) * ((-4.0d0) * t)
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 * ((y / c_m) * (x / z));
double tmp;
if (t <= -9.475e+155) {
tmp = -4.0 * (a * (t / c_m));
} else if (t <= -1.05e+59) {
tmp = t_1;
} else if (t <= -9.8e-231) {
tmp = b / (c_m * z);
} else if (t <= 3.5e-97) {
tmp = t_1;
} else {
tmp = (a / c_m) * (-4.0 * t);
}
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 * ((y / c_m) * (x / z)) tmp = 0 if t <= -9.475e+155: tmp = -4.0 * (a * (t / c_m)) elif t <= -1.05e+59: tmp = t_1 elif t <= -9.8e-231: tmp = b / (c_m * z) elif t <= 3.5e-97: tmp = t_1 else: tmp = (a / c_m) * (-4.0 * t) 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(y / c_m) * Float64(x / z))) tmp = 0.0 if (t <= -9.475e+155) tmp = Float64(-4.0 * Float64(a * Float64(t / c_m))); elseif (t <= -1.05e+59) tmp = t_1; elseif (t <= -9.8e-231) tmp = Float64(b / Float64(c_m * z)); elseif (t <= 3.5e-97) tmp = t_1; else tmp = Float64(Float64(a / c_m) * Float64(-4.0 * t)); 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 * ((y / c_m) * (x / z));
tmp = 0.0;
if (t <= -9.475e+155)
tmp = -4.0 * (a * (t / c_m));
elseif (t <= -1.05e+59)
tmp = t_1;
elseif (t <= -9.8e-231)
tmp = b / (c_m * z);
elseif (t <= 3.5e-97)
tmp = t_1;
else
tmp = (a / c_m) * (-4.0 * t);
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[(y / c$95$m), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t, -9.475e+155], N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.05e+59], t$95$1, If[LessEqual[t, -9.8e-231], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e-97], t$95$1, N[(N[(a / c$95$m), $MachinePrecision] * N[(-4.0 * t), $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 := 9 \cdot \left(\frac{y}{c\_m} \cdot \frac{x}{z}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -9.475 \cdot 10^{+155}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -9.8 \cdot 10^{-231}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-97}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{c\_m} \cdot \left(-4 \cdot t\right)\\
\end{array}
\end{array}
\end{array}
if t < -9.47500000000000055e155Initial program 62.6%
associate-+l-62.6%
*-commutative62.6%
associate-*r*70.0%
*-commutative70.0%
associate-+l-70.0%
associate-*l*70.0%
associate-*l*68.5%
*-commutative68.5%
Simplified68.5%
Taylor expanded in z around inf 57.2%
*-commutative57.2%
associate-/l*68.4%
Simplified68.4%
if -9.47500000000000055e155 < t < -1.04999999999999992e59 or -9.80000000000000007e-231 < t < 3.50000000000000019e-97Initial program 81.4%
associate-+l-81.4%
*-commutative81.4%
associate-*r*83.3%
*-commutative83.3%
associate-+l-83.3%
associate-*l*83.3%
associate-*l*84.5%
*-commutative84.5%
Simplified84.5%
Taylor expanded in x around inf 78.3%
Taylor expanded in z around -inf 85.4%
associate-*r/85.4%
*-commutative85.4%
associate-*r/85.3%
associate-*r*78.0%
mul-1-neg78.0%
unsub-neg78.0%
associate-*r/78.0%
*-commutative78.0%
associate-/l*74.2%
mul-1-neg74.2%
unsub-neg74.2%
Simplified74.2%
Taylor expanded in c around 0 82.9%
Taylor expanded in x around inf 48.5%
*-commutative48.5%
times-frac48.5%
Simplified48.5%
if -1.04999999999999992e59 < t < -9.80000000000000007e-231Initial program 88.0%
associate-+l-88.0%
*-commutative88.0%
associate-*r*84.3%
*-commutative84.3%
associate-+l-84.3%
associate-*l*84.3%
associate-*l*88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in b around inf 61.1%
*-commutative61.1%
Simplified61.1%
if 3.50000000000000019e-97 < t Initial program 75.9%
associate-+l-75.9%
*-commutative75.9%
associate-*r*79.1%
*-commutative79.1%
associate-+l-79.1%
associate-*l*79.1%
associate-*l*77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in x around inf 67.2%
Taylor expanded in z around -inf 75.1%
associate-*r/75.1%
*-commutative75.1%
associate-*r/75.1%
associate-*r*80.8%
mul-1-neg80.8%
unsub-neg80.8%
associate-*r/80.9%
*-commutative80.9%
associate-/l*77.4%
mul-1-neg77.4%
unsub-neg77.4%
Simplified77.4%
Taylor expanded in c around 0 86.6%
Taylor expanded in a around inf 43.2%
associate-*r/43.2%
associate-*r*43.2%
associate-*l/46.1%
associate-*r/46.1%
*-commutative46.1%
associate-*l*46.1%
Simplified46.1%
Final simplification52.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 (<= t -9.475e+155)
(* -4.0 (* a (/ t c_m)))
(if (<= t -6.8e+58)
(* 9.0 (* (/ y c_m) (/ x z)))
(if (<= t -3.9e-208)
(/ b (* c_m z))
(if (<= t 6e-95)
(* x (* (/ y c_m) (/ 9.0 z)))
(* (/ a c_m) (* -4.0 t))))))))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 (t <= -9.475e+155) {
tmp = -4.0 * (a * (t / c_m));
} else if (t <= -6.8e+58) {
tmp = 9.0 * ((y / c_m) * (x / z));
} else if (t <= -3.9e-208) {
tmp = b / (c_m * z);
} else if (t <= 6e-95) {
tmp = x * ((y / c_m) * (9.0 / z));
} else {
tmp = (a / c_m) * (-4.0 * t);
}
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 (t <= (-9.475d+155)) then
tmp = (-4.0d0) * (a * (t / c_m))
else if (t <= (-6.8d+58)) then
tmp = 9.0d0 * ((y / c_m) * (x / z))
else if (t <= (-3.9d-208)) then
tmp = b / (c_m * z)
else if (t <= 6d-95) then
tmp = x * ((y / c_m) * (9.0d0 / z))
else
tmp = (a / c_m) * ((-4.0d0) * t)
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 (t <= -9.475e+155) {
tmp = -4.0 * (a * (t / c_m));
} else if (t <= -6.8e+58) {
tmp = 9.0 * ((y / c_m) * (x / z));
} else if (t <= -3.9e-208) {
tmp = b / (c_m * z);
} else if (t <= 6e-95) {
tmp = x * ((y / c_m) * (9.0 / z));
} else {
tmp = (a / c_m) * (-4.0 * t);
}
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 t <= -9.475e+155: tmp = -4.0 * (a * (t / c_m)) elif t <= -6.8e+58: tmp = 9.0 * ((y / c_m) * (x / z)) elif t <= -3.9e-208: tmp = b / (c_m * z) elif t <= 6e-95: tmp = x * ((y / c_m) * (9.0 / z)) else: tmp = (a / c_m) * (-4.0 * t) 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 (t <= -9.475e+155) tmp = Float64(-4.0 * Float64(a * Float64(t / c_m))); elseif (t <= -6.8e+58) tmp = Float64(9.0 * Float64(Float64(y / c_m) * Float64(x / z))); elseif (t <= -3.9e-208) tmp = Float64(b / Float64(c_m * z)); elseif (t <= 6e-95) tmp = Float64(x * Float64(Float64(y / c_m) * Float64(9.0 / z))); else tmp = Float64(Float64(a / c_m) * Float64(-4.0 * t)); 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 (t <= -9.475e+155)
tmp = -4.0 * (a * (t / c_m));
elseif (t <= -6.8e+58)
tmp = 9.0 * ((y / c_m) * (x / z));
elseif (t <= -3.9e-208)
tmp = b / (c_m * z);
elseif (t <= 6e-95)
tmp = x * ((y / c_m) * (9.0 / z));
else
tmp = (a / c_m) * (-4.0 * t);
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[t, -9.475e+155], N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.8e+58], N[(9.0 * N[(N[(y / c$95$m), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.9e-208], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-95], N[(x * N[(N[(y / c$95$m), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a / c$95$m), $MachinePrecision] * N[(-4.0 * t), $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}\;t \leq -9.475 \cdot 10^{+155}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{+58}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c\_m} \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;t \leq -3.9 \cdot 10^{-208}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-95}:\\
\;\;\;\;x \cdot \left(\frac{y}{c\_m} \cdot \frac{9}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{c\_m} \cdot \left(-4 \cdot t\right)\\
\end{array}
\end{array}
if t < -9.47500000000000055e155Initial program 62.6%
associate-+l-62.6%
*-commutative62.6%
associate-*r*70.0%
*-commutative70.0%
associate-+l-70.0%
associate-*l*70.0%
associate-*l*68.5%
*-commutative68.5%
Simplified68.5%
Taylor expanded in z around inf 57.2%
*-commutative57.2%
associate-/l*68.4%
Simplified68.4%
if -9.47500000000000055e155 < t < -6.8000000000000001e58Initial program 66.2%
associate-+l-66.2%
*-commutative66.2%
associate-*r*73.7%
*-commutative73.7%
associate-+l-73.7%
associate-*l*73.7%
associate-*l*70.0%
*-commutative70.0%
Simplified70.0%
Taylor expanded in x around inf 80.2%
Taylor expanded in z around -inf 85.5%
associate-*r/85.5%
*-commutative85.5%
associate-*r/85.5%
associate-*r*74.5%
mul-1-neg74.5%
unsub-neg74.5%
associate-*r/74.5%
*-commutative74.5%
associate-/l*74.2%
mul-1-neg74.2%
unsub-neg74.2%
Simplified74.2%
Taylor expanded in c around 0 78.7%
Taylor expanded in x around inf 42.8%
*-commutative42.8%
times-frac46.1%
Simplified46.1%
if -6.8000000000000001e58 < t < -3.90000000000000004e-208Initial program 86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*82.6%
*-commutative82.6%
associate-+l-82.6%
associate-*l*82.5%
associate-*l*86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in b around inf 61.2%
*-commutative61.2%
Simplified61.2%
if -3.90000000000000004e-208 < t < 6e-95Initial program 90.2%
associate-+l-90.2%
*-commutative90.2%
associate-*r*89.3%
*-commutative89.3%
associate-+l-89.3%
associate-*l*89.3%
associate-*l*92.8%
*-commutative92.8%
Simplified92.8%
Taylor expanded in x around inf 81.1%
associate-*r*81.2%
Simplified81.2%
Taylor expanded in x around inf 52.4%
associate-/l*57.6%
associate-*r*57.6%
*-commutative57.6%
associate-*r*57.7%
associate-*r/57.5%
*-commutative57.5%
times-frac55.9%
Simplified55.9%
if 6e-95 < t Initial program 75.9%
associate-+l-75.9%
*-commutative75.9%
associate-*r*79.1%
*-commutative79.1%
associate-+l-79.1%
associate-*l*79.1%
associate-*l*77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in x around inf 67.2%
Taylor expanded in z around -inf 75.1%
associate-*r/75.1%
*-commutative75.1%
associate-*r/75.1%
associate-*r*80.8%
mul-1-neg80.8%
unsub-neg80.8%
associate-*r/80.9%
*-commutative80.9%
associate-/l*77.4%
mul-1-neg77.4%
unsub-neg77.4%
Simplified77.4%
Taylor expanded in c around 0 86.6%
Taylor expanded in a around inf 43.2%
associate-*r/43.2%
associate-*r*43.2%
associate-*l/46.1%
associate-*r/46.1%
*-commutative46.1%
associate-*l*46.1%
Simplified46.1%
Final simplification53.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
(*
c_s
(if (<= c_m 1.2e+46)
(/ (+ b (- (* x (* y 9.0)) (* (* a t) (* z 4.0)))) (* c_m z))
(+
(* -4.0 (/ (* a t) c_m))
(/ (* x (+ (/ b (* c_m x)) (* 9.0 (/ 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 tmp;
if (c_m <= 1.2e+46) {
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z);
} else {
tmp = (-4.0 * ((a * t) / c_m)) + ((x * ((b / (c_m * x)) + (9.0 * (y / 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 (c_m <= 1.2d+46) then
tmp = (b + ((x * (y * 9.0d0)) - ((a * t) * (z * 4.0d0)))) / (c_m * z)
else
tmp = ((-4.0d0) * ((a * t) / c_m)) + ((x * ((b / (c_m * x)) + (9.0d0 * (y / 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 (c_m <= 1.2e+46) {
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z);
} else {
tmp = (-4.0 * ((a * t) / c_m)) + ((x * ((b / (c_m * x)) + (9.0 * (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): tmp = 0 if c_m <= 1.2e+46: tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z) else: tmp = (-4.0 * ((a * t) / c_m)) + ((x * ((b / (c_m * x)) + (9.0 * (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) tmp = 0.0 if (c_m <= 1.2e+46) tmp = Float64(Float64(b + Float64(Float64(x * Float64(y * 9.0)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(c_m * z)); else tmp = Float64(Float64(-4.0 * Float64(Float64(a * t) / c_m)) + Float64(Float64(x * Float64(Float64(b / Float64(c_m * x)) + Float64(9.0 * 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)
tmp = 0.0;
if (c_m <= 1.2e+46)
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z);
else
tmp = (-4.0 * ((a * t) / c_m)) + ((x * ((b / (c_m * x)) + (9.0 * (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_] := N[(c$95$s * If[LessEqual[c$95$m, 1.2e+46], N[(N[(b + N[(N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[(N[(b / N[(c$95$m * x), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(y / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}\;c\_m \leq 1.2 \cdot 10^{+46}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(y \cdot 9\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m} + \frac{x \cdot \left(\frac{b}{c\_m \cdot x} + 9 \cdot \frac{y}{c\_m}\right)}{z}\\
\end{array}
\end{array}
if c < 1.20000000000000004e46Initial program 83.0%
associate-+l-83.0%
*-commutative83.0%
associate-*r*85.5%
*-commutative85.5%
associate-+l-85.5%
associate-*l*85.5%
associate-*l*86.7%
*-commutative86.7%
Simplified86.7%
if 1.20000000000000004e46 < c Initial program 60.7%
associate-+l-60.7%
*-commutative60.7%
associate-*r*60.7%
*-commutative60.7%
associate-+l-60.7%
associate-*l*60.7%
associate-*l*57.5%
*-commutative57.5%
Simplified57.5%
Taylor expanded in x around inf 57.6%
Taylor expanded in z around inf 77.8%
Final simplification84.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 (<= c_m 1.95e+46)
(/ (+ b (- (* x (* y 9.0)) (* (* a t) (* z 4.0)))) (* c_m z))
(+
(* a (/ (* -4.0 t) c_m))
(* (/ x z) (- (/ b (* c_m x)) (* -9.0 (/ y 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 (c_m <= 1.95e+46) {
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z);
} else {
tmp = (a * ((-4.0 * t) / c_m)) + ((x / z) * ((b / (c_m * x)) - (-9.0 * (y / 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 (c_m <= 1.95d+46) then
tmp = (b + ((x * (y * 9.0d0)) - ((a * t) * (z * 4.0d0)))) / (c_m * z)
else
tmp = (a * (((-4.0d0) * t) / c_m)) + ((x / z) * ((b / (c_m * x)) - ((-9.0d0) * (y / 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 (c_m <= 1.95e+46) {
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z);
} else {
tmp = (a * ((-4.0 * t) / c_m)) + ((x / z) * ((b / (c_m * x)) - (-9.0 * (y / 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 c_m <= 1.95e+46: tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z) else: tmp = (a * ((-4.0 * t) / c_m)) + ((x / z) * ((b / (c_m * x)) - (-9.0 * (y / 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 (c_m <= 1.95e+46) tmp = Float64(Float64(b + Float64(Float64(x * Float64(y * 9.0)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(c_m * z)); else tmp = Float64(Float64(a * Float64(Float64(-4.0 * t) / c_m)) + Float64(Float64(x / z) * Float64(Float64(b / Float64(c_m * x)) - Float64(-9.0 * Float64(y / 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 (c_m <= 1.95e+46)
tmp = (b + ((x * (y * 9.0)) - ((a * t) * (z * 4.0)))) / (c_m * z);
else
tmp = (a * ((-4.0 * t) / c_m)) + ((x / z) * ((b / (c_m * x)) - (-9.0 * (y / 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[c$95$m, 1.95e+46], N[(N[(b + N[(N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(N[(-4.0 * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] * N[(N[(b / N[(c$95$m * x), $MachinePrecision]), $MachinePrecision] - N[(-9.0 * N[(y / c$95$m), $MachinePrecision]), $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])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 1.95 \cdot 10^{+46}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(y \cdot 9\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{-4 \cdot t}{c\_m} + \frac{x}{z} \cdot \left(\frac{b}{c\_m \cdot x} - -9 \cdot \frac{y}{c\_m}\right)\\
\end{array}
\end{array}
if c < 1.94999999999999997e46Initial program 83.0%
associate-+l-83.0%
*-commutative83.0%
associate-*r*85.5%
*-commutative85.5%
associate-+l-85.5%
associate-*l*85.5%
associate-*l*86.7%
*-commutative86.7%
Simplified86.7%
if 1.94999999999999997e46 < c Initial program 60.7%
associate-+l-60.7%
*-commutative60.7%
associate-*r*60.7%
*-commutative60.7%
associate-+l-60.7%
associate-*l*60.7%
associate-*l*57.5%
*-commutative57.5%
Simplified57.5%
Taylor expanded in x around inf 57.6%
Taylor expanded in z around -inf 77.8%
associate-*r/77.8%
*-commutative77.8%
associate-*r/77.7%
associate-*r*85.8%
mul-1-neg85.8%
unsub-neg85.8%
associate-*r/85.9%
*-commutative85.9%
associate-/l*79.9%
mul-1-neg79.9%
unsub-neg79.9%
Simplified79.9%
Final simplification85.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
(if (<= y -9.8e-48)
(* x (* (/ y c_m) (/ 9.0 z)))
(if (<= y 2.8e+139)
(+ (* -4.0 (/ (* a t) c_m)) (/ (/ b c_m) z))
(/ (* x (+ (/ b (* c_m x)) (* 9.0 (/ 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 tmp;
if (y <= -9.8e-48) {
tmp = x * ((y / c_m) * (9.0 / z));
} else if (y <= 2.8e+139) {
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
} else {
tmp = (x * ((b / (c_m * x)) + (9.0 * (y / 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 (y <= (-9.8d-48)) then
tmp = x * ((y / c_m) * (9.0d0 / z))
else if (y <= 2.8d+139) then
tmp = ((-4.0d0) * ((a * t) / c_m)) + ((b / c_m) / z)
else
tmp = (x * ((b / (c_m * x)) + (9.0d0 * (y / 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 (y <= -9.8e-48) {
tmp = x * ((y / c_m) * (9.0 / z));
} else if (y <= 2.8e+139) {
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
} else {
tmp = (x * ((b / (c_m * x)) + (9.0 * (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): tmp = 0 if y <= -9.8e-48: tmp = x * ((y / c_m) * (9.0 / z)) elif y <= 2.8e+139: tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z) else: tmp = (x * ((b / (c_m * x)) + (9.0 * (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) tmp = 0.0 if (y <= -9.8e-48) tmp = Float64(x * Float64(Float64(y / c_m) * Float64(9.0 / z))); elseif (y <= 2.8e+139) tmp = Float64(Float64(-4.0 * Float64(Float64(a * t) / c_m)) + Float64(Float64(b / c_m) / z)); else tmp = Float64(Float64(x * Float64(Float64(b / Float64(c_m * x)) + Float64(9.0 * 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)
tmp = 0.0;
if (y <= -9.8e-48)
tmp = x * ((y / c_m) * (9.0 / z));
elseif (y <= 2.8e+139)
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
else
tmp = (x * ((b / (c_m * x)) + (9.0 * (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_] := N[(c$95$s * If[LessEqual[y, -9.8e-48], N[(x * N[(N[(y / c$95$m), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e+139], N[(N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(b / N[(c$95$m * x), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(y / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $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}\;y \leq -9.8 \cdot 10^{-48}:\\
\;\;\;\;x \cdot \left(\frac{y}{c\_m} \cdot \frac{9}{z}\right)\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+139}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m} + \frac{\frac{b}{c\_m}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\frac{b}{c\_m \cdot x} + 9 \cdot \frac{y}{c\_m}\right)}{z}\\
\end{array}
\end{array}
if y < -9.8000000000000005e-48Initial program 71.3%
associate-+l-71.3%
*-commutative71.3%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*72.9%
*-commutative72.9%
Simplified72.9%
Taylor expanded in x around inf 63.7%
associate-*r*63.7%
Simplified63.7%
Taylor expanded in x around inf 48.6%
associate-/l*56.1%
associate-*r*56.0%
*-commutative56.0%
associate-*r*56.0%
associate-*r/55.9%
*-commutative55.9%
times-frac60.7%
Simplified60.7%
if -9.8000000000000005e-48 < y < 2.7999999999999998e139Initial program 81.1%
associate-+l-81.1%
*-commutative81.1%
associate-*r*83.7%
*-commutative83.7%
associate-+l-83.7%
associate-*l*83.7%
associate-*l*84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in x around inf 69.1%
Taylor expanded in z around inf 74.5%
Taylor expanded in x around 0 72.3%
if 2.7999999999999998e139 < y Initial program 77.0%
associate-+l-77.0%
*-commutative77.0%
associate-*r*77.0%
*-commutative77.0%
associate-+l-77.0%
associate-*l*77.0%
associate-*l*77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in x around inf 60.9%
Taylor expanded in z around 0 70.5%
Final simplification69.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
(if (<= y -9.8e-48)
(* x (* (/ y c_m) (/ 9.0 z)))
(if (<= y 1.15e+141)
(+ (* -4.0 (/ (* a t) c_m)) (/ (/ b c_m) z))
(* (/ y c_m) (/ (* x 9.0) 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 (y <= -9.8e-48) {
tmp = x * ((y / c_m) * (9.0 / z));
} else if (y <= 1.15e+141) {
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
} else {
tmp = (y / c_m) * ((x * 9.0) / 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 (y <= (-9.8d-48)) then
tmp = x * ((y / c_m) * (9.0d0 / z))
else if (y <= 1.15d+141) then
tmp = ((-4.0d0) * ((a * t) / c_m)) + ((b / c_m) / z)
else
tmp = (y / c_m) * ((x * 9.0d0) / 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 (y <= -9.8e-48) {
tmp = x * ((y / c_m) * (9.0 / z));
} else if (y <= 1.15e+141) {
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
} else {
tmp = (y / c_m) * ((x * 9.0) / 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 y <= -9.8e-48: tmp = x * ((y / c_m) * (9.0 / z)) elif y <= 1.15e+141: tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z) else: tmp = (y / c_m) * ((x * 9.0) / 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 (y <= -9.8e-48) tmp = Float64(x * Float64(Float64(y / c_m) * Float64(9.0 / z))); elseif (y <= 1.15e+141) tmp = Float64(Float64(-4.0 * Float64(Float64(a * t) / c_m)) + Float64(Float64(b / c_m) / z)); else tmp = Float64(Float64(y / c_m) * Float64(Float64(x * 9.0) / 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 (y <= -9.8e-48)
tmp = x * ((y / c_m) * (9.0 / z));
elseif (y <= 1.15e+141)
tmp = (-4.0 * ((a * t) / c_m)) + ((b / c_m) / z);
else
tmp = (y / c_m) * ((x * 9.0) / 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[y, -9.8e-48], N[(x * N[(N[(y / c$95$m), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+141], N[(N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(y / c$95$m), $MachinePrecision] * N[(N[(x * 9.0), $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}\;y \leq -9.8 \cdot 10^{-48}:\\
\;\;\;\;x \cdot \left(\frac{y}{c\_m} \cdot \frac{9}{z}\right)\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+141}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m} + \frac{\frac{b}{c\_m}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{c\_m} \cdot \frac{x \cdot 9}{z}\\
\end{array}
\end{array}
if y < -9.8000000000000005e-48Initial program 71.3%
associate-+l-71.3%
*-commutative71.3%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*72.9%
*-commutative72.9%
Simplified72.9%
Taylor expanded in x around inf 63.7%
associate-*r*63.7%
Simplified63.7%
Taylor expanded in x around inf 48.6%
associate-/l*56.1%
associate-*r*56.0%
*-commutative56.0%
associate-*r*56.0%
associate-*r/55.9%
*-commutative55.9%
times-frac60.7%
Simplified60.7%
if -9.8000000000000005e-48 < y < 1.1500000000000001e141Initial program 81.1%
associate-+l-81.1%
*-commutative81.1%
associate-*r*83.7%
*-commutative83.7%
associate-+l-83.7%
associate-*l*83.7%
associate-*l*84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in x around inf 69.1%
Taylor expanded in z around inf 74.5%
Taylor expanded in x around 0 72.3%
if 1.1500000000000001e141 < y Initial program 77.0%
associate-+l-77.0%
*-commutative77.0%
associate-*r*77.0%
*-commutative77.0%
associate-+l-77.0%
associate-*l*77.0%
associate-*l*77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in x around inf 60.7%
associate-*r/60.7%
*-commutative60.7%
times-frac60.8%
associate-/l*64.4%
associate-*r*67.3%
Simplified67.3%
associate-*l/67.4%
Applied egg-rr67.4%
Final simplification68.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 (<= t -1.4e+148)
(* -4.0 (* a (/ t c_m)))
(if (<= t 1.95e-61)
(/ (+ b (* y (* x 9.0))) (* c_m z))
(* (/ a c_m) (* -4.0 t))))))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 (t <= -1.4e+148) {
tmp = -4.0 * (a * (t / c_m));
} else if (t <= 1.95e-61) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else {
tmp = (a / c_m) * (-4.0 * t);
}
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 (t <= (-1.4d+148)) then
tmp = (-4.0d0) * (a * (t / c_m))
else if (t <= 1.95d-61) then
tmp = (b + (y * (x * 9.0d0))) / (c_m * z)
else
tmp = (a / c_m) * ((-4.0d0) * t)
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 (t <= -1.4e+148) {
tmp = -4.0 * (a * (t / c_m));
} else if (t <= 1.95e-61) {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
} else {
tmp = (a / c_m) * (-4.0 * t);
}
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 t <= -1.4e+148: tmp = -4.0 * (a * (t / c_m)) elif t <= 1.95e-61: tmp = (b + (y * (x * 9.0))) / (c_m * z) else: tmp = (a / c_m) * (-4.0 * t) 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 (t <= -1.4e+148) tmp = Float64(-4.0 * Float64(a * Float64(t / c_m))); elseif (t <= 1.95e-61) tmp = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(c_m * z)); else tmp = Float64(Float64(a / c_m) * Float64(-4.0 * t)); 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 (t <= -1.4e+148)
tmp = -4.0 * (a * (t / c_m));
elseif (t <= 1.95e-61)
tmp = (b + (y * (x * 9.0))) / (c_m * z);
else
tmp = (a / c_m) * (-4.0 * t);
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[t, -1.4e+148], N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e-61], N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(a / c$95$m), $MachinePrecision] * N[(-4.0 * t), $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}\;t \leq -1.4 \cdot 10^{+148}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-61}:\\
\;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{c\_m} \cdot \left(-4 \cdot t\right)\\
\end{array}
\end{array}
if t < -1.3999999999999999e148Initial program 60.5%
associate-+l-60.5%
*-commutative60.5%
associate-*r*67.3%
*-commutative67.3%
associate-+l-67.3%
associate-*l*67.3%
associate-*l*66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in z around inf 55.4%
*-commutative55.4%
associate-/l*65.6%
Simplified65.6%
if -1.3999999999999999e148 < t < 1.95000000000000016e-61Initial program 84.8%
associate-+l-84.8%
*-commutative84.8%
associate-*r*84.5%
*-commutative84.5%
associate-+l-84.5%
associate-*l*84.5%
associate-*l*86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in x around inf 74.6%
associate-*r*74.6%
Simplified74.6%
if 1.95000000000000016e-61 < t Initial program 75.9%
associate-+l-75.9%
*-commutative75.9%
associate-*r*79.3%
*-commutative79.3%
associate-+l-79.3%
associate-*l*79.3%
associate-*l*77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in x around inf 66.8%
Taylor expanded in z around -inf 74.0%
associate-*r/74.0%
*-commutative74.0%
associate-*r/74.0%
associate-*r*80.0%
mul-1-neg80.0%
unsub-neg80.0%
associate-*r/80.0%
*-commutative80.0%
associate-/l*77.5%
mul-1-neg77.5%
unsub-neg77.5%
Simplified77.5%
Taylor expanded in c around 0 86.0%
Taylor expanded in a around inf 43.9%
associate-*r/43.9%
associate-*r*43.9%
associate-*l/47.0%
associate-*r/47.0%
*-commutative47.0%
associate-*l*47.0%
Simplified47.0%
Final simplification63.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 (or (<= z -4.8e-7) (not (<= z 7.5e-46)))
(* -4.0 (/ (* a t) 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 ((z <= -4.8e-7) || !(z <= 7.5e-46)) {
tmp = -4.0 * ((a * t) / c_m);
} else {
tmp = 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 ((z <= (-4.8d-7)) .or. (.not. (z <= 7.5d-46))) then
tmp = (-4.0d0) * ((a * t) / c_m)
else
tmp = 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 ((z <= -4.8e-7) || !(z <= 7.5e-46)) {
tmp = -4.0 * ((a * t) / c_m);
} else {
tmp = 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 (z <= -4.8e-7) or not (z <= 7.5e-46): tmp = -4.0 * ((a * t) / c_m) else: tmp = 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 ((z <= -4.8e-7) || !(z <= 7.5e-46)) tmp = Float64(-4.0 * Float64(Float64(a * t) / c_m)); else tmp = Float64(b / Float64(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 ((z <= -4.8e-7) || ~((z <= 7.5e-46)))
tmp = -4.0 * ((a * t) / c_m);
else
tmp = 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[Or[LessEqual[z, -4.8e-7], N[Not[LessEqual[z, 7.5e-46]], $MachinePrecision]], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], N[(b / N[(c$95$m * 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}\;z \leq -4.8 \cdot 10^{-7} \lor \neg \left(z \leq 7.5 \cdot 10^{-46}\right):\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -4.79999999999999957e-7 or 7.50000000000000027e-46 < z Initial program 64.0%
associate-+l-64.0%
*-commutative64.0%
associate-*r*67.0%
*-commutative67.0%
associate-+l-67.0%
associate-*l*67.0%
associate-*l*69.7%
*-commutative69.7%
Simplified69.7%
Taylor expanded in z around inf 52.5%
if -4.79999999999999957e-7 < z < 7.50000000000000027e-46Initial program 95.6%
associate-+l-95.6%
*-commutative95.6%
associate-*r*96.4%
*-commutative96.4%
associate-+l-96.4%
associate-*l*96.4%
associate-*l*93.5%
*-commutative93.5%
Simplified93.5%
Taylor expanded in b around inf 51.5%
*-commutative51.5%
Simplified51.5%
Final simplification52.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 (<= t -9e+56) (not (<= t 2.5e-60)))
(* a (* t (/ -4.0 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 ((t <= -9e+56) || !(t <= 2.5e-60)) {
tmp = a * (t * (-4.0 / c_m));
} else {
tmp = 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 ((t <= (-9d+56)) .or. (.not. (t <= 2.5d-60))) then
tmp = a * (t * ((-4.0d0) / c_m))
else
tmp = 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 ((t <= -9e+56) || !(t <= 2.5e-60)) {
tmp = a * (t * (-4.0 / c_m));
} else {
tmp = 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 (t <= -9e+56) or not (t <= 2.5e-60): tmp = a * (t * (-4.0 / c_m)) else: tmp = 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 ((t <= -9e+56) || !(t <= 2.5e-60)) tmp = Float64(a * Float64(t * Float64(-4.0 / c_m))); else tmp = Float64(b / Float64(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 ((t <= -9e+56) || ~((t <= 2.5e-60)))
tmp = a * (t * (-4.0 / c_m));
else
tmp = 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[Or[LessEqual[t, -9e+56], N[Not[LessEqual[t, 2.5e-60]], $MachinePrecision]], N[(a * N[(t * N[(-4.0 / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(c$95$m * 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}\;t \leq -9 \cdot 10^{+56} \lor \neg \left(t \leq 2.5 \cdot 10^{-60}\right):\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\end{array}
\end{array}
if t < -9.0000000000000006e56 or 2.5000000000000001e-60 < t Initial program 71.1%
associate-+l-71.1%
*-commutative71.1%
associate-*r*76.1%
*-commutative76.1%
associate-+l-76.1%
associate-*l*76.2%
associate-*l*73.9%
*-commutative73.9%
Simplified73.9%
Taylor expanded in x around inf 67.6%
Taylor expanded in z around inf 47.6%
associate-*r/47.6%
*-commutative47.6%
associate-*r/47.5%
associate-*r*52.8%
Simplified52.8%
if -9.0000000000000006e56 < t < 2.5000000000000001e-60Initial program 88.2%
associate-+l-88.2%
*-commutative88.2%
associate-*r*86.0%
*-commutative86.0%
associate-+l-86.0%
associate-*l*85.9%
associate-*l*89.6%
*-commutative89.6%
Simplified89.6%
Taylor expanded in b around inf 52.5%
*-commutative52.5%
Simplified52.5%
Final simplification52.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 (<= t -6.8e+56)
(* -4.0 (* a (/ t c_m)))
(if (<= t 2.1e-67) (/ b (* c_m z)) (* a (* t (/ -4.0 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 (t <= -6.8e+56) {
tmp = -4.0 * (a * (t / c_m));
} else if (t <= 2.1e-67) {
tmp = b / (c_m * z);
} else {
tmp = a * (t * (-4.0 / 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 (t <= (-6.8d+56)) then
tmp = (-4.0d0) * (a * (t / c_m))
else if (t <= 2.1d-67) then
tmp = b / (c_m * z)
else
tmp = a * (t * ((-4.0d0) / 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 (t <= -6.8e+56) {
tmp = -4.0 * (a * (t / c_m));
} else if (t <= 2.1e-67) {
tmp = b / (c_m * z);
} else {
tmp = a * (t * (-4.0 / 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 t <= -6.8e+56: tmp = -4.0 * (a * (t / c_m)) elif t <= 2.1e-67: tmp = b / (c_m * z) else: tmp = a * (t * (-4.0 / 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 (t <= -6.8e+56) tmp = Float64(-4.0 * Float64(a * Float64(t / c_m))); elseif (t <= 2.1e-67) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(a * Float64(t * Float64(-4.0 / 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 (t <= -6.8e+56)
tmp = -4.0 * (a * (t / c_m));
elseif (t <= 2.1e-67)
tmp = b / (c_m * z);
else
tmp = a * (t * (-4.0 / 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[t, -6.8e+56], N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-67], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(a * N[(t * N[(-4.0 / c$95$m), $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])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+56}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-67}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c\_m}\right)\\
\end{array}
\end{array}
if t < -6.80000000000000002e56Initial program 64.2%
associate-+l-64.2%
*-commutative64.2%
associate-*r*71.6%
*-commutative71.6%
associate-+l-71.6%
associate-*l*71.6%
associate-*l*69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in z around inf 53.0%
*-commutative53.0%
associate-/l*57.7%
Simplified57.7%
if -6.80000000000000002e56 < t < 2.1000000000000002e-67Initial program 88.2%
associate-+l-88.2%
*-commutative88.2%
associate-*r*86.0%
*-commutative86.0%
associate-+l-86.0%
associate-*l*85.9%
associate-*l*89.6%
*-commutative89.6%
Simplified89.6%
Taylor expanded in b around inf 52.5%
*-commutative52.5%
Simplified52.5%
if 2.1000000000000002e-67 < t Initial program 75.9%
associate-+l-75.9%
*-commutative75.9%
associate-*r*79.3%
*-commutative79.3%
associate-+l-79.3%
associate-*l*79.3%
associate-*l*77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in x around inf 66.8%
Taylor expanded in z around inf 43.9%
associate-*r/43.9%
*-commutative43.9%
associate-*r/43.8%
associate-*r*49.5%
Simplified49.5%
Final simplification52.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 (<= t -1.35e+57)
(* -4.0 (* a (/ t c_m)))
(if (<= t 1.3e-62) (/ b (* c_m z)) (* (/ a c_m) (* -4.0 t))))))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 (t <= -1.35e+57) {
tmp = -4.0 * (a * (t / c_m));
} else if (t <= 1.3e-62) {
tmp = b / (c_m * z);
} else {
tmp = (a / c_m) * (-4.0 * t);
}
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 (t <= (-1.35d+57)) then
tmp = (-4.0d0) * (a * (t / c_m))
else if (t <= 1.3d-62) then
tmp = b / (c_m * z)
else
tmp = (a / c_m) * ((-4.0d0) * t)
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 (t <= -1.35e+57) {
tmp = -4.0 * (a * (t / c_m));
} else if (t <= 1.3e-62) {
tmp = b / (c_m * z);
} else {
tmp = (a / c_m) * (-4.0 * t);
}
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 t <= -1.35e+57: tmp = -4.0 * (a * (t / c_m)) elif t <= 1.3e-62: tmp = b / (c_m * z) else: tmp = (a / c_m) * (-4.0 * t) 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 (t <= -1.35e+57) tmp = Float64(-4.0 * Float64(a * Float64(t / c_m))); elseif (t <= 1.3e-62) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(Float64(a / c_m) * Float64(-4.0 * t)); 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 (t <= -1.35e+57)
tmp = -4.0 * (a * (t / c_m));
elseif (t <= 1.3e-62)
tmp = b / (c_m * z);
else
tmp = (a / c_m) * (-4.0 * t);
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[t, -1.35e+57], N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-62], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(a / c$95$m), $MachinePrecision] * N[(-4.0 * t), $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}\;t \leq -1.35 \cdot 10^{+57}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-62}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{c\_m} \cdot \left(-4 \cdot t\right)\\
\end{array}
\end{array}
if t < -1.3499999999999999e57Initial program 64.2%
associate-+l-64.2%
*-commutative64.2%
associate-*r*71.6%
*-commutative71.6%
associate-+l-71.6%
associate-*l*71.6%
associate-*l*69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in z around inf 53.0%
*-commutative53.0%
associate-/l*57.7%
Simplified57.7%
if -1.3499999999999999e57 < t < 1.3e-62Initial program 88.2%
associate-+l-88.2%
*-commutative88.2%
associate-*r*86.0%
*-commutative86.0%
associate-+l-86.0%
associate-*l*85.9%
associate-*l*89.6%
*-commutative89.6%
Simplified89.6%
Taylor expanded in b around inf 52.5%
*-commutative52.5%
Simplified52.5%
if 1.3e-62 < t Initial program 75.9%
associate-+l-75.9%
*-commutative75.9%
associate-*r*79.3%
*-commutative79.3%
associate-+l-79.3%
associate-*l*79.3%
associate-*l*77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in x around inf 66.8%
Taylor expanded in z around -inf 74.0%
associate-*r/74.0%
*-commutative74.0%
associate-*r/74.0%
associate-*r*80.0%
mul-1-neg80.0%
unsub-neg80.0%
associate-*r/80.0%
*-commutative80.0%
associate-/l*77.5%
mul-1-neg77.5%
unsub-neg77.5%
Simplified77.5%
Taylor expanded in c around 0 86.0%
Taylor expanded in a around inf 43.9%
associate-*r/43.9%
associate-*r*43.9%
associate-*l/47.0%
associate-*r/47.0%
*-commutative47.0%
associate-*l*47.0%
Simplified47.0%
Final simplification51.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 (/ 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) {
return c_s * (b / (c_m * z));
}
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 / (c_m * z))
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 / (c_m * z));
}
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 / (c_m * z))
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(c_m * z))) 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 / (c_m * z));
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[(c$95$m * 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 \frac{b}{c\_m \cdot z}
\end{array}
Initial program 78.2%
associate-+l-78.2%
*-commutative78.2%
associate-*r*80.2%
*-commutative80.2%
associate-+l-80.2%
associate-*l*80.2%
associate-*l*80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in b around inf 36.2%
*-commutative36.2%
Simplified36.2%
Final simplification36.2%
(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 2024078
(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)))