
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 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 9.2e-51)
(/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c_m)
(if (<= c_m 1.02e+180)
(+ (* (/ a c_m) (* -4.0 t)) (/ (- (/ b c_m) (/ (* y (* x -9.0)) c_m)) z))
(if (<= c_m 8.5e+282)
(fma
-4.0
(/ a (/ c_m t))
(fma 9.0 (/ (* y (/ x c_m)) z) (/ b (* c_m z))))
(+
(/ (* a (* -4.0 t)) c_m)
(/ (- (/ b c_m) (* (/ x c_m) (* y -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 (c_m <= 9.2e-51) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else if (c_m <= 1.02e+180) {
tmp = ((a / c_m) * (-4.0 * t)) + (((b / c_m) - ((y * (x * -9.0)) / c_m)) / z);
} else if (c_m <= 8.5e+282) {
tmp = fma(-4.0, (a / (c_m / t)), fma(9.0, ((y * (x / c_m)) / z), (b / (c_m * z))));
} else {
tmp = ((a * (-4.0 * t)) / c_m) + (((b / c_m) - ((x / c_m) * (y * -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 (c_m <= 9.2e-51) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c_m); elseif (c_m <= 1.02e+180) tmp = Float64(Float64(Float64(a / c_m) * Float64(-4.0 * t)) + Float64(Float64(Float64(b / c_m) - Float64(Float64(y * Float64(x * -9.0)) / c_m)) / z)); elseif (c_m <= 8.5e+282) tmp = fma(-4.0, Float64(a / Float64(c_m / t)), fma(9.0, Float64(Float64(y * Float64(x / c_m)) / z), Float64(b / Float64(c_m * z)))); else tmp = Float64(Float64(Float64(a * Float64(-4.0 * t)) / c_m) + Float64(Float64(Float64(b / c_m) - Float64(Float64(x / c_m) * Float64(y * -9.0))) / z)); end return Float64(c_s * tmp) end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 9.2e-51], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[c$95$m, 1.02e+180], N[(N[(N[(a / c$95$m), $MachinePrecision] * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b / c$95$m), $MachinePrecision] - N[(N[(y * N[(x * -9.0), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[c$95$m, 8.5e+282], N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(y * N[(x / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision] + N[(N[(N[(b / c$95$m), $MachinePrecision] - N[(N[(x / c$95$m), $MachinePrecision] * N[(y * -9.0), $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 9.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c_m}\\
\mathbf{elif}\;c_m \leq 1.02 \cdot 10^{+180}:\\
\;\;\;\;\frac{a}{c_m} \cdot \left(-4 \cdot t\right) + \frac{\frac{b}{c_m} - \frac{y \cdot \left(x \cdot -9\right)}{c_m}}{z}\\
\mathbf{elif}\;c_m \leq 8.5 \cdot 10^{+282}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{a}{\frac{c_m}{t}}, \mathsf{fma}\left(9, \frac{y \cdot \frac{x}{c_m}}{z}, \frac{b}{c_m \cdot z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t\right)}{c_m} + \frac{\frac{b}{c_m} - \frac{x}{c_m} \cdot \left(y \cdot -9\right)}{z}\\
\end{array}
\end{array}
if c < 9.20000000000000007e-51Initial program 83.6%
associate-+l-83.6%
*-commutative83.6%
associate-*r*82.6%
*-commutative82.6%
associate-+l-82.6%
*-commutative82.6%
associate-*r*83.6%
*-commutative83.6%
associate-*l*83.7%
associate-*l*85.3%
Simplified85.3%
Taylor expanded in x around 0 78.0%
cancel-sign-sub-inv78.0%
metadata-eval78.0%
+-commutative78.0%
fma-def78.0%
associate-/l*74.9%
fma-def74.9%
times-frac72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in c around 0 91.9%
if 9.20000000000000007e-51 < c < 1.02e180Initial program 80.0%
associate-+l-80.0%
*-commutative80.0%
associate-*r*80.0%
*-commutative80.0%
associate-+l-80.0%
*-commutative80.0%
associate-*r*80.0%
*-commutative80.0%
associate-*l*80.1%
associate-*l*82.3%
Simplified82.3%
Taylor expanded in x around 0 91.0%
cancel-sign-sub-inv91.0%
metadata-eval91.0%
+-commutative91.0%
fma-def91.0%
associate-/l*93.1%
fma-def93.1%
times-frac86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in c around 0 86.5%
Taylor expanded in z around -inf 95.3%
mul-1-neg95.3%
unsub-neg95.3%
*-commutative95.3%
associate-*l/97.5%
associate-*l*97.5%
mul-1-neg97.5%
unsub-neg97.5%
associate-*r/97.5%
*-commutative97.5%
*-commutative97.5%
associate-*l*97.5%
Simplified97.5%
if 1.02e180 < c < 8.5000000000000003e282Initial program 57.8%
associate-+l-57.8%
*-commutative57.8%
associate-*r*58.1%
*-commutative58.1%
associate-+l-58.1%
*-commutative58.1%
associate-*r*57.8%
*-commutative57.8%
associate-*l*57.9%
associate-*l*50.0%
Simplified50.0%
Taylor expanded in x around 0 59.2%
cancel-sign-sub-inv59.2%
metadata-eval59.2%
+-commutative59.2%
fma-def59.2%
associate-/l*79.2%
fma-def79.3%
times-frac87.8%
*-commutative87.8%
Simplified87.8%
associate-*r/95.5%
Applied egg-rr95.5%
if 8.5000000000000003e282 < c Initial program 66.7%
associate-+l-66.7%
*-commutative66.7%
associate-*r*33.3%
*-commutative33.3%
associate-+l-33.3%
*-commutative33.3%
associate-*r*66.7%
*-commutative66.7%
associate-*l*66.7%
associate-*l*66.7%
Simplified66.7%
Taylor expanded in x around 0 100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
+-commutative100.0%
fma-def100.0%
associate-/l*100.0%
fma-def100.0%
times-frac100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in z around -inf 100.0%
mul-1-neg100.0%
unsub-neg100.0%
associate-*r/100.0%
*-commutative100.0%
associate-*l*100.0%
mul-1-neg100.0%
unsub-neg100.0%
*-commutative100.0%
associate-*l/100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification93.3%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* 9.0 (* (/ x c_m) (/ y z)))))
(*
c_s
(if (<= z -21.0)
(/ (* a (* -4.0 t)) c_m)
(if (<= z -1.65e-63)
t_1
(if (<= z 1.9e-248)
(* b (/ 1.0 (* c_m z)))
(if (<= z 1.42e-177)
(* 9.0 (* y (/ (/ x c_m) z)))
(if (<= z 3.8e-105)
(* b (/ (/ 1.0 z) c_m))
(if (<= z 2.7e+82) t_1 (* -4.0 (* t (/ a c_m))))))))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * ((x / c_m) * (y / z));
double tmp;
if (z <= -21.0) {
tmp = (a * (-4.0 * t)) / c_m;
} else if (z <= -1.65e-63) {
tmp = t_1;
} else if (z <= 1.9e-248) {
tmp = b * (1.0 / (c_m * z));
} else if (z <= 1.42e-177) {
tmp = 9.0 * (y * ((x / c_m) / z));
} else if (z <= 3.8e-105) {
tmp = b * ((1.0 / z) / c_m);
} else if (z <= 2.7e+82) {
tmp = t_1;
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: tmp
t_1 = 9.0d0 * ((x / c_m) * (y / z))
if (z <= (-21.0d0)) then
tmp = (a * ((-4.0d0) * t)) / c_m
else if (z <= (-1.65d-63)) then
tmp = t_1
else if (z <= 1.9d-248) then
tmp = b * (1.0d0 / (c_m * z))
else if (z <= 1.42d-177) then
tmp = 9.0d0 * (y * ((x / c_m) / z))
else if (z <= 3.8d-105) then
tmp = b * ((1.0d0 / z) / c_m)
else if (z <= 2.7d+82) then
tmp = t_1
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * ((x / c_m) * (y / z));
double tmp;
if (z <= -21.0) {
tmp = (a * (-4.0 * t)) / c_m;
} else if (z <= -1.65e-63) {
tmp = t_1;
} else if (z <= 1.9e-248) {
tmp = b * (1.0 / (c_m * z));
} else if (z <= 1.42e-177) {
tmp = 9.0 * (y * ((x / c_m) / z));
} else if (z <= 3.8e-105) {
tmp = b * ((1.0 / z) / c_m);
} else if (z <= 2.7e+82) {
tmp = t_1;
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = 9.0 * ((x / c_m) * (y / z)) tmp = 0 if z <= -21.0: tmp = (a * (-4.0 * t)) / c_m elif z <= -1.65e-63: tmp = t_1 elif z <= 1.9e-248: tmp = b * (1.0 / (c_m * z)) elif z <= 1.42e-177: tmp = 9.0 * (y * ((x / c_m) / z)) elif z <= 3.8e-105: tmp = b * ((1.0 / z) / c_m) elif z <= 2.7e+82: tmp = t_1 else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(9.0 * Float64(Float64(x / c_m) * Float64(y / z))) tmp = 0.0 if (z <= -21.0) tmp = Float64(Float64(a * Float64(-4.0 * t)) / c_m); elseif (z <= -1.65e-63) tmp = t_1; elseif (z <= 1.9e-248) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); elseif (z <= 1.42e-177) tmp = Float64(9.0 * Float64(y * Float64(Float64(x / c_m) / z))); elseif (z <= 3.8e-105) tmp = Float64(b * Float64(Float64(1.0 / z) / c_m)); elseif (z <= 2.7e+82) tmp = t_1; else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = 9.0 * ((x / c_m) * (y / z));
tmp = 0.0;
if (z <= -21.0)
tmp = (a * (-4.0 * t)) / c_m;
elseif (z <= -1.65e-63)
tmp = t_1;
elseif (z <= 1.9e-248)
tmp = b * (1.0 / (c_m * z));
elseif (z <= 1.42e-177)
tmp = 9.0 * (y * ((x / c_m) / z));
elseif (z <= 3.8e-105)
tmp = b * ((1.0 / z) / c_m);
elseif (z <= 2.7e+82)
tmp = t_1;
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(9.0 * N[(N[(x / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -21.0], N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[z, -1.65e-63], t$95$1, If[LessEqual[z, 1.9e-248], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.42e-177], N[(9.0 * N[(y * N[(N[(x / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-105], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+82], t$95$1, N[(-4.0 * N[(t * N[(a / 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])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(\frac{x}{c_m} \cdot \frac{y}{z}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -21:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t\right)}{c_m}\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-63}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-248}:\\
\;\;\;\;b \cdot \frac{1}{c_m \cdot z}\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{-177}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c_m}}{z}\right)\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-105}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c_m}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+82}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\end{array}
\end{array}
\end{array}
if z < -21Initial program 66.1%
associate-+l-66.1%
*-commutative66.1%
associate-*r*60.6%
*-commutative60.6%
associate-+l-60.6%
*-commutative60.6%
associate-*r*66.1%
*-commutative66.1%
associate-*l*66.1%
associate-*l*70.5%
Simplified70.5%
Taylor expanded in z around inf 60.9%
*-commutative60.9%
*-commutative60.9%
associate-*l/60.9%
*-commutative60.9%
associate-*r*60.9%
*-commutative60.9%
*-commutative60.9%
Simplified60.9%
if -21 < z < -1.64999999999999997e-63 or 3.7999999999999998e-105 < z < 2.6999999999999999e82Initial program 86.1%
associate-+l-86.1%
*-commutative86.1%
associate-*r*90.2%
*-commutative90.2%
associate-+l-90.2%
*-commutative90.2%
associate-*r*86.1%
*-commutative86.1%
associate-*l*86.2%
associate-*l*90.3%
Simplified90.3%
Taylor expanded in x around inf 61.1%
associate-*r/61.1%
*-commutative61.1%
associate-*r*61.1%
*-commutative61.1%
times-frac66.7%
Simplified66.7%
Taylor expanded in y around 0 61.1%
times-frac66.8%
*-commutative66.8%
Simplified66.8%
if -1.64999999999999997e-63 < z < 1.8999999999999999e-248Initial program 95.4%
associate-+l-95.4%
*-commutative95.4%
associate-*r*95.4%
*-commutative95.4%
associate-+l-95.4%
*-commutative95.4%
associate-*r*95.4%
*-commutative95.4%
associate-*l*95.4%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in b around inf 63.9%
*-commutative63.9%
Simplified63.9%
div-inv64.0%
associate-/r*64.0%
Applied egg-rr64.0%
Taylor expanded in z around 0 64.0%
if 1.8999999999999999e-248 < z < 1.41999999999999995e-177Initial program 87.4%
associate-+l-87.4%
*-commutative87.4%
associate-*r*87.5%
*-commutative87.5%
associate-+l-87.5%
*-commutative87.5%
associate-*r*87.4%
*-commutative87.4%
associate-*l*87.4%
associate-*l*87.5%
Simplified87.5%
Taylor expanded in x around 0 69.8%
cancel-sign-sub-inv69.8%
metadata-eval69.8%
+-commutative69.8%
fma-def69.8%
associate-/l*69.8%
fma-def70.0%
times-frac69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in c around 0 78.9%
+-commutative78.9%
div-inv78.9%
fma-def78.9%
associate-/l*78.9%
Applied egg-rr78.9%
Taylor expanded in x around inf 66.6%
associate-*r/66.6%
associate-/r*70.6%
associate-*r/70.6%
*-commutative70.6%
associate-*r/74.4%
associate-*r/74.4%
associate-*r/70.4%
Simplified70.4%
if 1.41999999999999995e-177 < z < 3.7999999999999998e-105Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*l*99.9%
associate-*l*95.0%
Simplified95.0%
Taylor expanded in b around inf 71.9%
*-commutative71.9%
Simplified71.9%
div-inv76.9%
associate-/r*76.9%
Applied egg-rr76.9%
if 2.6999999999999999e82 < z Initial program 59.0%
associate-+l-59.0%
*-commutative59.0%
associate-*r*55.8%
*-commutative55.8%
associate-+l-55.8%
*-commutative55.8%
associate-*r*59.0%
*-commutative59.0%
associate-*l*59.0%
associate-*l*61.8%
Simplified61.8%
add-cube-cbrt61.8%
pow361.8%
*-commutative61.8%
associate-*l*61.8%
Applied egg-rr61.8%
Taylor expanded in z around inf 57.3%
associate-*l/68.5%
*-commutative68.5%
Simplified68.5%
Final simplification65.8%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* 9.0 (* (/ x c_m) (/ y z)))))
(*
c_s
(if (<= z -29.0)
(/ (* a (* -4.0 t)) c_m)
(if (<= z -5.9e-64)
t_1
(if (<= z -2.2e-283)
(* b (/ 1.0 (* c_m z)))
(if (<= z 7.4e-179)
(* 9.0 (/ (* y (/ x c_m)) z))
(if (<= z 3.25e-105)
(* b (/ (/ 1.0 z) c_m))
(if (<= z 3e+82) t_1 (* -4.0 (* t (/ a c_m))))))))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * ((x / c_m) * (y / z));
double tmp;
if (z <= -29.0) {
tmp = (a * (-4.0 * t)) / c_m;
} else if (z <= -5.9e-64) {
tmp = t_1;
} else if (z <= -2.2e-283) {
tmp = b * (1.0 / (c_m * z));
} else if (z <= 7.4e-179) {
tmp = 9.0 * ((y * (x / c_m)) / z);
} else if (z <= 3.25e-105) {
tmp = b * ((1.0 / z) / c_m);
} else if (z <= 3e+82) {
tmp = t_1;
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: tmp
t_1 = 9.0d0 * ((x / c_m) * (y / z))
if (z <= (-29.0d0)) then
tmp = (a * ((-4.0d0) * t)) / c_m
else if (z <= (-5.9d-64)) then
tmp = t_1
else if (z <= (-2.2d-283)) then
tmp = b * (1.0d0 / (c_m * z))
else if (z <= 7.4d-179) then
tmp = 9.0d0 * ((y * (x / c_m)) / z)
else if (z <= 3.25d-105) then
tmp = b * ((1.0d0 / z) / c_m)
else if (z <= 3d+82) then
tmp = t_1
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * ((x / c_m) * (y / z));
double tmp;
if (z <= -29.0) {
tmp = (a * (-4.0 * t)) / c_m;
} else if (z <= -5.9e-64) {
tmp = t_1;
} else if (z <= -2.2e-283) {
tmp = b * (1.0 / (c_m * z));
} else if (z <= 7.4e-179) {
tmp = 9.0 * ((y * (x / c_m)) / z);
} else if (z <= 3.25e-105) {
tmp = b * ((1.0 / z) / c_m);
} else if (z <= 3e+82) {
tmp = t_1;
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = 9.0 * ((x / c_m) * (y / z)) tmp = 0 if z <= -29.0: tmp = (a * (-4.0 * t)) / c_m elif z <= -5.9e-64: tmp = t_1 elif z <= -2.2e-283: tmp = b * (1.0 / (c_m * z)) elif z <= 7.4e-179: tmp = 9.0 * ((y * (x / c_m)) / z) elif z <= 3.25e-105: tmp = b * ((1.0 / z) / c_m) elif z <= 3e+82: tmp = t_1 else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(9.0 * Float64(Float64(x / c_m) * Float64(y / z))) tmp = 0.0 if (z <= -29.0) tmp = Float64(Float64(a * Float64(-4.0 * t)) / c_m); elseif (z <= -5.9e-64) tmp = t_1; elseif (z <= -2.2e-283) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); elseif (z <= 7.4e-179) tmp = Float64(9.0 * Float64(Float64(y * Float64(x / c_m)) / z)); elseif (z <= 3.25e-105) tmp = Float64(b * Float64(Float64(1.0 / z) / c_m)); elseif (z <= 3e+82) tmp = t_1; else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = 9.0 * ((x / c_m) * (y / z));
tmp = 0.0;
if (z <= -29.0)
tmp = (a * (-4.0 * t)) / c_m;
elseif (z <= -5.9e-64)
tmp = t_1;
elseif (z <= -2.2e-283)
tmp = b * (1.0 / (c_m * z));
elseif (z <= 7.4e-179)
tmp = 9.0 * ((y * (x / c_m)) / z);
elseif (z <= 3.25e-105)
tmp = b * ((1.0 / z) / c_m);
elseif (z <= 3e+82)
tmp = t_1;
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(9.0 * N[(N[(x / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -29.0], N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[z, -5.9e-64], t$95$1, If[LessEqual[z, -2.2e-283], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.4e-179], N[(9.0 * N[(N[(y * N[(x / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.25e-105], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+82], t$95$1, N[(-4.0 * N[(t * N[(a / 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])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(\frac{x}{c_m} \cdot \frac{y}{z}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -29:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t\right)}{c_m}\\
\mathbf{elif}\;z \leq -5.9 \cdot 10^{-64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-283}:\\
\;\;\;\;b \cdot \frac{1}{c_m \cdot z}\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{-179}:\\
\;\;\;\;9 \cdot \frac{y \cdot \frac{x}{c_m}}{z}\\
\mathbf{elif}\;z \leq 3.25 \cdot 10^{-105}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c_m}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+82}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\end{array}
\end{array}
\end{array}
if z < -29Initial program 66.1%
associate-+l-66.1%
*-commutative66.1%
associate-*r*60.6%
*-commutative60.6%
associate-+l-60.6%
*-commutative60.6%
associate-*r*66.1%
*-commutative66.1%
associate-*l*66.1%
associate-*l*70.5%
Simplified70.5%
Taylor expanded in z around inf 60.9%
*-commutative60.9%
*-commutative60.9%
associate-*l/60.9%
*-commutative60.9%
associate-*r*60.9%
*-commutative60.9%
*-commutative60.9%
Simplified60.9%
if -29 < z < -5.89999999999999995e-64 or 3.25000000000000003e-105 < z < 2.99999999999999989e82Initial program 86.1%
associate-+l-86.1%
*-commutative86.1%
associate-*r*90.2%
*-commutative90.2%
associate-+l-90.2%
*-commutative90.2%
associate-*r*86.1%
*-commutative86.1%
associate-*l*86.2%
associate-*l*90.3%
Simplified90.3%
Taylor expanded in x around inf 61.1%
associate-*r/61.1%
*-commutative61.1%
associate-*r*61.1%
*-commutative61.1%
times-frac66.7%
Simplified66.7%
Taylor expanded in y around 0 61.1%
times-frac66.8%
*-commutative66.8%
Simplified66.8%
if -5.89999999999999995e-64 < z < -2.1999999999999998e-283Initial program 96.1%
associate-+l-96.1%
*-commutative96.1%
associate-*r*96.2%
*-commutative96.2%
associate-+l-96.2%
*-commutative96.2%
associate-*r*96.1%
*-commutative96.1%
associate-*l*96.1%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in b around inf 65.6%
*-commutative65.6%
Simplified65.6%
div-inv65.6%
associate-/r*65.6%
Applied egg-rr65.6%
Taylor expanded in z around 0 65.6%
if -2.1999999999999998e-283 < z < 7.39999999999999981e-179Initial program 88.9%
associate-+l-88.9%
*-commutative88.9%
associate-*r*88.9%
*-commutative88.9%
associate-+l-88.9%
*-commutative88.9%
associate-*r*88.9%
*-commutative88.9%
associate-*l*88.9%
associate-*l*88.9%
Simplified88.9%
Taylor expanded in x around inf 63.1%
associate-*r/63.1%
*-commutative63.1%
associate-*r*63.1%
*-commutative63.1%
times-frac68.4%
Simplified68.4%
Taylor expanded in y around 0 63.1%
times-frac68.4%
*-commutative68.4%
Simplified68.4%
associate-*l/70.9%
Applied egg-rr70.9%
if 7.39999999999999981e-179 < z < 3.25000000000000003e-105Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*l*99.9%
associate-*l*95.0%
Simplified95.0%
Taylor expanded in b around inf 71.9%
*-commutative71.9%
Simplified71.9%
div-inv76.9%
associate-/r*76.9%
Applied egg-rr76.9%
if 2.99999999999999989e82 < z Initial program 59.0%
associate-+l-59.0%
*-commutative59.0%
associate-*r*55.8%
*-commutative55.8%
associate-+l-55.8%
*-commutative55.8%
associate-*r*59.0%
*-commutative59.0%
associate-*l*59.0%
associate-*l*61.8%
Simplified61.8%
add-cube-cbrt61.8%
pow361.8%
*-commutative61.8%
associate-*l*61.8%
Applied egg-rr61.8%
Taylor expanded in z around inf 57.3%
associate-*l/68.5%
*-commutative68.5%
Simplified68.5%
Final simplification66.5%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -1.35)
(/ (* a (* -4.0 t)) c_m)
(if (<= z -4e-62)
(* 9.0 (/ (* x (/ y z)) c_m))
(if (<= z -2.7e-283)
(* b (/ 1.0 (* c_m z)))
(if (<= z 7e-178)
(* 9.0 (/ (* y (/ x c_m)) z))
(if (<= z 8.2e-104)
(* b (/ (/ 1.0 z) c_m))
(if (<= z 3.5e+82)
(* 9.0 (* (/ x c_m) (/ y z)))
(* -4.0 (* t (/ a c_m)))))))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -1.35) {
tmp = (a * (-4.0 * t)) / c_m;
} else if (z <= -4e-62) {
tmp = 9.0 * ((x * (y / z)) / c_m);
} else if (z <= -2.7e-283) {
tmp = b * (1.0 / (c_m * z));
} else if (z <= 7e-178) {
tmp = 9.0 * ((y * (x / c_m)) / z);
} else if (z <= 8.2e-104) {
tmp = b * ((1.0 / z) / c_m);
} else if (z <= 3.5e+82) {
tmp = 9.0 * ((x / c_m) * (y / z));
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (z <= (-1.35d0)) then
tmp = (a * ((-4.0d0) * t)) / c_m
else if (z <= (-4d-62)) then
tmp = 9.0d0 * ((x * (y / z)) / c_m)
else if (z <= (-2.7d-283)) then
tmp = b * (1.0d0 / (c_m * z))
else if (z <= 7d-178) then
tmp = 9.0d0 * ((y * (x / c_m)) / z)
else if (z <= 8.2d-104) then
tmp = b * ((1.0d0 / z) / c_m)
else if (z <= 3.5d+82) then
tmp = 9.0d0 * ((x / c_m) * (y / z))
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -1.35) {
tmp = (a * (-4.0 * t)) / c_m;
} else if (z <= -4e-62) {
tmp = 9.0 * ((x * (y / z)) / c_m);
} else if (z <= -2.7e-283) {
tmp = b * (1.0 / (c_m * z));
} else if (z <= 7e-178) {
tmp = 9.0 * ((y * (x / c_m)) / z);
} else if (z <= 8.2e-104) {
tmp = b * ((1.0 / z) / c_m);
} else if (z <= 3.5e+82) {
tmp = 9.0 * ((x / c_m) * (y / z));
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if z <= -1.35: tmp = (a * (-4.0 * t)) / c_m elif z <= -4e-62: tmp = 9.0 * ((x * (y / z)) / c_m) elif z <= -2.7e-283: tmp = b * (1.0 / (c_m * z)) elif z <= 7e-178: tmp = 9.0 * ((y * (x / c_m)) / z) elif z <= 8.2e-104: tmp = b * ((1.0 / z) / c_m) elif z <= 3.5e+82: tmp = 9.0 * ((x / c_m) * (y / z)) else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (z <= -1.35) tmp = Float64(Float64(a * Float64(-4.0 * t)) / c_m); elseif (z <= -4e-62) tmp = Float64(9.0 * Float64(Float64(x * Float64(y / z)) / c_m)); elseif (z <= -2.7e-283) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); elseif (z <= 7e-178) tmp = Float64(9.0 * Float64(Float64(y * Float64(x / c_m)) / z)); elseif (z <= 8.2e-104) tmp = Float64(b * Float64(Float64(1.0 / z) / c_m)); elseif (z <= 3.5e+82) tmp = Float64(9.0 * Float64(Float64(x / c_m) * Float64(y / z))); else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (z <= -1.35)
tmp = (a * (-4.0 * t)) / c_m;
elseif (z <= -4e-62)
tmp = 9.0 * ((x * (y / z)) / c_m);
elseif (z <= -2.7e-283)
tmp = b * (1.0 / (c_m * z));
elseif (z <= 7e-178)
tmp = 9.0 * ((y * (x / c_m)) / z);
elseif (z <= 8.2e-104)
tmp = b * ((1.0 / z) / c_m);
elseif (z <= 3.5e+82)
tmp = 9.0 * ((x / c_m) * (y / z));
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -1.35], N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[z, -4e-62], N[(9.0 * N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.7e-283], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-178], N[(9.0 * N[(N[(y * N[(x / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-104], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+82], N[(9.0 * N[(N[(x / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / 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}\;z \leq -1.35:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t\right)}{c_m}\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-62}:\\
\;\;\;\;9 \cdot \frac{x \cdot \frac{y}{z}}{c_m}\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-283}:\\
\;\;\;\;b \cdot \frac{1}{c_m \cdot z}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-178}:\\
\;\;\;\;9 \cdot \frac{y \cdot \frac{x}{c_m}}{z}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-104}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c_m}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+82}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c_m} \cdot \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\end{array}
\end{array}
if z < -1.3500000000000001Initial program 66.1%
associate-+l-66.1%
*-commutative66.1%
associate-*r*60.6%
*-commutative60.6%
associate-+l-60.6%
*-commutative60.6%
associate-*r*66.1%
*-commutative66.1%
associate-*l*66.1%
associate-*l*70.5%
Simplified70.5%
Taylor expanded in z around inf 60.9%
*-commutative60.9%
*-commutative60.9%
associate-*l/60.9%
*-commutative60.9%
associate-*r*60.9%
*-commutative60.9%
*-commutative60.9%
Simplified60.9%
if -1.3500000000000001 < z < -4.0000000000000002e-62Initial program 81.7%
associate-+l-81.7%
*-commutative81.7%
associate-*r*81.7%
*-commutative81.7%
associate-+l-81.7%
*-commutative81.7%
associate-*r*81.7%
*-commutative81.7%
associate-*l*81.7%
associate-*l*81.7%
Simplified81.7%
Taylor expanded in x around inf 71.0%
associate-*r/71.2%
*-commutative71.2%
associate-*r*71.2%
*-commutative71.2%
times-frac80.5%
Simplified80.5%
Taylor expanded in y around 0 71.0%
times-frac80.7%
*-commutative80.7%
Simplified80.7%
associate-*r/80.7%
Applied egg-rr80.7%
if -4.0000000000000002e-62 < z < -2.7e-283Initial program 96.1%
associate-+l-96.1%
*-commutative96.1%
associate-*r*96.2%
*-commutative96.2%
associate-+l-96.2%
*-commutative96.2%
associate-*r*96.1%
*-commutative96.1%
associate-*l*96.1%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in b around inf 65.6%
*-commutative65.6%
Simplified65.6%
div-inv65.6%
associate-/r*65.6%
Applied egg-rr65.6%
Taylor expanded in z around 0 65.6%
if -2.7e-283 < z < 6.99999999999999966e-178Initial program 88.9%
associate-+l-88.9%
*-commutative88.9%
associate-*r*88.9%
*-commutative88.9%
associate-+l-88.9%
*-commutative88.9%
associate-*r*88.9%
*-commutative88.9%
associate-*l*88.9%
associate-*l*88.9%
Simplified88.9%
Taylor expanded in x around inf 63.1%
associate-*r/63.1%
*-commutative63.1%
associate-*r*63.1%
*-commutative63.1%
times-frac68.4%
Simplified68.4%
Taylor expanded in y around 0 63.1%
times-frac68.4%
*-commutative68.4%
Simplified68.4%
associate-*l/70.9%
Applied egg-rr70.9%
if 6.99999999999999966e-178 < z < 8.19999999999999968e-104Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*l*99.9%
associate-*l*95.0%
Simplified95.0%
Taylor expanded in b around inf 71.9%
*-commutative71.9%
Simplified71.9%
div-inv76.9%
associate-/r*76.9%
Applied egg-rr76.9%
if 8.19999999999999968e-104 < z < 3.5e82Initial program 87.3%
associate-+l-87.3%
*-commutative87.3%
associate-*r*92.3%
*-commutative92.3%
associate-+l-92.3%
*-commutative92.3%
associate-*r*87.3%
*-commutative87.3%
associate-*l*87.4%
associate-*l*92.5%
Simplified92.5%
Taylor expanded in x around inf 58.6%
associate-*r/58.5%
*-commutative58.5%
associate-*r*58.6%
*-commutative58.6%
times-frac63.1%
Simplified63.1%
Taylor expanded in y around 0 58.6%
times-frac63.2%
*-commutative63.2%
Simplified63.2%
if 3.5e82 < z Initial program 59.0%
associate-+l-59.0%
*-commutative59.0%
associate-*r*55.8%
*-commutative55.8%
associate-+l-55.8%
*-commutative55.8%
associate-*r*59.0%
*-commutative59.0%
associate-*l*59.0%
associate-*l*61.8%
Simplified61.8%
add-cube-cbrt61.8%
pow361.8%
*-commutative61.8%
associate-*l*61.8%
Applied egg-rr61.8%
Taylor expanded in z around inf 57.3%
associate-*l/68.5%
*-commutative68.5%
Simplified68.5%
Final simplification66.5%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 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 (/ (/ x c_m) z)))))
(*
c_s
(if (<= z -12.5)
(/ (* a (* -4.0 t)) c_m)
(if (<= z 7.2e-250)
(* b (/ 1.0 (* c_m z)))
(if (<= z 2.6e-177)
t_1
(if (<= z 5.6e-105)
(* b (/ (/ 1.0 z) c_m))
(if (<= z 3.2e+82) t_1 (* -4.0 (* t (/ a c_m)))))))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * (y * ((x / c_m) / z));
double tmp;
if (z <= -12.5) {
tmp = (a * (-4.0 * t)) / c_m;
} else if (z <= 7.2e-250) {
tmp = b * (1.0 / (c_m * z));
} else if (z <= 2.6e-177) {
tmp = t_1;
} else if (z <= 5.6e-105) {
tmp = b * ((1.0 / z) / c_m);
} else if (z <= 3.2e+82) {
tmp = t_1;
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: tmp
t_1 = 9.0d0 * (y * ((x / c_m) / z))
if (z <= (-12.5d0)) then
tmp = (a * ((-4.0d0) * t)) / c_m
else if (z <= 7.2d-250) then
tmp = b * (1.0d0 / (c_m * z))
else if (z <= 2.6d-177) then
tmp = t_1
else if (z <= 5.6d-105) then
tmp = b * ((1.0d0 / z) / c_m)
else if (z <= 3.2d+82) then
tmp = t_1
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * (y * ((x / c_m) / z));
double tmp;
if (z <= -12.5) {
tmp = (a * (-4.0 * t)) / c_m;
} else if (z <= 7.2e-250) {
tmp = b * (1.0 / (c_m * z));
} else if (z <= 2.6e-177) {
tmp = t_1;
} else if (z <= 5.6e-105) {
tmp = b * ((1.0 / z) / c_m);
} else if (z <= 3.2e+82) {
tmp = t_1;
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = 9.0 * (y * ((x / c_m) / z)) tmp = 0 if z <= -12.5: tmp = (a * (-4.0 * t)) / c_m elif z <= 7.2e-250: tmp = b * (1.0 / (c_m * z)) elif z <= 2.6e-177: tmp = t_1 elif z <= 5.6e-105: tmp = b * ((1.0 / z) / c_m) elif z <= 3.2e+82: tmp = t_1 else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(9.0 * Float64(y * Float64(Float64(x / c_m) / z))) tmp = 0.0 if (z <= -12.5) tmp = Float64(Float64(a * Float64(-4.0 * t)) / c_m); elseif (z <= 7.2e-250) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); elseif (z <= 2.6e-177) tmp = t_1; elseif (z <= 5.6e-105) tmp = Float64(b * Float64(Float64(1.0 / z) / c_m)); elseif (z <= 3.2e+82) tmp = t_1; else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = 9.0 * (y * ((x / c_m) / z));
tmp = 0.0;
if (z <= -12.5)
tmp = (a * (-4.0 * t)) / c_m;
elseif (z <= 7.2e-250)
tmp = b * (1.0 / (c_m * z));
elseif (z <= 2.6e-177)
tmp = t_1;
elseif (z <= 5.6e-105)
tmp = b * ((1.0 / z) / c_m);
elseif (z <= 3.2e+82)
tmp = t_1;
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(9.0 * N[(y * N[(N[(x / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -12.5], N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[z, 7.2e-250], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-177], t$95$1, If[LessEqual[z, 5.6e-105], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+82], t$95$1, N[(-4.0 * N[(t * N[(a / 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])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(y \cdot \frac{\frac{x}{c_m}}{z}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -12.5:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t\right)}{c_m}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-250}:\\
\;\;\;\;b \cdot \frac{1}{c_m \cdot z}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-177}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-105}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c_m}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+82}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\end{array}
\end{array}
\end{array}
if z < -12.5Initial program 66.1%
associate-+l-66.1%
*-commutative66.1%
associate-*r*60.6%
*-commutative60.6%
associate-+l-60.6%
*-commutative60.6%
associate-*r*66.1%
*-commutative66.1%
associate-*l*66.1%
associate-*l*70.5%
Simplified70.5%
Taylor expanded in z around inf 60.9%
*-commutative60.9%
*-commutative60.9%
associate-*l/60.9%
*-commutative60.9%
associate-*r*60.9%
*-commutative60.9%
*-commutative60.9%
Simplified60.9%
if -12.5 < z < 7.19999999999999964e-250Initial program 93.5%
associate-+l-93.5%
*-commutative93.5%
associate-*r*93.5%
*-commutative93.5%
associate-+l-93.5%
*-commutative93.5%
associate-*r*93.5%
*-commutative93.5%
associate-*l*93.5%
associate-*l*89.6%
Simplified89.6%
Taylor expanded in b around inf 59.5%
*-commutative59.5%
Simplified59.5%
div-inv59.5%
associate-/r*59.5%
Applied egg-rr59.5%
Taylor expanded in z around 0 59.5%
if 7.19999999999999964e-250 < z < 2.6000000000000001e-177 or 5.6e-105 < z < 3.19999999999999975e82Initial program 87.3%
associate-+l-87.3%
*-commutative87.3%
associate-*r*90.5%
*-commutative90.5%
associate-+l-90.5%
*-commutative90.5%
associate-*r*87.3%
*-commutative87.3%
associate-*l*87.4%
associate-*l*90.6%
Simplified90.6%
Taylor expanded in x around 0 80.8%
cancel-sign-sub-inv80.8%
metadata-eval80.8%
+-commutative80.8%
fma-def80.8%
associate-/l*79.2%
fma-def79.3%
times-frac77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in c around 0 90.5%
+-commutative90.5%
div-inv90.5%
fma-def90.5%
associate-/l*90.5%
Applied egg-rr90.5%
Taylor expanded in x around inf 61.5%
associate-*r/61.5%
associate-/r*63.0%
associate-*r/63.2%
*-commutative63.2%
associate-*r/66.0%
associate-*r/66.0%
associate-*r/66.0%
Simplified66.0%
if 2.6000000000000001e-177 < z < 5.6e-105Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-+l-99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*l*99.9%
associate-*l*95.0%
Simplified95.0%
Taylor expanded in b around inf 71.9%
*-commutative71.9%
Simplified71.9%
div-inv76.9%
associate-/r*76.9%
Applied egg-rr76.9%
if 3.19999999999999975e82 < z Initial program 59.0%
associate-+l-59.0%
*-commutative59.0%
associate-*r*55.8%
*-commutative55.8%
associate-+l-55.8%
*-commutative55.8%
associate-*r*59.0%
*-commutative59.0%
associate-*l*59.0%
associate-*l*61.8%
Simplified61.8%
add-cube-cbrt61.8%
pow361.8%
*-commutative61.8%
associate-*l*61.8%
Applied egg-rr61.8%
Taylor expanded in z around inf 57.3%
associate-*l/68.5%
*-commutative68.5%
Simplified68.5%
Final simplification63.9%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 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))) (t_2 (/ (+ t_1 (* 9.0 (* y (/ x z)))) c_m)))
(*
c_s
(if (<= z -9.5e-24)
t_2
(if (<= z 3.5e+24)
(/ (+ (/ b c_m) (* 9.0 (/ (* x y) c_m))) z)
(if (<= z 6.8e+149) t_2 (/ (+ t_1 (/ b z)) c_m)))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (a * t);
double t_2 = (t_1 + (9.0 * (y * (x / z)))) / c_m;
double tmp;
if (z <= -9.5e-24) {
tmp = t_2;
} else if (z <= 3.5e+24) {
tmp = ((b / c_m) + (9.0 * ((x * y) / c_m))) / z;
} else if (z <= 6.8e+149) {
tmp = t_2;
} else {
tmp = (t_1 + (b / z)) / c_m;
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (a * t)
t_2 = (t_1 + (9.0d0 * (y * (x / z)))) / c_m
if (z <= (-9.5d-24)) then
tmp = t_2
else if (z <= 3.5d+24) then
tmp = ((b / c_m) + (9.0d0 * ((x * y) / c_m))) / z
else if (z <= 6.8d+149) then
tmp = t_2
else
tmp = (t_1 + (b / z)) / c_m
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (a * t);
double t_2 = (t_1 + (9.0 * (y * (x / z)))) / c_m;
double tmp;
if (z <= -9.5e-24) {
tmp = t_2;
} else if (z <= 3.5e+24) {
tmp = ((b / c_m) + (9.0 * ((x * y) / c_m))) / z;
} else if (z <= 6.8e+149) {
tmp = t_2;
} else {
tmp = (t_1 + (b / z)) / c_m;
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = -4.0 * (a * t) t_2 = (t_1 + (9.0 * (y * (x / z)))) / c_m tmp = 0 if z <= -9.5e-24: tmp = t_2 elif z <= 3.5e+24: tmp = ((b / c_m) + (9.0 * ((x * y) / c_m))) / z elif z <= 6.8e+149: tmp = t_2 else: tmp = (t_1 + (b / z)) / c_m return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(-4.0 * Float64(a * t)) t_2 = Float64(Float64(t_1 + Float64(9.0 * Float64(y * Float64(x / z)))) / c_m) tmp = 0.0 if (z <= -9.5e-24) tmp = t_2; elseif (z <= 3.5e+24) tmp = Float64(Float64(Float64(b / c_m) + Float64(9.0 * Float64(Float64(x * y) / c_m))) / z); elseif (z <= 6.8e+149) tmp = t_2; else tmp = Float64(Float64(t_1 + Float64(b / 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)
t_1 = -4.0 * (a * t);
t_2 = (t_1 + (9.0 * (y * (x / z)))) / c_m;
tmp = 0.0;
if (z <= -9.5e-24)
tmp = t_2;
elseif (z <= 3.5e+24)
tmp = ((b / c_m) + (9.0 * ((x * y) / c_m))) / z;
elseif (z <= 6.8e+149)
tmp = t_2;
else
tmp = (t_1 + (b / z)) / c_m;
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(9.0 * N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -9.5e-24], t$95$2, If[LessEqual[z, 3.5e+24], N[(N[(N[(b / c$95$m), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 6.8e+149], t$95$2, N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot t\right)\\
t_2 := \frac{t_1 + 9 \cdot \left(y \cdot \frac{x}{z}\right)}{c_m}\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-24}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+24}:\\
\;\;\;\;\frac{\frac{b}{c_m} + 9 \cdot \frac{x \cdot y}{c_m}}{z}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+149}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1 + \frac{b}{z}}{c_m}\\
\end{array}
\end{array}
\end{array}
if z < -9.50000000000000029e-24 or 3.5000000000000002e24 < z < 6.7999999999999997e149Initial program 67.0%
associate-+l-67.0%
*-commutative67.0%
associate-*r*65.1%
*-commutative65.1%
associate-+l-65.1%
*-commutative65.1%
associate-*r*67.0%
*-commutative67.0%
associate-*l*67.1%
associate-*l*72.3%
Simplified72.3%
Taylor expanded in x around 0 84.5%
cancel-sign-sub-inv84.5%
metadata-eval84.5%
+-commutative84.5%
fma-def84.5%
associate-/l*80.5%
fma-def80.5%
times-frac78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in c around 0 94.7%
Taylor expanded in x around inf 80.4%
associate-*l/81.2%
Simplified81.2%
if -9.50000000000000029e-24 < z < 3.5000000000000002e24Initial program 93.6%
associate-+l-93.6%
*-commutative93.6%
associate-*r*93.6%
*-commutative93.6%
associate-+l-93.6%
*-commutative93.6%
associate-*r*93.6%
*-commutative93.6%
associate-*l*93.6%
associate-*l*90.8%
Simplified90.8%
Taylor expanded in x around 0 73.5%
cancel-sign-sub-inv73.5%
metadata-eval73.5%
+-commutative73.5%
fma-def73.5%
associate-/l*76.1%
fma-def76.1%
times-frac73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in z around 0 86.8%
if 6.7999999999999997e149 < z Initial program 63.2%
associate-+l-63.2%
*-commutative63.2%
associate-*r*59.1%
*-commutative59.1%
associate-+l-59.1%
*-commutative59.1%
associate-*r*63.2%
*-commutative63.2%
associate-*l*63.2%
associate-*l*66.8%
Simplified66.8%
Taylor expanded in x around 0 85.3%
cancel-sign-sub-inv85.3%
metadata-eval85.3%
+-commutative85.3%
fma-def85.3%
associate-/l*85.5%
fma-def85.5%
times-frac85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in c around 0 85.4%
Taylor expanded in x around 0 81.7%
Final simplification84.2%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 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 -7e-173) (not (<= z 7.8e-141)))
(/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c_m)
(/ (+ b (* 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 ((z <= -7e-173) || !(z <= 7.8e-141)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else {
tmp = (b + (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 ((z <= (-7d-173)) .or. (.not. (z <= 7.8d-141))) then
tmp = (((-4.0d0) * (a * t)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c_m
else
tmp = (b + (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 ((z <= -7e-173) || !(z <= 7.8e-141)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else {
tmp = (b + (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 (z <= -7e-173) or not (z <= 7.8e-141): tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m else: tmp = (b + (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 ((z <= -7e-173) || !(z <= 7.8e-141)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c_m); else tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / 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 <= -7e-173) || ~((z <= 7.8e-141)))
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
else
tmp = (b + (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[Or[LessEqual[z, -7e-173], N[Not[LessEqual[z, 7.8e-141]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -7 \cdot 10^{-173} \lor \neg \left(z \leq 7.8 \cdot 10^{-141}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{c_m \cdot z}\\
\end{array}
\end{array}
if z < -7.00000000000000029e-173 or 7.7999999999999994e-141 < z Initial program 75.9%
associate-+l-75.9%
*-commutative75.9%
associate-*r*74.3%
*-commutative74.3%
associate-+l-74.3%
*-commutative74.3%
associate-*r*75.9%
*-commutative75.9%
associate-*l*75.9%
associate-*l*78.6%
Simplified78.6%
Taylor expanded in x around 0 83.1%
cancel-sign-sub-inv83.1%
metadata-eval83.1%
+-commutative83.1%
fma-def83.1%
associate-/l*81.5%
fma-def81.5%
times-frac80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in c around 0 92.1%
if -7.00000000000000029e-173 < z < 7.7999999999999994e-141Initial program 93.0%
associate-+l-93.0%
*-commutative93.0%
associate-*r*93.1%
*-commutative93.1%
associate-+l-93.1%
*-commutative93.1%
associate-*r*93.0%
*-commutative93.0%
associate-*l*93.1%
associate-*l*89.1%
Simplified89.1%
Taylor expanded in x around inf 91.8%
associate-*r*91.8%
*-commutative91.8%
associate-*r*91.8%
Simplified91.8%
Final simplification92.0%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -1.02e-42) (not (<= z 8.2e-106)))
(/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c_m)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* a t)))) (* 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 <= -1.02e-42) || !(z <= 8.2e-106)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (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 <= (-1.02d-42)) .or. (.not. (z <= 8.2d-106))) then
tmp = (((-4.0d0) * (a * t)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c_m
else
tmp = (b + ((x * (9.0d0 * y)) - ((z * 4.0d0) * (a * t)))) / (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 <= -1.02e-42) || !(z <= 8.2e-106)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (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 <= -1.02e-42) or not (z <= 8.2e-106): tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m else: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (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 <= -1.02e-42) || !(z <= 8.2e-106)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c_m); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(a * t)))) / 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 <= -1.02e-42) || ~((z <= 8.2e-106)))
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
else
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (a * t)))) / (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, -1.02e-42], N[Not[LessEqual[z, 8.2e-106]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -1.02 \cdot 10^{-42} \lor \neg \left(z \leq 8.2 \cdot 10^{-106}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(a \cdot t\right)\right)}{c_m \cdot z}\\
\end{array}
\end{array}
if z < -1.0199999999999999e-42 or 8.1999999999999998e-106 < z Initial program 70.8%
associate-+l-70.8%
*-commutative70.8%
associate-*r*68.8%
*-commutative68.8%
associate-+l-68.8%
*-commutative68.8%
associate-*r*70.8%
*-commutative70.8%
associate-*l*70.8%
associate-*l*74.8%
Simplified74.8%
Taylor expanded in x around 0 85.1%
cancel-sign-sub-inv85.1%
metadata-eval85.1%
+-commutative85.1%
fma-def85.1%
associate-/l*83.1%
fma-def83.1%
times-frac81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in c around 0 92.8%
if -1.0199999999999999e-42 < z < 8.1999999999999998e-106Initial program 94.5%
associate-+l-94.5%
*-commutative94.5%
associate-*r*94.5%
*-commutative94.5%
associate-+l-94.5%
*-commutative94.5%
associate-*r*94.5%
*-commutative94.5%
associate-*l*94.5%
associate-*l*91.0%
Simplified91.0%
Final simplification92.1%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 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 -1e-42) (not (<= z 1.5e-105)))
(/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c_m)
(/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.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 ((z <= -1e-42) || !(z <= 1.5e-105)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.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 ((z <= (-1d-42)) .or. (.not. (z <= 1.5d-105))) then
tmp = (((-4.0d0) * (a * t)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c_m
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.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 ((z <= -1e-42) || !(z <= 1.5e-105)) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.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 (z <= -1e-42) or not (z <= 1.5e-105): tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.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 ((z <= -1e-42) || !(z <= 1.5e-105)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c_m); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / 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 <= -1e-42) || ~((z <= 1.5e-105)))
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.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[z, -1e-42], N[Not[LessEqual[z, 1.5e-105]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(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 -1 \cdot 10^{-42} \lor \neg \left(z \leq 1.5 \cdot 10^{-105}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c_m \cdot z}\\
\end{array}
\end{array}
if z < -1.00000000000000004e-42 or 1.5e-105 < z Initial program 70.8%
associate-+l-70.8%
*-commutative70.8%
associate-*r*68.8%
*-commutative68.8%
associate-+l-68.8%
*-commutative68.8%
associate-*r*70.8%
*-commutative70.8%
associate-*l*70.8%
associate-*l*74.8%
Simplified74.8%
Taylor expanded in x around 0 85.1%
cancel-sign-sub-inv85.1%
metadata-eval85.1%
+-commutative85.1%
fma-def85.1%
associate-/l*83.1%
fma-def83.1%
times-frac81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in c around 0 92.8%
if -1.00000000000000004e-42 < z < 1.5e-105Initial program 94.5%
Final simplification93.5%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 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 (<= b -2.4e+248)
(not
(or (<= b -1.6e+222) (and (not (<= b -6.8e-91)) (<= b 1.06e+74)))))
(/ b (* c_m z))
(* -4.0 (* t (/ a c_m))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((b <= -2.4e+248) || !((b <= -1.6e+222) || (!(b <= -6.8e-91) && (b <= 1.06e+74)))) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((b <= (-2.4d+248)) .or. (.not. (b <= (-1.6d+222)) .or. (.not. (b <= (-6.8d-91))) .and. (b <= 1.06d+74))) then
tmp = b / (c_m * z)
else
tmp = (-4.0d0) * (t * (a / c_m))
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((b <= -2.4e+248) || !((b <= -1.6e+222) || (!(b <= -6.8e-91) && (b <= 1.06e+74)))) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (t * (a / c_m));
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (b <= -2.4e+248) or not ((b <= -1.6e+222) or (not (b <= -6.8e-91) and (b <= 1.06e+74))): tmp = b / (c_m * z) else: tmp = -4.0 * (t * (a / c_m)) return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((b <= -2.4e+248) || !((b <= -1.6e+222) || (!(b <= -6.8e-91) && (b <= 1.06e+74)))) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((b <= -2.4e+248) || ~(((b <= -1.6e+222) || (~((b <= -6.8e-91)) && (b <= 1.06e+74)))))
tmp = b / (c_m * z);
else
tmp = -4.0 * (t * (a / c_m));
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[b, -2.4e+248], N[Not[Or[LessEqual[b, -1.6e+222], And[N[Not[LessEqual[b, -6.8e-91]], $MachinePrecision], LessEqual[b, 1.06e+74]]]], $MachinePrecision]], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / 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}\;b \leq -2.4 \cdot 10^{+248} \lor \neg \left(b \leq -1.6 \cdot 10^{+222} \lor \neg \left(b \leq -6.8 \cdot 10^{-91}\right) \land b \leq 1.06 \cdot 10^{+74}\right):\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\end{array}
\end{array}
if b < -2.4e248 or -1.6000000000000001e222 < b < -6.80000000000000053e-91 or 1.05999999999999999e74 < b Initial program 86.4%
associate-+l-86.4%
*-commutative86.4%
associate-*r*82.1%
*-commutative82.1%
associate-+l-82.1%
*-commutative82.1%
associate-*r*86.4%
*-commutative86.4%
associate-*l*86.4%
associate-*l*84.4%
Simplified84.4%
Taylor expanded in b around inf 61.7%
*-commutative61.7%
Simplified61.7%
if -2.4e248 < b < -1.6000000000000001e222 or -6.80000000000000053e-91 < b < 1.05999999999999999e74Initial program 74.3%
associate-+l-74.3%
*-commutative74.3%
associate-*r*76.5%
*-commutative76.5%
associate-+l-76.5%
*-commutative76.5%
associate-*r*74.3%
*-commutative74.3%
associate-*l*74.3%
associate-*l*78.3%
Simplified78.3%
add-cube-cbrt78.0%
pow378.0%
*-commutative78.0%
associate-*l*78.0%
Applied egg-rr78.0%
Taylor expanded in z around inf 51.8%
associate-*l/51.8%
*-commutative51.8%
Simplified51.8%
Final simplification56.8%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c_m)))))
(*
c_s
(if (<= z -0.05)
t_1
(if (<= z 3.2e-98)
(* b (/ 1.0 (* c_m z)))
(if (or (<= z 2.3e+160) (not (<= z 3.1e+208)))
t_1
(/ 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 t_1 = -4.0 * (t * (a / c_m));
double tmp;
if (z <= -0.05) {
tmp = t_1;
} else if (z <= 3.2e-98) {
tmp = b * (1.0 / (c_m * z));
} else if ((z <= 2.3e+160) || !(z <= 3.1e+208)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c_m))
if (z <= (-0.05d0)) then
tmp = t_1
else if (z <= 3.2d-98) then
tmp = b * (1.0d0 / (c_m * z))
else if ((z <= 2.3d+160) .or. (.not. (z <= 3.1d+208))) then
tmp = t_1
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 t_1 = -4.0 * (t * (a / c_m));
double tmp;
if (z <= -0.05) {
tmp = t_1;
} else if (z <= 3.2e-98) {
tmp = b * (1.0 / (c_m * z));
} else if ((z <= 2.3e+160) || !(z <= 3.1e+208)) {
tmp = t_1;
} 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): t_1 = -4.0 * (t * (a / c_m)) tmp = 0 if z <= -0.05: tmp = t_1 elif z <= 3.2e-98: tmp = b * (1.0 / (c_m * z)) elif (z <= 2.3e+160) or not (z <= 3.1e+208): tmp = t_1 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) t_1 = Float64(-4.0 * Float64(t * Float64(a / c_m))) tmp = 0.0 if (z <= -0.05) tmp = t_1; elseif (z <= 3.2e-98) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); elseif ((z <= 2.3e+160) || !(z <= 3.1e+208)) tmp = t_1; 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)
t_1 = -4.0 * (t * (a / c_m));
tmp = 0.0;
if (z <= -0.05)
tmp = t_1;
elseif (z <= 3.2e-98)
tmp = b * (1.0 / (c_m * z));
elseif ((z <= 2.3e+160) || ~((z <= 3.1e+208)))
tmp = t_1;
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_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -0.05], t$95$1, If[LessEqual[z, 3.2e-98], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2.3e+160], N[Not[LessEqual[z, 3.1e+208]], $MachinePrecision]], t$95$1, 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])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -0.05:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-98}:\\
\;\;\;\;b \cdot \frac{1}{c_m \cdot z}\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+160} \lor \neg \left(z \leq 3.1 \cdot 10^{+208}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\end{array}
\end{array}
\end{array}
if z < -0.050000000000000003 or 3.2000000000000001e-98 < z < 2.29999999999999987e160 or 3.09999999999999981e208 < z Initial program 69.4%
associate-+l-69.4%
*-commutative69.4%
associate-*r*66.5%
*-commutative66.5%
associate-+l-66.5%
*-commutative66.5%
associate-*r*69.4%
*-commutative69.4%
associate-*l*69.5%
associate-*l*73.2%
Simplified73.2%
add-cube-cbrt73.0%
pow373.0%
*-commutative73.0%
associate-*l*72.9%
Applied egg-rr72.9%
Taylor expanded in z around inf 54.2%
associate-*l/55.7%
*-commutative55.7%
Simplified55.7%
if -0.050000000000000003 < z < 3.2000000000000001e-98Initial program 93.4%
associate-+l-93.4%
*-commutative93.4%
associate-*r*93.5%
*-commutative93.5%
associate-+l-93.5%
*-commutative93.5%
associate-*r*93.4%
*-commutative93.4%
associate-*l*93.4%
associate-*l*90.3%
Simplified90.3%
Taylor expanded in b around inf 55.9%
*-commutative55.9%
Simplified55.9%
div-inv56.7%
associate-/r*56.7%
Applied egg-rr56.7%
Taylor expanded in z around 0 56.7%
if 2.29999999999999987e160 < z < 3.09999999999999981e208Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*99.1%
*-commutative99.1%
associate-+l-99.1%
*-commutative99.1%
associate-*r*79.5%
*-commutative79.5%
associate-*l*79.5%
associate-*l*99.1%
Simplified99.1%
Taylor expanded in b around inf 99.1%
*-commutative99.1%
Simplified99.1%
Final simplification57.0%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c_m)))))
(*
c_s
(if (<= z -14.2)
t_1
(if (<= z 4.3e+46)
(* b (/ (/ 1.0 c_m) z))
(if (or (<= z 2.9e+160) (not (<= z 3.1e+208)))
t_1
(/ 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 t_1 = -4.0 * (t * (a / c_m));
double tmp;
if (z <= -14.2) {
tmp = t_1;
} else if (z <= 4.3e+46) {
tmp = b * ((1.0 / c_m) / z);
} else if ((z <= 2.9e+160) || !(z <= 3.1e+208)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c_m))
if (z <= (-14.2d0)) then
tmp = t_1
else if (z <= 4.3d+46) then
tmp = b * ((1.0d0 / c_m) / z)
else if ((z <= 2.9d+160) .or. (.not. (z <= 3.1d+208))) then
tmp = t_1
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 t_1 = -4.0 * (t * (a / c_m));
double tmp;
if (z <= -14.2) {
tmp = t_1;
} else if (z <= 4.3e+46) {
tmp = b * ((1.0 / c_m) / z);
} else if ((z <= 2.9e+160) || !(z <= 3.1e+208)) {
tmp = t_1;
} 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): t_1 = -4.0 * (t * (a / c_m)) tmp = 0 if z <= -14.2: tmp = t_1 elif z <= 4.3e+46: tmp = b * ((1.0 / c_m) / z) elif (z <= 2.9e+160) or not (z <= 3.1e+208): tmp = t_1 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) t_1 = Float64(-4.0 * Float64(t * Float64(a / c_m))) tmp = 0.0 if (z <= -14.2) tmp = t_1; elseif (z <= 4.3e+46) tmp = Float64(b * Float64(Float64(1.0 / c_m) / z)); elseif ((z <= 2.9e+160) || !(z <= 3.1e+208)) tmp = t_1; 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)
t_1 = -4.0 * (t * (a / c_m));
tmp = 0.0;
if (z <= -14.2)
tmp = t_1;
elseif (z <= 4.3e+46)
tmp = b * ((1.0 / c_m) / z);
elseif ((z <= 2.9e+160) || ~((z <= 3.1e+208)))
tmp = t_1;
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_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -14.2], t$95$1, If[LessEqual[z, 4.3e+46], N[(b * N[(N[(1.0 / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2.9e+160], N[Not[LessEqual[z, 3.1e+208]], $MachinePrecision]], t$95$1, 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])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -14.2:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+46}:\\
\;\;\;\;b \cdot \frac{\frac{1}{c_m}}{z}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+160} \lor \neg \left(z \leq 3.1 \cdot 10^{+208}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\end{array}
\end{array}
\end{array}
if z < -14.199999999999999 or 4.30000000000000005e46 < z < 2.8999999999999999e160 or 3.09999999999999981e208 < z Initial program 64.6%
associate-+l-64.6%
*-commutative64.6%
associate-*r*60.0%
*-commutative60.0%
associate-+l-60.0%
*-commutative60.0%
associate-*r*64.6%
*-commutative64.6%
associate-*l*64.6%
associate-*l*68.3%
Simplified68.3%
add-cube-cbrt68.1%
pow368.1%
*-commutative68.1%
associate-*l*68.1%
Applied egg-rr68.1%
Taylor expanded in z around inf 60.7%
associate-*l/61.6%
*-commutative61.6%
Simplified61.6%
if -14.199999999999999 < z < 4.30000000000000005e46Initial program 92.6%
associate-+l-92.6%
*-commutative92.6%
associate-*r*93.3%
*-commutative93.3%
associate-+l-93.3%
*-commutative93.3%
associate-*r*92.6%
*-commutative92.6%
associate-*l*92.6%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in b around inf 51.2%
*-commutative51.2%
Simplified51.2%
div-inv51.8%
associate-/r*52.4%
Applied egg-rr52.4%
Taylor expanded in z around 0 51.8%
associate-/r*52.3%
Simplified52.3%
if 2.8999999999999999e160 < z < 3.09999999999999981e208Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*99.1%
*-commutative99.1%
associate-+l-99.1%
*-commutative99.1%
associate-*r*79.5%
*-commutative79.5%
associate-*l*79.5%
associate-*l*99.1%
Simplified99.1%
Taylor expanded in b around inf 99.1%
*-commutative99.1%
Simplified99.1%
Final simplification57.1%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c_m)))))
(*
c_s
(if (<= z -22.5)
t_1
(if (<= z 1.7e+48)
(* b (/ (/ 1.0 z) c_m))
(if (or (<= z 1.75e+160) (not (<= z 3.1e+208)))
t_1
(/ 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 t_1 = -4.0 * (t * (a / c_m));
double tmp;
if (z <= -22.5) {
tmp = t_1;
} else if (z <= 1.7e+48) {
tmp = b * ((1.0 / z) / c_m);
} else if ((z <= 1.75e+160) || !(z <= 3.1e+208)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c_m))
if (z <= (-22.5d0)) then
tmp = t_1
else if (z <= 1.7d+48) then
tmp = b * ((1.0d0 / z) / c_m)
else if ((z <= 1.75d+160) .or. (.not. (z <= 3.1d+208))) then
tmp = t_1
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 t_1 = -4.0 * (t * (a / c_m));
double tmp;
if (z <= -22.5) {
tmp = t_1;
} else if (z <= 1.7e+48) {
tmp = b * ((1.0 / z) / c_m);
} else if ((z <= 1.75e+160) || !(z <= 3.1e+208)) {
tmp = t_1;
} 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): t_1 = -4.0 * (t * (a / c_m)) tmp = 0 if z <= -22.5: tmp = t_1 elif z <= 1.7e+48: tmp = b * ((1.0 / z) / c_m) elif (z <= 1.75e+160) or not (z <= 3.1e+208): tmp = t_1 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) t_1 = Float64(-4.0 * Float64(t * Float64(a / c_m))) tmp = 0.0 if (z <= -22.5) tmp = t_1; elseif (z <= 1.7e+48) tmp = Float64(b * Float64(Float64(1.0 / z) / c_m)); elseif ((z <= 1.75e+160) || !(z <= 3.1e+208)) tmp = t_1; 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)
t_1 = -4.0 * (t * (a / c_m));
tmp = 0.0;
if (z <= -22.5)
tmp = t_1;
elseif (z <= 1.7e+48)
tmp = b * ((1.0 / z) / c_m);
elseif ((z <= 1.75e+160) || ~((z <= 3.1e+208)))
tmp = t_1;
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_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -22.5], t$95$1, If[LessEqual[z, 1.7e+48], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.75e+160], N[Not[LessEqual[z, 3.1e+208]], $MachinePrecision]], t$95$1, 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])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -22.5:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+48}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c_m}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+160} \lor \neg \left(z \leq 3.1 \cdot 10^{+208}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\end{array}
\end{array}
\end{array}
if z < -22.5 or 1.7000000000000002e48 < z < 1.75000000000000013e160 or 3.09999999999999981e208 < z Initial program 64.6%
associate-+l-64.6%
*-commutative64.6%
associate-*r*60.0%
*-commutative60.0%
associate-+l-60.0%
*-commutative60.0%
associate-*r*64.6%
*-commutative64.6%
associate-*l*64.6%
associate-*l*68.3%
Simplified68.3%
add-cube-cbrt68.1%
pow368.1%
*-commutative68.1%
associate-*l*68.1%
Applied egg-rr68.1%
Taylor expanded in z around inf 60.7%
associate-*l/61.6%
*-commutative61.6%
Simplified61.6%
if -22.5 < z < 1.7000000000000002e48Initial program 92.6%
associate-+l-92.6%
*-commutative92.6%
associate-*r*93.3%
*-commutative93.3%
associate-+l-93.3%
*-commutative93.3%
associate-*r*92.6%
*-commutative92.6%
associate-*l*92.6%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in b around inf 51.2%
*-commutative51.2%
Simplified51.2%
div-inv51.8%
associate-/r*52.4%
Applied egg-rr52.4%
if 1.75000000000000013e160 < z < 3.09999999999999981e208Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*99.1%
*-commutative99.1%
associate-+l-99.1%
*-commutative99.1%
associate-*r*79.5%
*-commutative79.5%
associate-*l*79.5%
associate-*l*99.1%
Simplified99.1%
Taylor expanded in b around inf 99.1%
*-commutative99.1%
Simplified99.1%
Final simplification57.2%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c_m)))))
(*
c_s
(if (<= z -0.08)
t_1
(if (<= z 5.5e+46)
(* b (/ (/ 1.0 z) c_m))
(if (<= z 2.6e+160)
t_1
(if (<= z 3.1e+208) (/ b (* c_m z)) (* -4.0 (/ a (/ c_m 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 = -4.0 * (t * (a / c_m));
double tmp;
if (z <= -0.08) {
tmp = t_1;
} else if (z <= 5.5e+46) {
tmp = b * ((1.0 / z) / c_m);
} else if (z <= 2.6e+160) {
tmp = t_1;
} else if (z <= 3.1e+208) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (a / (c_m / 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 = (-4.0d0) * (t * (a / c_m))
if (z <= (-0.08d0)) then
tmp = t_1
else if (z <= 5.5d+46) then
tmp = b * ((1.0d0 / z) / c_m)
else if (z <= 2.6d+160) then
tmp = t_1
else if (z <= 3.1d+208) then
tmp = b / (c_m * z)
else
tmp = (-4.0d0) * (a / (c_m / 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 = -4.0 * (t * (a / c_m));
double tmp;
if (z <= -0.08) {
tmp = t_1;
} else if (z <= 5.5e+46) {
tmp = b * ((1.0 / z) / c_m);
} else if (z <= 2.6e+160) {
tmp = t_1;
} else if (z <= 3.1e+208) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (a / (c_m / 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 = -4.0 * (t * (a / c_m)) tmp = 0 if z <= -0.08: tmp = t_1 elif z <= 5.5e+46: tmp = b * ((1.0 / z) / c_m) elif z <= 2.6e+160: tmp = t_1 elif z <= 3.1e+208: tmp = b / (c_m * z) else: tmp = -4.0 * (a / (c_m / 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(-4.0 * Float64(t * Float64(a / c_m))) tmp = 0.0 if (z <= -0.08) tmp = t_1; elseif (z <= 5.5e+46) tmp = Float64(b * Float64(Float64(1.0 / z) / c_m)); elseif (z <= 2.6e+160) tmp = t_1; elseif (z <= 3.1e+208) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(-4.0 * Float64(a / Float64(c_m / 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 = -4.0 * (t * (a / c_m));
tmp = 0.0;
if (z <= -0.08)
tmp = t_1;
elseif (z <= 5.5e+46)
tmp = b * ((1.0 / z) / c_m);
elseif (z <= 2.6e+160)
tmp = t_1;
elseif (z <= 3.1e+208)
tmp = b / (c_m * z);
else
tmp = -4.0 * (a / (c_m / 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[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -0.08], t$95$1, If[LessEqual[z, 5.5e+46], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+160], t$95$1, If[LessEqual[z, 3.1e+208], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c$95$m / t), $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 := -4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
c_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -0.08:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+46}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c_m}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+160}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+208}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c_m}{t}}\\
\end{array}
\end{array}
\end{array}
if z < -0.0800000000000000017 or 5.4999999999999998e46 < z < 2.6e160Initial program 66.3%
associate-+l-66.3%
*-commutative66.3%
associate-*r*63.1%
*-commutative63.1%
associate-+l-63.1%
*-commutative63.1%
associate-*r*66.3%
*-commutative66.3%
associate-*l*66.3%
associate-*l*70.8%
Simplified70.8%
add-cube-cbrt70.6%
pow370.5%
*-commutative70.5%
associate-*l*70.5%
Applied egg-rr70.5%
Taylor expanded in z around inf 58.1%
associate-*l/56.1%
*-commutative56.1%
Simplified56.1%
if -0.0800000000000000017 < z < 5.4999999999999998e46Initial program 92.6%
associate-+l-92.6%
*-commutative92.6%
associate-*r*93.3%
*-commutative93.3%
associate-+l-93.3%
*-commutative93.3%
associate-*r*92.6%
*-commutative92.6%
associate-*l*92.6%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in b around inf 51.2%
*-commutative51.2%
Simplified51.2%
div-inv51.8%
associate-/r*52.4%
Applied egg-rr52.4%
if 2.6e160 < z < 3.09999999999999981e208Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*99.1%
*-commutative99.1%
associate-+l-99.1%
*-commutative99.1%
associate-*r*79.5%
*-commutative79.5%
associate-*l*79.5%
associate-*l*99.1%
Simplified99.1%
Taylor expanded in b around inf 99.1%
*-commutative99.1%
Simplified99.1%
if 3.09999999999999981e208 < z Initial program 56.0%
associate-+l-56.0%
*-commutative56.0%
associate-*r*44.5%
*-commutative44.5%
associate-+l-44.5%
*-commutative44.5%
associate-*r*56.0%
*-commutative56.0%
associate-*l*56.0%
associate-*l*56.0%
Simplified56.0%
Taylor expanded in z around inf 73.7%
*-commutative73.7%
associate-/l*84.5%
Simplified84.5%
Final simplification56.8%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -0.024)
(/ (* a (* -4.0 t)) c_m)
(if (<= z 1.8e+46)
(* b (/ (/ 1.0 z) c_m))
(if (<= z 3e+160)
(* -4.0 (* t (/ a c_m)))
(if (<= z 3.1e+208) (/ b (* c_m z)) (* -4.0 (/ a (/ c_m 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 (z <= -0.024) {
tmp = (a * (-4.0 * t)) / c_m;
} else if (z <= 1.8e+46) {
tmp = b * ((1.0 / z) / c_m);
} else if (z <= 3e+160) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= 3.1e+208) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (a / (c_m / 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 (z <= (-0.024d0)) then
tmp = (a * ((-4.0d0) * t)) / c_m
else if (z <= 1.8d+46) then
tmp = b * ((1.0d0 / z) / c_m)
else if (z <= 3d+160) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (z <= 3.1d+208) then
tmp = b / (c_m * z)
else
tmp = (-4.0d0) * (a / (c_m / 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 (z <= -0.024) {
tmp = (a * (-4.0 * t)) / c_m;
} else if (z <= 1.8e+46) {
tmp = b * ((1.0 / z) / c_m);
} else if (z <= 3e+160) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= 3.1e+208) {
tmp = b / (c_m * z);
} else {
tmp = -4.0 * (a / (c_m / 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 z <= -0.024: tmp = (a * (-4.0 * t)) / c_m elif z <= 1.8e+46: tmp = b * ((1.0 / z) / c_m) elif z <= 3e+160: tmp = -4.0 * (t * (a / c_m)) elif z <= 3.1e+208: tmp = b / (c_m * z) else: tmp = -4.0 * (a / (c_m / 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 (z <= -0.024) tmp = Float64(Float64(a * Float64(-4.0 * t)) / c_m); elseif (z <= 1.8e+46) tmp = Float64(b * Float64(Float64(1.0 / z) / c_m)); elseif (z <= 3e+160) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (z <= 3.1e+208) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(-4.0 * Float64(a / Float64(c_m / 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 (z <= -0.024)
tmp = (a * (-4.0 * t)) / c_m;
elseif (z <= 1.8e+46)
tmp = b * ((1.0 / z) / c_m);
elseif (z <= 3e+160)
tmp = -4.0 * (t * (a / c_m));
elseif (z <= 3.1e+208)
tmp = b / (c_m * z);
else
tmp = -4.0 * (a / (c_m / 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[z, -0.024], N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[z, 1.8e+46], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+160], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e+208], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c$95$m / t), $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}\;z \leq -0.024:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t\right)}{c_m}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+46}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c_m}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+160}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+208}:\\
\;\;\;\;\frac{b}{c_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c_m}{t}}\\
\end{array}
\end{array}
if z < -0.024Initial program 66.1%
associate-+l-66.1%
*-commutative66.1%
associate-*r*60.6%
*-commutative60.6%
associate-+l-60.6%
*-commutative60.6%
associate-*r*66.1%
*-commutative66.1%
associate-*l*66.1%
associate-*l*70.5%
Simplified70.5%
Taylor expanded in z around inf 60.9%
*-commutative60.9%
*-commutative60.9%
associate-*l/60.9%
*-commutative60.9%
associate-*r*60.9%
*-commutative60.9%
*-commutative60.9%
Simplified60.9%
if -0.024 < z < 1.7999999999999999e46Initial program 92.6%
associate-+l-92.6%
*-commutative92.6%
associate-*r*93.3%
*-commutative93.3%
associate-+l-93.3%
*-commutative93.3%
associate-*r*92.6%
*-commutative92.6%
associate-*l*92.6%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in b around inf 51.2%
*-commutative51.2%
Simplified51.2%
div-inv51.8%
associate-/r*52.4%
Applied egg-rr52.4%
if 1.7999999999999999e46 < z < 2.9999999999999999e160Initial program 67.0%
associate-+l-67.0%
*-commutative67.0%
associate-*r*71.5%
*-commutative71.5%
associate-+l-71.5%
*-commutative71.5%
associate-*r*67.0%
*-commutative67.0%
associate-*l*67.0%
associate-*l*71.5%
Simplified71.5%
add-cube-cbrt71.0%
pow371.1%
*-commutative71.1%
associate-*l*71.1%
Applied egg-rr71.1%
Taylor expanded in z around inf 49.1%
associate-*l/53.6%
*-commutative53.6%
Simplified53.6%
if 2.9999999999999999e160 < z < 3.09999999999999981e208Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*99.1%
*-commutative99.1%
associate-+l-99.1%
*-commutative99.1%
associate-*r*79.5%
*-commutative79.5%
associate-*l*79.5%
associate-*l*99.1%
Simplified99.1%
Taylor expanded in b around inf 99.1%
*-commutative99.1%
Simplified99.1%
if 3.09999999999999981e208 < z Initial program 56.0%
associate-+l-56.0%
*-commutative56.0%
associate-*r*44.5%
*-commutative44.5%
associate-+l-44.5%
*-commutative44.5%
associate-*r*56.0%
*-commutative56.0%
associate-*l*56.0%
associate-*l*56.0%
Simplified56.0%
Taylor expanded in z around inf 73.7%
*-commutative73.7%
associate-/l*84.5%
Simplified84.5%
Final simplification57.9%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -27.5)
(/ (* a (* -4.0 t)) c_m)
(if (<= z 1.8e+47)
(* b (/ (/ 1.0 z) c_m))
(if (<= z 3e+160)
(* -4.0 (* t (/ a c_m)))
(if (<= z 3.4e+208)
(/ (* b (/ 1.0 z)) c_m)
(* -4.0 (/ a (/ c_m 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 (z <= -27.5) {
tmp = (a * (-4.0 * t)) / c_m;
} else if (z <= 1.8e+47) {
tmp = b * ((1.0 / z) / c_m);
} else if (z <= 3e+160) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= 3.4e+208) {
tmp = (b * (1.0 / z)) / c_m;
} else {
tmp = -4.0 * (a / (c_m / 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 (z <= (-27.5d0)) then
tmp = (a * ((-4.0d0) * t)) / c_m
else if (z <= 1.8d+47) then
tmp = b * ((1.0d0 / z) / c_m)
else if (z <= 3d+160) then
tmp = (-4.0d0) * (t * (a / c_m))
else if (z <= 3.4d+208) then
tmp = (b * (1.0d0 / z)) / c_m
else
tmp = (-4.0d0) * (a / (c_m / 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 (z <= -27.5) {
tmp = (a * (-4.0 * t)) / c_m;
} else if (z <= 1.8e+47) {
tmp = b * ((1.0 / z) / c_m);
} else if (z <= 3e+160) {
tmp = -4.0 * (t * (a / c_m));
} else if (z <= 3.4e+208) {
tmp = (b * (1.0 / z)) / c_m;
} else {
tmp = -4.0 * (a / (c_m / 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 z <= -27.5: tmp = (a * (-4.0 * t)) / c_m elif z <= 1.8e+47: tmp = b * ((1.0 / z) / c_m) elif z <= 3e+160: tmp = -4.0 * (t * (a / c_m)) elif z <= 3.4e+208: tmp = (b * (1.0 / z)) / c_m else: tmp = -4.0 * (a / (c_m / 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 (z <= -27.5) tmp = Float64(Float64(a * Float64(-4.0 * t)) / c_m); elseif (z <= 1.8e+47) tmp = Float64(b * Float64(Float64(1.0 / z) / c_m)); elseif (z <= 3e+160) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); elseif (z <= 3.4e+208) tmp = Float64(Float64(b * Float64(1.0 / z)) / c_m); else tmp = Float64(-4.0 * Float64(a / Float64(c_m / 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 (z <= -27.5)
tmp = (a * (-4.0 * t)) / c_m;
elseif (z <= 1.8e+47)
tmp = b * ((1.0 / z) / c_m);
elseif (z <= 3e+160)
tmp = -4.0 * (t * (a / c_m));
elseif (z <= 3.4e+208)
tmp = (b * (1.0 / z)) / c_m;
else
tmp = -4.0 * (a / (c_m / 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[z, -27.5], N[(N[(a * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[z, 1.8e+47], N[(b * N[(N[(1.0 / z), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+160], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e+208], N[(N[(b * N[(1.0 / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(-4.0 * N[(a / N[(c$95$m / t), $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}\;z \leq -27.5:\\
\;\;\;\;\frac{a \cdot \left(-4 \cdot t\right)}{c_m}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+47}:\\
\;\;\;\;b \cdot \frac{\frac{1}{z}}{c_m}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+160}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c_m}\right)\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+208}:\\
\;\;\;\;\frac{b \cdot \frac{1}{z}}{c_m}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c_m}{t}}\\
\end{array}
\end{array}
if z < -27.5Initial program 66.1%
associate-+l-66.1%
*-commutative66.1%
associate-*r*60.6%
*-commutative60.6%
associate-+l-60.6%
*-commutative60.6%
associate-*r*66.1%
*-commutative66.1%
associate-*l*66.1%
associate-*l*70.5%
Simplified70.5%
Taylor expanded in z around inf 60.9%
*-commutative60.9%
*-commutative60.9%
associate-*l/60.9%
*-commutative60.9%
associate-*r*60.9%
*-commutative60.9%
*-commutative60.9%
Simplified60.9%
if -27.5 < z < 1.80000000000000004e47Initial program 92.6%
associate-+l-92.6%
*-commutative92.6%
associate-*r*93.3%
*-commutative93.3%
associate-+l-93.3%
*-commutative93.3%
associate-*r*92.6%
*-commutative92.6%
associate-*l*92.6%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in b around inf 51.2%
*-commutative51.2%
Simplified51.2%
div-inv51.8%
associate-/r*52.4%
Applied egg-rr52.4%
if 1.80000000000000004e47 < z < 2.9999999999999999e160Initial program 67.0%
associate-+l-67.0%
*-commutative67.0%
associate-*r*71.5%
*-commutative71.5%
associate-+l-71.5%
*-commutative71.5%
associate-*r*67.0%
*-commutative67.0%
associate-*l*67.0%
associate-*l*71.5%
Simplified71.5%
add-cube-cbrt71.0%
pow371.1%
*-commutative71.1%
associate-*l*71.1%
Applied egg-rr71.1%
Taylor expanded in z around inf 49.1%
associate-*l/53.6%
*-commutative53.6%
Simplified53.6%
if 2.9999999999999999e160 < z < 3.3999999999999998e208Initial program 79.5%
associate-+l-79.5%
*-commutative79.5%
associate-*r*99.1%
*-commutative99.1%
associate-+l-99.1%
*-commutative99.1%
associate-*r*79.5%
*-commutative79.5%
associate-*l*79.5%
associate-*l*99.1%
Simplified99.1%
Taylor expanded in b around inf 99.1%
*-commutative99.1%
Simplified99.1%
div-inv98.8%
associate-/r*98.8%
Applied egg-rr98.8%
associate-*r/99.4%
Applied egg-rr99.4%
if 3.3999999999999998e208 < z Initial program 56.0%
associate-+l-56.0%
*-commutative56.0%
associate-*r*44.5%
*-commutative44.5%
associate-+l-44.5%
*-commutative44.5%
associate-*r*56.0%
*-commutative56.0%
associate-*l*56.0%
associate-*l*56.0%
Simplified56.0%
Taylor expanded in z around inf 73.7%
*-commutative73.7%
associate-/l*84.5%
Simplified84.5%
Final simplification57.9%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 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 2e-51)
(/ (+ (* -4.0 (* a t)) (+ (* 9.0 (/ (* x y) z)) (/ b z))) c_m)
(+
(* (/ a c_m) (* -4.0 t))
(/ (- (/ b c_m) (/ (* y (* x -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 <= 2e-51) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else {
tmp = ((a / c_m) * (-4.0 * t)) + (((b / c_m) - ((y * (x * -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 <= 2d-51) then
tmp = (((-4.0d0) * (a * t)) + ((9.0d0 * ((x * y) / z)) + (b / z))) / c_m
else
tmp = ((a / c_m) * ((-4.0d0) * t)) + (((b / c_m) - ((y * (x * (-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 <= 2e-51) {
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
} else {
tmp = ((a / c_m) * (-4.0 * t)) + (((b / c_m) - ((y * (x * -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 <= 2e-51: tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m else: tmp = ((a / c_m) * (-4.0 * t)) + (((b / c_m) - ((y * (x * -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 <= 2e-51) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z))) / c_m); else tmp = Float64(Float64(Float64(a / c_m) * Float64(-4.0 * t)) + Float64(Float64(Float64(b / c_m) - Float64(Float64(y * Float64(x * -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 <= 2e-51)
tmp = ((-4.0 * (a * t)) + ((9.0 * ((x * y) / z)) + (b / z))) / c_m;
else
tmp = ((a / c_m) * (-4.0 * t)) + (((b / c_m) - ((y * (x * -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[LessEqual[c$95$m, 2e-51], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(N[(a / c$95$m), $MachinePrecision] * N[(-4.0 * t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b / c$95$m), $MachinePrecision] - N[(N[(y * N[(x * -9.0), $MachinePrecision]), $MachinePrecision] / c$95$m), $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 2 \cdot 10^{-51}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{c_m} \cdot \left(-4 \cdot t\right) + \frac{\frac{b}{c_m} - \frac{y \cdot \left(x \cdot -9\right)}{c_m}}{z}\\
\end{array}
\end{array}
if c < 2e-51Initial program 83.6%
associate-+l-83.6%
*-commutative83.6%
associate-*r*82.6%
*-commutative82.6%
associate-+l-82.6%
*-commutative82.6%
associate-*r*83.6%
*-commutative83.6%
associate-*l*83.7%
associate-*l*85.3%
Simplified85.3%
Taylor expanded in x around 0 78.0%
cancel-sign-sub-inv78.0%
metadata-eval78.0%
+-commutative78.0%
fma-def78.0%
associate-/l*74.9%
fma-def74.9%
times-frac72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in c around 0 91.9%
if 2e-51 < c Initial program 72.2%
associate-+l-72.2%
*-commutative72.2%
associate-*r*70.8%
*-commutative70.8%
associate-+l-70.8%
*-commutative70.8%
associate-*r*72.2%
*-commutative72.2%
associate-*l*72.2%
associate-*l*71.0%
Simplified71.0%
Taylor expanded in x around 0 81.0%
cancel-sign-sub-inv81.0%
metadata-eval81.0%
+-commutative81.0%
fma-def81.0%
associate-/l*88.8%
fma-def88.8%
times-frac87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in c around 0 78.1%
Taylor expanded in z around -inf 86.2%
mul-1-neg86.2%
unsub-neg86.2%
*-commutative86.2%
associate-*l/94.2%
associate-*l*94.2%
mul-1-neg94.2%
unsub-neg94.2%
associate-*r/94.3%
*-commutative94.3%
*-commutative94.3%
associate-*l*94.2%
Simplified94.2%
Final simplification92.6%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 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 -0.115) (not (<= z 3.5e+82)))
(/ (+ (* -4.0 (* a t)) (/ b z)) c_m)
(/ (+ (/ b c_m) (* 9.0 (/ (* x y) c_m))) z))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -0.115) || !(z <= 3.5e+82)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c_m;
} else {
tmp = ((b / c_m) + (9.0 * ((x * 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 ((z <= (-0.115d0)) .or. (.not. (z <= 3.5d+82))) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c_m
else
tmp = ((b / c_m) + (9.0d0 * ((x * 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 ((z <= -0.115) || !(z <= 3.5e+82)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c_m;
} else {
tmp = ((b / c_m) + (9.0 * ((x * y) / c_m))) / z;
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -0.115) or not (z <= 3.5e+82): tmp = ((-4.0 * (a * t)) + (b / z)) / c_m else: tmp = ((b / c_m) + (9.0 * ((x * y) / c_m))) / z return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -0.115) || !(z <= 3.5e+82)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c_m); else tmp = Float64(Float64(Float64(b / c_m) + Float64(9.0 * Float64(Float64(x * 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 ((z <= -0.115) || ~((z <= 3.5e+82)))
tmp = ((-4.0 * (a * t)) + (b / z)) / c_m;
else
tmp = ((b / c_m) + (9.0 * ((x * y) / c_m))) / z;
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -0.115], N[Not[LessEqual[z, 3.5e+82]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(N[(b / c$95$m), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $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}\;z \leq -0.115 \lor \neg \left(z \leq 3.5 \cdot 10^{+82}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c_m} + 9 \cdot \frac{x \cdot y}{c_m}}{z}\\
\end{array}
\end{array}
if z < -0.115000000000000005 or 3.5e82 < z Initial program 63.7%
associate-+l-63.7%
*-commutative63.7%
associate-*r*59.0%
*-commutative59.0%
associate-+l-59.0%
*-commutative59.0%
associate-*r*63.7%
*-commutative63.7%
associate-*l*63.8%
associate-*l*67.6%
Simplified67.6%
Taylor expanded in x around 0 85.8%
cancel-sign-sub-inv85.8%
metadata-eval85.8%
+-commutative85.8%
fma-def85.8%
associate-/l*83.0%
fma-def83.0%
times-frac82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in c around 0 91.3%
Taylor expanded in x around 0 76.4%
if -0.115000000000000005 < z < 3.5e82Initial program 91.8%
associate-+l-91.8%
*-commutative91.8%
associate-*r*93.1%
*-commutative93.1%
associate-+l-93.1%
*-commutative93.1%
associate-*r*91.8%
*-commutative91.8%
associate-*l*91.8%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in x around 0 74.1%
cancel-sign-sub-inv74.1%
metadata-eval74.1%
+-commutative74.1%
fma-def74.1%
associate-/l*75.8%
fma-def75.9%
times-frac72.9%
*-commutative72.9%
Simplified72.9%
Taylor expanded in z around 0 84.6%
Final simplification81.3%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 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 -27.0) (not (<= z 2.8e+82)))
(/ (+ (* -4.0 (* a t)) (/ b z)) c_m)
(/ (+ b (* 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 ((z <= -27.0) || !(z <= 2.8e+82)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c_m;
} else {
tmp = (b + (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 ((z <= (-27.0d0)) .or. (.not. (z <= 2.8d+82))) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c_m
else
tmp = (b + (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 ((z <= -27.0) || !(z <= 2.8e+82)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c_m;
} else {
tmp = (b + (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 (z <= -27.0) or not (z <= 2.8e+82): tmp = ((-4.0 * (a * t)) + (b / z)) / c_m else: tmp = (b + (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 ((z <= -27.0) || !(z <= 2.8e+82)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c_m); else tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / 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 <= -27.0) || ~((z <= 2.8e+82)))
tmp = ((-4.0 * (a * t)) + (b / z)) / c_m;
else
tmp = (b + (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[Or[LessEqual[z, -27.0], N[Not[LessEqual[z, 2.8e+82]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -27 \lor \neg \left(z \leq 2.8 \cdot 10^{+82}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{c_m \cdot z}\\
\end{array}
\end{array}
if z < -27 or 2.8e82 < z Initial program 63.7%
associate-+l-63.7%
*-commutative63.7%
associate-*r*59.0%
*-commutative59.0%
associate-+l-59.0%
*-commutative59.0%
associate-*r*63.7%
*-commutative63.7%
associate-*l*63.8%
associate-*l*67.6%
Simplified67.6%
Taylor expanded in x around 0 85.8%
cancel-sign-sub-inv85.8%
metadata-eval85.8%
+-commutative85.8%
fma-def85.8%
associate-/l*83.0%
fma-def83.0%
times-frac82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in c around 0 91.3%
Taylor expanded in x around 0 76.4%
if -27 < z < 2.8e82Initial program 91.8%
associate-+l-91.8%
*-commutative91.8%
associate-*r*93.1%
*-commutative93.1%
associate-+l-93.1%
*-commutative93.1%
associate-*r*91.8%
*-commutative91.8%
associate-*l*91.8%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in x around inf 84.1%
associate-*r*84.1%
*-commutative84.1%
associate-*r*84.2%
Simplified84.2%
Final simplification81.0%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 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 (<= x -7.2e+188)
(* (* x (* 9.0 (/ y z))) (/ 1.0 c_m))
(if (<= x 3.5e-10)
(/ (+ (* -4.0 (* a t)) (/ b z)) c_m)
(* 9.0 (* y (/ (/ x 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 (x <= -7.2e+188) {
tmp = (x * (9.0 * (y / z))) * (1.0 / c_m);
} else if (x <= 3.5e-10) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c_m;
} else {
tmp = 9.0 * (y * ((x / 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 (x <= (-7.2d+188)) then
tmp = (x * (9.0d0 * (y / z))) * (1.0d0 / c_m)
else if (x <= 3.5d-10) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c_m
else
tmp = 9.0d0 * (y * ((x / 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 (x <= -7.2e+188) {
tmp = (x * (9.0 * (y / z))) * (1.0 / c_m);
} else if (x <= 3.5e-10) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c_m;
} else {
tmp = 9.0 * (y * ((x / 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 x <= -7.2e+188: tmp = (x * (9.0 * (y / z))) * (1.0 / c_m) elif x <= 3.5e-10: tmp = ((-4.0 * (a * t)) + (b / z)) / c_m else: tmp = 9.0 * (y * ((x / 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 (x <= -7.2e+188) tmp = Float64(Float64(x * Float64(9.0 * Float64(y / z))) * Float64(1.0 / c_m)); elseif (x <= 3.5e-10) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c_m); else tmp = Float64(9.0 * Float64(y * Float64(Float64(x / 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 (x <= -7.2e+188)
tmp = (x * (9.0 * (y / z))) * (1.0 / c_m);
elseif (x <= 3.5e-10)
tmp = ((-4.0 * (a * t)) + (b / z)) / c_m;
else
tmp = 9.0 * (y * ((x / 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[x, -7.2e+188], N[(N[(x * N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e-10], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(9.0 * N[(y * N[(N[(x / c$95$m), $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}\;x \leq -7.2 \cdot 10^{+188}:\\
\;\;\;\;\left(x \cdot \left(9 \cdot \frac{y}{z}\right)\right) \cdot \frac{1}{c_m}\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-10}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c_m}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c_m}}{z}\right)\\
\end{array}
\end{array}
if x < -7.20000000000000041e188Initial program 78.7%
associate-+l-78.7%
*-commutative78.7%
associate-*r*74.1%
*-commutative74.1%
associate-+l-74.1%
*-commutative74.1%
associate-*r*78.7%
*-commutative78.7%
associate-*l*78.8%
associate-*l*83.2%
Simplified83.2%
Taylor expanded in x around inf 66.4%
associate-*r/66.4%
*-commutative66.4%
associate-*r*66.6%
*-commutative66.6%
times-frac66.3%
Simplified66.3%
associate-*r/66.3%
associate-/l*66.3%
Applied egg-rr66.3%
div-inv66.3%
*-commutative66.3%
div-inv66.3%
clear-num66.3%
Applied egg-rr66.3%
if -7.20000000000000041e188 < x < 3.4999999999999998e-10Initial program 79.4%
associate-+l-79.4%
*-commutative79.4%
associate-*r*78.9%
*-commutative78.9%
associate-+l-78.9%
*-commutative78.9%
associate-*r*79.4%
*-commutative79.4%
associate-*l*79.5%
associate-*l*80.2%
Simplified80.2%
Taylor expanded in x around 0 78.0%
cancel-sign-sub-inv78.0%
metadata-eval78.0%
+-commutative78.0%
fma-def78.0%
associate-/l*77.3%
fma-def77.2%
times-frac75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in c around 0 89.1%
Taylor expanded in x around 0 71.7%
if 3.4999999999999998e-10 < x Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*82.2%
*-commutative82.2%
associate-+l-82.2%
*-commutative82.2%
associate-*r*83.5%
*-commutative83.5%
associate-*l*83.5%
associate-*l*83.6%
Simplified83.6%
Taylor expanded in x around 0 80.9%
cancel-sign-sub-inv80.9%
metadata-eval80.9%
+-commutative80.9%
fma-def80.9%
associate-/l*82.0%
fma-def82.1%
times-frac80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in c around 0 89.2%
+-commutative89.2%
div-inv89.2%
fma-def89.2%
associate-/l*89.3%
Applied egg-rr89.3%
Taylor expanded in x around inf 52.3%
associate-*r/52.3%
associate-/r*56.3%
associate-*r/56.4%
*-commutative56.4%
associate-*r/58.9%
associate-*r/59.0%
associate-*r/58.9%
Simplified58.9%
Final simplification67.6%
c_m = (fabs.f64 c) c_s = (copysign.f64 1 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 80.5%
associate-+l-80.5%
*-commutative80.5%
associate-*r*79.4%
*-commutative79.4%
associate-+l-79.4%
*-commutative79.4%
associate-*r*80.5%
*-commutative80.5%
associate-*l*80.5%
associate-*l*81.4%
Simplified81.4%
Taylor expanded in b around inf 39.7%
*-commutative39.7%
Simplified39.7%
Final simplification39.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t_4}{z \cdot c}\\
t_6 := \frac{\left(t_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 < 0:\\
\;\;\;\;\frac{\frac{t_4}{z}}{c}\\
\mathbf{elif}\;t_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t_1\right) - t_2\\
\mathbf{elif}\;t_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t_1\right) - t_2\\
\end{array}
\end{array}
herbie shell --seed 2024021
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:herbie-target
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))