
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= c_m 6.8e-103)
(/ (+ (fma x (* 9.0 y) (* t (* a (* z -4.0)))) b) (* c_m z))
(if (or (<= c_m 8.5e+142) (not (<= c_m 7e+262)))
(fma
9.0
(* y (/ (/ x c_m) z))
(fma (* a (/ t c_m)) -4.0 (/ b (* c_m z))))
(/
(fma -4.0 (* a (* t (/ z c_m))) (fma 9.0 (* x (/ y c_m)) (/ b c_m)))
z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 6.8e-103) {
tmp = (fma(x, (9.0 * y), (t * (a * (z * -4.0)))) + b) / (c_m * z);
} else if ((c_m <= 8.5e+142) || !(c_m <= 7e+262)) {
tmp = fma(9.0, (y * ((x / c_m) / z)), fma((a * (t / c_m)), -4.0, (b / (c_m * z))));
} else {
tmp = fma(-4.0, (a * (t * (z / c_m))), fma(9.0, (x * (y / c_m)), (b / c_m))) / z;
}
return c_s * tmp;
}
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (c_m <= 6.8e-103) tmp = Float64(Float64(fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0)))) + b) / Float64(c_m * z)); elseif ((c_m <= 8.5e+142) || !(c_m <= 7e+262)) tmp = fma(9.0, Float64(y * Float64(Float64(x / c_m) / z)), fma(Float64(a * Float64(t / c_m)), -4.0, Float64(b / Float64(c_m * z)))); else tmp = Float64(fma(-4.0, Float64(a * Float64(t * Float64(z / c_m))), fma(9.0, Float64(x * Float64(y / c_m)), Float64(b / c_m))) / z); end return Float64(c_s * tmp) end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 6.8e-103], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c$95$m, 8.5e+142], N[Not[LessEqual[c$95$m, 7e+262]], $MachinePrecision]], N[(9.0 * N[(y * N[(N[(x / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision] * -4.0 + N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(a * N[(t * N[(z / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x * N[(y / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / 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}\;c\_m \leq 6.8 \cdot 10^{-103}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right) + b}{c\_m \cdot z}\\
\mathbf{elif}\;c\_m \leq 8.5 \cdot 10^{+142} \lor \neg \left(c\_m \leq 7 \cdot 10^{+262}\right):\\
\;\;\;\;\mathsf{fma}\left(9, y \cdot \frac{\frac{x}{c\_m}}{z}, \mathsf{fma}\left(a \cdot \frac{t}{c\_m}, -4, \frac{b}{c\_m \cdot z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4, a \cdot \left(t \cdot \frac{z}{c\_m}\right), \mathsf{fma}\left(9, x \cdot \frac{y}{c\_m}, \frac{b}{c\_m}\right)\right)}{z}\\
\end{array}
\end{array}
if c < 6.80000000000000006e-103Initial program 81.9%
Simplified83.1%
if 6.80000000000000006e-103 < c < 8.49999999999999955e142 or 6.9999999999999994e262 < c Initial program 81.0%
associate-+l-81.0%
*-commutative81.0%
associate-*r*79.6%
*-commutative79.6%
associate-+l-79.6%
associate-*l*79.7%
associate-*l*85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in x around 0 85.5%
associate--l+85.5%
fma-define85.5%
*-commutative85.5%
*-commutative85.5%
associate-/l*88.4%
*-commutative88.4%
associate-/r*89.7%
cancel-sign-sub-inv89.7%
metadata-eval89.7%
+-commutative89.7%
*-commutative89.7%
fma-define89.7%
associate-/l*93.9%
*-commutative93.9%
Simplified93.9%
if 8.49999999999999955e142 < c < 6.9999999999999994e262Initial program 68.6%
associate-+l-68.6%
*-commutative68.6%
associate-*r*68.7%
*-commutative68.7%
associate-+l-68.7%
associate-*l*68.7%
associate-*l*63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in z around 0 81.4%
fma-define81.4%
associate-/l*75.6%
associate-/l*75.5%
fma-define75.5%
associate-/l*93.6%
Simplified93.6%
Final simplification86.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -9.6e+85) (not (<= z 5.2e-33)))
(/ (* x (- (+ (* 9.0 (/ y z)) (/ b (* x z))) (* 4.0 (/ (* t a) x)))) c_m)
(/ (+ (fma x (* 9.0 y) (* t (* a (* z -4.0)))) b) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -9.6e+85) || !(z <= 5.2e-33)) {
tmp = (x * (((9.0 * (y / z)) + (b / (x * z))) - (4.0 * ((t * a) / x)))) / c_m;
} else {
tmp = (fma(x, (9.0 * y), (t * (a * (z * -4.0)))) + b) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -9.6e+85) || !(z <= 5.2e-33)) tmp = Float64(Float64(x * Float64(Float64(Float64(9.0 * Float64(y / z)) + Float64(b / Float64(x * z))) - Float64(4.0 * Float64(Float64(t * a) / x)))) / c_m); else tmp = Float64(Float64(fma(x, Float64(9.0 * y), Float64(t * Float64(a * Float64(z * -4.0)))) + b) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -9.6e+85], N[Not[LessEqual[z, 5.2e-33]], $MachinePrecision]], N[(N[(x * N[(N[(N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $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 -9.6 \cdot 10^{+85} \lor \neg \left(z \leq 5.2 \cdot 10^{-33}\right):\\
\;\;\;\;\frac{x \cdot \left(\left(9 \cdot \frac{y}{z} + \frac{b}{x \cdot z}\right) - 4 \cdot \frac{t \cdot a}{x}\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 9 \cdot y, t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right) + b}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -9.59999999999999986e85 or 5.19999999999999988e-33 < z Initial program 61.8%
associate-+l-61.8%
*-commutative61.8%
associate-*r*61.8%
*-commutative61.8%
associate-+l-61.8%
associate-*l*62.7%
associate-*l*69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in x around inf 65.3%
Taylor expanded in c around 0 82.2%
if -9.59999999999999986e85 < z < 5.19999999999999988e-33Initial program 96.4%
Simplified95.7%
Final simplification89.6%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<=
(/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* c_m z))
INFINITY)
(/ (+ b (- (* x (* 9.0 y)) (* (* t a) (* z 4.0)))) (* c_m z))
(+ (/ (/ b c_m) z) (* -4.0 (* a (/ t c_m)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (((b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z)) <= ((double) INFINITY)) {
tmp = (b + ((x * (9.0 * y)) - ((t * a) * (z * 4.0)))) / (c_m * z);
} else {
tmp = ((b / c_m) / z) + (-4.0 * (a * (t / c_m)));
}
return c_s * tmp;
}
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (((b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z)) <= Double.POSITIVE_INFINITY) {
tmp = (b + ((x * (9.0 * y)) - ((t * a) * (z * 4.0)))) / (c_m * z);
} else {
tmp = ((b / c_m) / z) + (-4.0 * (a * (t / c_m)));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if ((b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z)) <= math.inf: tmp = (b + ((x * (9.0 * y)) - ((t * a) * (z * 4.0)))) / (c_m * z) else: tmp = ((b / c_m) / z) + (-4.0 * (a * (t / c_m))) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)) <= Inf) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(t * a) * Float64(z * 4.0)))) / Float64(c_m * z)); else tmp = Float64(Float64(Float64(b / c_m) / z) + Float64(-4.0 * Float64(a * Float64(t / c_m)))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (((b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c_m * z)) <= Inf)
tmp = (b + ((x * (9.0 * y)) - ((t * a) * (z * 4.0)))) / (c_m * z);
else
tmp = ((b / c_m) / z) + (-4.0 * (a * (t / c_m)));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision] + N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c\_m \cdot z} \leq \infty:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(t \cdot a\right) \cdot \left(z \cdot 4\right)\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z} + -4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 87.3%
associate-+l-87.3%
*-commutative87.3%
associate-*r*86.5%
*-commutative86.5%
associate-+l-86.5%
associate-*l*86.9%
associate-*l*89.0%
*-commutative89.0%
Simplified89.0%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*5.4%
*-commutative5.4%
associate-+l-5.4%
associate-*l*5.4%
associate-*l*5.4%
*-commutative5.4%
Simplified5.4%
Taylor expanded in x around inf 28.7%
Taylor expanded in x around 0 49.5%
cancel-sign-sub-inv49.5%
associate-/r*49.6%
metadata-eval49.6%
*-commutative49.6%
associate-/l*74.4%
Applied egg-rr74.4%
Final simplification87.9%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -2.4e+53)
(* -4.0 (/ (* t a) c_m))
(if (<= z -4.8e-44)
(* 9.0 (/ (* x y) (* c_m z)))
(if (<= z -2.05e-66)
(* -4.0 (/ a (/ c_m t)))
(if (<= z -2.4e-155)
(/ (/ b z) c_m)
(if (<= z 1.08e-240)
(* 9.0 (* x (/ y (* c_m z))))
(if (<= z 4.4e-29) (/ 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 (z <= -2.4e+53) {
tmp = -4.0 * ((t * a) / c_m);
} else if (z <= -4.8e-44) {
tmp = 9.0 * ((x * y) / (c_m * z));
} else if (z <= -2.05e-66) {
tmp = -4.0 * (a / (c_m / t));
} else if (z <= -2.4e-155) {
tmp = (b / z) / c_m;
} else if (z <= 1.08e-240) {
tmp = 9.0 * (x * (y / (c_m * z)));
} else if (z <= 4.4e-29) {
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 (z <= (-2.4d+53)) then
tmp = (-4.0d0) * ((t * a) / c_m)
else if (z <= (-4.8d-44)) then
tmp = 9.0d0 * ((x * y) / (c_m * z))
else if (z <= (-2.05d-66)) then
tmp = (-4.0d0) * (a / (c_m / t))
else if (z <= (-2.4d-155)) then
tmp = (b / z) / c_m
else if (z <= 1.08d-240) then
tmp = 9.0d0 * (x * (y / (c_m * z)))
else if (z <= 4.4d-29) 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 (z <= -2.4e+53) {
tmp = -4.0 * ((t * a) / c_m);
} else if (z <= -4.8e-44) {
tmp = 9.0 * ((x * y) / (c_m * z));
} else if (z <= -2.05e-66) {
tmp = -4.0 * (a / (c_m / t));
} else if (z <= -2.4e-155) {
tmp = (b / z) / c_m;
} else if (z <= 1.08e-240) {
tmp = 9.0 * (x * (y / (c_m * z)));
} else if (z <= 4.4e-29) {
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 z <= -2.4e+53: tmp = -4.0 * ((t * a) / c_m) elif z <= -4.8e-44: tmp = 9.0 * ((x * y) / (c_m * z)) elif z <= -2.05e-66: tmp = -4.0 * (a / (c_m / t)) elif z <= -2.4e-155: tmp = (b / z) / c_m elif z <= 1.08e-240: tmp = 9.0 * (x * (y / (c_m * z))) elif z <= 4.4e-29: 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 (z <= -2.4e+53) tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m)); elseif (z <= -4.8e-44) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c_m * z))); elseif (z <= -2.05e-66) tmp = Float64(-4.0 * Float64(a / Float64(c_m / t))); elseif (z <= -2.4e-155) tmp = Float64(Float64(b / z) / c_m); elseif (z <= 1.08e-240) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(c_m * z)))); elseif (z <= 4.4e-29) 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 (z <= -2.4e+53)
tmp = -4.0 * ((t * a) / c_m);
elseif (z <= -4.8e-44)
tmp = 9.0 * ((x * y) / (c_m * z));
elseif (z <= -2.05e-66)
tmp = -4.0 * (a / (c_m / t));
elseif (z <= -2.4e-155)
tmp = (b / z) / c_m;
elseif (z <= 1.08e-240)
tmp = 9.0 * (x * (y / (c_m * z)));
elseif (z <= 4.4e-29)
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[LessEqual[z, -2.4e+53], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.8e-44], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.05e-66], N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.4e-155], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[z, 1.08e-240], N[(9.0 * N[(x * N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e-29], 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}\;z \leq -2.4 \cdot 10^{+53}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-44}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{c\_m \cdot z}\\
\mathbf{elif}\;z \leq -2.05 \cdot 10^{-66}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c\_m}{t}}\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-155}:\\
\;\;\;\;\frac{\frac{b}{z}}{c\_m}\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{-240}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{c\_m \cdot z}\right)\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-29}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if z < -2.4e53Initial program 60.7%
associate-+l-60.7%
*-commutative60.7%
associate-*r*67.9%
*-commutative67.9%
associate-+l-67.9%
associate-*l*69.7%
associate-*l*73.7%
*-commutative73.7%
Simplified73.7%
Taylor expanded in z around inf 51.0%
if -2.4e53 < z < -4.80000000000000017e-44Initial program 95.4%
associate-+l-95.4%
*-commutative95.4%
associate-*r*95.4%
*-commutative95.4%
associate-+l-95.4%
associate-*l*95.7%
associate-*l*95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in x around inf 51.7%
if -4.80000000000000017e-44 < z < -2.04999999999999999e-66Initial program 99.2%
associate-+l-99.2%
*-commutative99.2%
associate-*r*99.6%
*-commutative99.6%
associate-+l-99.6%
associate-*l*99.6%
associate-*l*99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in z around inf 91.7%
div-inv91.7%
Applied egg-rr91.7%
associate-*l*67.6%
div-inv68.0%
clear-num68.0%
un-div-inv68.0%
Applied egg-rr68.0%
if -2.04999999999999999e-66 < z < -2.4e-155Initial program 95.3%
associate-+l-95.3%
*-commutative95.3%
associate-*r*95.3%
*-commutative95.3%
associate-+l-95.3%
associate-*l*95.3%
associate-*l*90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in x around inf 70.1%
Taylor expanded in c around 0 61.5%
Taylor expanded in b around inf 51.5%
if -2.4e-155 < z < 1.08e-240Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-+l-99.8%
associate-*l*99.7%
associate-*l*92.7%
*-commutative92.7%
Simplified92.7%
Taylor expanded in x around inf 73.8%
associate-/l*71.6%
*-commutative71.6%
Applied egg-rr71.6%
if 1.08e-240 < z < 4.39999999999999981e-29Initial program 95.4%
associate-+l-95.4%
*-commutative95.4%
associate-*r*95.4%
*-commutative95.4%
associate-+l-95.4%
associate-*l*95.4%
associate-*l*95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in b around inf 70.6%
*-commutative70.6%
Simplified70.6%
if 4.39999999999999981e-29 < z Initial program 66.8%
associate-+l-66.8%
*-commutative66.8%
associate-*r*60.4%
*-commutative60.4%
associate-+l-60.4%
associate-*l*60.5%
associate-*l*69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in x around inf 61.8%
Taylor expanded in c around 0 82.9%
Taylor expanded in x around 0 74.1%
Taylor expanded in b around 0 59.4%
*-commutative59.4%
associate-/l*59.9%
Simplified59.9%
Final simplification60.4%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -1.7e+53)
(* -4.0 (/ (* t a) c_m))
(if (<= z -4.4e-47)
(* 9.0 (* x (/ (/ y c_m) z)))
(if (<= z -2.65e-65)
(* -4.0 (/ a (/ c_m t)))
(if (<= z -2.5e-155)
(/ (/ b z) c_m)
(if (<= z 1.8e-236)
(* 9.0 (* x (/ y (* c_m z))))
(if (<= z 6e-28) (/ 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 (z <= -1.7e+53) {
tmp = -4.0 * ((t * a) / c_m);
} else if (z <= -4.4e-47) {
tmp = 9.0 * (x * ((y / c_m) / z));
} else if (z <= -2.65e-65) {
tmp = -4.0 * (a / (c_m / t));
} else if (z <= -2.5e-155) {
tmp = (b / z) / c_m;
} else if (z <= 1.8e-236) {
tmp = 9.0 * (x * (y / (c_m * z)));
} else if (z <= 6e-28) {
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 (z <= (-1.7d+53)) then
tmp = (-4.0d0) * ((t * a) / c_m)
else if (z <= (-4.4d-47)) then
tmp = 9.0d0 * (x * ((y / c_m) / z))
else if (z <= (-2.65d-65)) then
tmp = (-4.0d0) * (a / (c_m / t))
else if (z <= (-2.5d-155)) then
tmp = (b / z) / c_m
else if (z <= 1.8d-236) then
tmp = 9.0d0 * (x * (y / (c_m * z)))
else if (z <= 6d-28) 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 (z <= -1.7e+53) {
tmp = -4.0 * ((t * a) / c_m);
} else if (z <= -4.4e-47) {
tmp = 9.0 * (x * ((y / c_m) / z));
} else if (z <= -2.65e-65) {
tmp = -4.0 * (a / (c_m / t));
} else if (z <= -2.5e-155) {
tmp = (b / z) / c_m;
} else if (z <= 1.8e-236) {
tmp = 9.0 * (x * (y / (c_m * z)));
} else if (z <= 6e-28) {
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 z <= -1.7e+53: tmp = -4.0 * ((t * a) / c_m) elif z <= -4.4e-47: tmp = 9.0 * (x * ((y / c_m) / z)) elif z <= -2.65e-65: tmp = -4.0 * (a / (c_m / t)) elif z <= -2.5e-155: tmp = (b / z) / c_m elif z <= 1.8e-236: tmp = 9.0 * (x * (y / (c_m * z))) elif z <= 6e-28: 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 (z <= -1.7e+53) tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m)); elseif (z <= -4.4e-47) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c_m) / z))); elseif (z <= -2.65e-65) tmp = Float64(-4.0 * Float64(a / Float64(c_m / t))); elseif (z <= -2.5e-155) tmp = Float64(Float64(b / z) / c_m); elseif (z <= 1.8e-236) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(c_m * z)))); elseif (z <= 6e-28) 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 (z <= -1.7e+53)
tmp = -4.0 * ((t * a) / c_m);
elseif (z <= -4.4e-47)
tmp = 9.0 * (x * ((y / c_m) / z));
elseif (z <= -2.65e-65)
tmp = -4.0 * (a / (c_m / t));
elseif (z <= -2.5e-155)
tmp = (b / z) / c_m;
elseif (z <= 1.8e-236)
tmp = 9.0 * (x * (y / (c_m * z)));
elseif (z <= 6e-28)
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[LessEqual[z, -1.7e+53], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.4e-47], N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.65e-65], N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.5e-155], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[z, 1.8e-236], N[(9.0 * N[(x * N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-28], 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}\;z \leq -1.7 \cdot 10^{+53}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-47}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\mathbf{elif}\;z \leq -2.65 \cdot 10^{-65}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c\_m}{t}}\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-155}:\\
\;\;\;\;\frac{\frac{b}{z}}{c\_m}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-236}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{c\_m \cdot z}\right)\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-28}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if z < -1.69999999999999999e53Initial program 60.7%
associate-+l-60.7%
*-commutative60.7%
associate-*r*67.9%
*-commutative67.9%
associate-+l-67.9%
associate-*l*69.7%
associate-*l*73.7%
*-commutative73.7%
Simplified73.7%
Taylor expanded in z around inf 51.0%
if -1.69999999999999999e53 < z < -4.40000000000000037e-47Initial program 95.4%
associate-+l-95.4%
*-commutative95.4%
associate-*r*95.4%
*-commutative95.4%
associate-+l-95.4%
associate-*l*95.7%
associate-*l*95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in x around inf 67.0%
Taylor expanded in c around 0 91.6%
Taylor expanded in x around inf 51.7%
associate-/l*51.7%
Simplified51.7%
Taylor expanded in x around 0 51.7%
associate-/l*51.6%
associate-/r*51.7%
Simplified51.7%
if -4.40000000000000037e-47 < z < -2.65000000000000019e-65Initial program 99.2%
associate-+l-99.2%
*-commutative99.2%
associate-*r*99.6%
*-commutative99.6%
associate-+l-99.6%
associate-*l*99.6%
associate-*l*99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in z around inf 91.7%
div-inv91.7%
Applied egg-rr91.7%
associate-*l*67.6%
div-inv68.0%
clear-num68.0%
un-div-inv68.0%
Applied egg-rr68.0%
if -2.65000000000000019e-65 < z < -2.4999999999999999e-155Initial program 95.3%
associate-+l-95.3%
*-commutative95.3%
associate-*r*95.3%
*-commutative95.3%
associate-+l-95.3%
associate-*l*95.3%
associate-*l*90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in x around inf 70.1%
Taylor expanded in c around 0 61.5%
Taylor expanded in b around inf 51.5%
if -2.4999999999999999e-155 < z < 1.80000000000000004e-236Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-+l-99.8%
associate-*l*99.7%
associate-*l*92.7%
*-commutative92.7%
Simplified92.7%
Taylor expanded in x around inf 73.8%
associate-/l*71.6%
*-commutative71.6%
Applied egg-rr71.6%
if 1.80000000000000004e-236 < z < 6.00000000000000005e-28Initial program 95.4%
associate-+l-95.4%
*-commutative95.4%
associate-*r*95.4%
*-commutative95.4%
associate-+l-95.4%
associate-*l*95.4%
associate-*l*95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in b around inf 70.6%
*-commutative70.6%
Simplified70.6%
if 6.00000000000000005e-28 < z Initial program 66.8%
associate-+l-66.8%
*-commutative66.8%
associate-*r*60.4%
*-commutative60.4%
associate-+l-60.4%
associate-*l*60.5%
associate-*l*69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in x around inf 61.8%
Taylor expanded in c around 0 82.9%
Taylor expanded in x around 0 74.1%
Taylor expanded in b around 0 59.4%
*-commutative59.4%
associate-/l*59.9%
Simplified59.9%
Final simplification60.4%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* 9.0 (* x (/ y (* c_m z))))))
(*
c_s
(if (<= z -3.1e+54)
(* -4.0 (/ (* t a) c_m))
(if (<= z -7e-46)
t_1
(if (<= z -5.2e-63)
(* -4.0 (/ a (/ c_m t)))
(if (<= z -2.4e-155)
(/ (/ b z) c_m)
(if (<= z 3e-239)
t_1
(if (<= z 4e-32)
(/ 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 t_1 = 9.0 * (x * (y / (c_m * z)));
double tmp;
if (z <= -3.1e+54) {
tmp = -4.0 * ((t * a) / c_m);
} else if (z <= -7e-46) {
tmp = t_1;
} else if (z <= -5.2e-63) {
tmp = -4.0 * (a / (c_m / t));
} else if (z <= -2.4e-155) {
tmp = (b / z) / c_m;
} else if (z <= 3e-239) {
tmp = t_1;
} else if (z <= 4e-32) {
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) :: t_1
real(8) :: tmp
t_1 = 9.0d0 * (x * (y / (c_m * z)))
if (z <= (-3.1d+54)) then
tmp = (-4.0d0) * ((t * a) / c_m)
else if (z <= (-7d-46)) then
tmp = t_1
else if (z <= (-5.2d-63)) then
tmp = (-4.0d0) * (a / (c_m / t))
else if (z <= (-2.4d-155)) then
tmp = (b / z) / c_m
else if (z <= 3d-239) then
tmp = t_1
else if (z <= 4d-32) 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 t_1 = 9.0 * (x * (y / (c_m * z)));
double tmp;
if (z <= -3.1e+54) {
tmp = -4.0 * ((t * a) / c_m);
} else if (z <= -7e-46) {
tmp = t_1;
} else if (z <= -5.2e-63) {
tmp = -4.0 * (a / (c_m / t));
} else if (z <= -2.4e-155) {
tmp = (b / z) / c_m;
} else if (z <= 3e-239) {
tmp = t_1;
} else if (z <= 4e-32) {
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): t_1 = 9.0 * (x * (y / (c_m * z))) tmp = 0 if z <= -3.1e+54: tmp = -4.0 * ((t * a) / c_m) elif z <= -7e-46: tmp = t_1 elif z <= -5.2e-63: tmp = -4.0 * (a / (c_m / t)) elif z <= -2.4e-155: tmp = (b / z) / c_m elif z <= 3e-239: tmp = t_1 elif z <= 4e-32: 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) t_1 = Float64(9.0 * Float64(x * Float64(y / Float64(c_m * z)))) tmp = 0.0 if (z <= -3.1e+54) tmp = Float64(-4.0 * Float64(Float64(t * a) / c_m)); elseif (z <= -7e-46) tmp = t_1; elseif (z <= -5.2e-63) tmp = Float64(-4.0 * Float64(a / Float64(c_m / t))); elseif (z <= -2.4e-155) tmp = Float64(Float64(b / z) / c_m); elseif (z <= 3e-239) tmp = t_1; elseif (z <= 4e-32) 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)
t_1 = 9.0 * (x * (y / (c_m * z)));
tmp = 0.0;
if (z <= -3.1e+54)
tmp = -4.0 * ((t * a) / c_m);
elseif (z <= -7e-46)
tmp = t_1;
elseif (z <= -5.2e-63)
tmp = -4.0 * (a / (c_m / t));
elseif (z <= -2.4e-155)
tmp = (b / z) / c_m;
elseif (z <= 3e-239)
tmp = t_1;
elseif (z <= 4e-32)
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_] := Block[{t$95$1 = N[(9.0 * N[(x * N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -3.1e+54], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7e-46], t$95$1, If[LessEqual[z, -5.2e-63], N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.4e-155], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[z, 3e-239], t$95$1, If[LessEqual[z, 4e-32], 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])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(x \cdot \frac{y}{c\_m \cdot z}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+54}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-63}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c\_m}{t}}\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-155}:\\
\;\;\;\;\frac{\frac{b}{z}}{c\_m}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-239}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-32}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
\end{array}
if z < -3.0999999999999999e54Initial program 60.7%
associate-+l-60.7%
*-commutative60.7%
associate-*r*67.9%
*-commutative67.9%
associate-+l-67.9%
associate-*l*69.7%
associate-*l*73.7%
*-commutative73.7%
Simplified73.7%
Taylor expanded in z around inf 51.0%
if -3.0999999999999999e54 < z < -7.0000000000000004e-46 or -2.4e-155 < z < 2.9999999999999998e-239Initial program 98.2%
associate-+l-98.2%
*-commutative98.2%
associate-*r*98.2%
*-commutative98.2%
associate-+l-98.2%
associate-*l*98.2%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in x around inf 65.7%
associate-/l*64.2%
*-commutative64.2%
Applied egg-rr64.2%
if -7.0000000000000004e-46 < z < -5.2000000000000003e-63Initial program 99.2%
associate-+l-99.2%
*-commutative99.2%
associate-*r*99.6%
*-commutative99.6%
associate-+l-99.6%
associate-*l*99.6%
associate-*l*99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in z around inf 91.7%
div-inv91.7%
Applied egg-rr91.7%
associate-*l*67.6%
div-inv68.0%
clear-num68.0%
un-div-inv68.0%
Applied egg-rr68.0%
if -5.2000000000000003e-63 < z < -2.4e-155Initial program 95.3%
associate-+l-95.3%
*-commutative95.3%
associate-*r*95.3%
*-commutative95.3%
associate-+l-95.3%
associate-*l*95.3%
associate-*l*90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in x around inf 70.1%
Taylor expanded in c around 0 61.5%
Taylor expanded in b around inf 51.5%
if 2.9999999999999998e-239 < z < 4.00000000000000022e-32Initial program 95.4%
associate-+l-95.4%
*-commutative95.4%
associate-*r*95.4%
*-commutative95.4%
associate-+l-95.4%
associate-*l*95.4%
associate-*l*95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in b around inf 70.6%
*-commutative70.6%
Simplified70.6%
if 4.00000000000000022e-32 < z Initial program 66.8%
associate-+l-66.8%
*-commutative66.8%
associate-*r*60.4%
*-commutative60.4%
associate-+l-60.4%
associate-*l*60.5%
associate-*l*69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in x around inf 61.8%
Taylor expanded in c around 0 82.9%
Taylor expanded in x around 0 74.1%
Taylor expanded in b around 0 59.4%
*-commutative59.4%
associate-/l*59.9%
Simplified59.9%
Final simplification60.4%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* c_m (* t z))))
(*
c_s
(if (<= b -3.4e+189)
(* t (- (/ b t_1) (/ (* a 4.0) c_m)))
(if (<= b -1.85e+18)
(/ (+ b (* x (* 9.0 y))) (* c_m z))
(if (<= b -1e-191)
(* t (+ (* -4.0 (/ a c_m)) (* 9.0 (/ (* x y) t_1))))
(if (<= b 3e-32)
(/ (- (* 9.0 (* x y)) (* 4.0 (* z (* t a)))) (* c_m z))
(- (/ 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 t_1 = c_m * (t * z);
double tmp;
if (b <= -3.4e+189) {
tmp = t * ((b / t_1) - ((a * 4.0) / c_m));
} else if (b <= -1.85e+18) {
tmp = (b + (x * (9.0 * y))) / (c_m * z);
} else if (b <= -1e-191) {
tmp = t * ((-4.0 * (a / c_m)) + (9.0 * ((x * y) / t_1)));
} else if (b <= 3e-32) {
tmp = ((9.0 * (x * y)) - (4.0 * (z * (t * a)))) / (c_m * z);
} else {
tmp = (b / (c_m * z)) - (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 = c_m * (t * z)
if (b <= (-3.4d+189)) then
tmp = t * ((b / t_1) - ((a * 4.0d0) / c_m))
else if (b <= (-1.85d+18)) then
tmp = (b + (x * (9.0d0 * y))) / (c_m * z)
else if (b <= (-1d-191)) then
tmp = t * (((-4.0d0) * (a / c_m)) + (9.0d0 * ((x * y) / t_1)))
else if (b <= 3d-32) then
tmp = ((9.0d0 * (x * y)) - (4.0d0 * (z * (t * a)))) / (c_m * z)
else
tmp = (b / (c_m * z)) - (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 = c_m * (t * z);
double tmp;
if (b <= -3.4e+189) {
tmp = t * ((b / t_1) - ((a * 4.0) / c_m));
} else if (b <= -1.85e+18) {
tmp = (b + (x * (9.0 * y))) / (c_m * z);
} else if (b <= -1e-191) {
tmp = t * ((-4.0 * (a / c_m)) + (9.0 * ((x * y) / t_1)));
} else if (b <= 3e-32) {
tmp = ((9.0 * (x * y)) - (4.0 * (z * (t * a)))) / (c_m * z);
} else {
tmp = (b / (c_m * z)) - (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 = c_m * (t * z) tmp = 0 if b <= -3.4e+189: tmp = t * ((b / t_1) - ((a * 4.0) / c_m)) elif b <= -1.85e+18: tmp = (b + (x * (9.0 * y))) / (c_m * z) elif b <= -1e-191: tmp = t * ((-4.0 * (a / c_m)) + (9.0 * ((x * y) / t_1))) elif b <= 3e-32: tmp = ((9.0 * (x * y)) - (4.0 * (z * (t * a)))) / (c_m * z) else: tmp = (b / (c_m * z)) - (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(c_m * Float64(t * z)) tmp = 0.0 if (b <= -3.4e+189) tmp = Float64(t * Float64(Float64(b / t_1) - Float64(Float64(a * 4.0) / c_m))); elseif (b <= -1.85e+18) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(c_m * z)); elseif (b <= -1e-191) tmp = Float64(t * Float64(Float64(-4.0 * Float64(a / c_m)) + Float64(9.0 * Float64(Float64(x * y) / t_1)))); elseif (b <= 3e-32) tmp = Float64(Float64(Float64(9.0 * Float64(x * y)) - Float64(4.0 * Float64(z * Float64(t * a)))) / Float64(c_m * z)); else tmp = Float64(Float64(b / Float64(c_m * z)) - Float64(4.0 * Float64(Float64(t * a) / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = c_m * (t * z);
tmp = 0.0;
if (b <= -3.4e+189)
tmp = t * ((b / t_1) - ((a * 4.0) / c_m));
elseif (b <= -1.85e+18)
tmp = (b + (x * (9.0 * y))) / (c_m * z);
elseif (b <= -1e-191)
tmp = t * ((-4.0 * (a / c_m)) + (9.0 * ((x * y) / t_1)));
elseif (b <= 3e-32)
tmp = ((9.0 * (x * y)) - (4.0 * (z * (t * a)))) / (c_m * z);
else
tmp = (b / (c_m * z)) - (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[(c$95$m * N[(t * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[b, -3.4e+189], N[(t * N[(N[(b / t$95$1), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.85e+18], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1e-191], N[(t * N[(N[(-4.0 * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3e-32], N[(N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(z * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / 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 := c\_m \cdot \left(t \cdot z\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{+189}:\\
\;\;\;\;t \cdot \left(\frac{b}{t\_1} - \frac{a \cdot 4}{c\_m}\right)\\
\mathbf{elif}\;b \leq -1.85 \cdot 10^{+18}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{c\_m \cdot z}\\
\mathbf{elif}\;b \leq -1 \cdot 10^{-191}:\\
\;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c\_m} + 9 \cdot \frac{x \cdot y}{t\_1}\right)\\
\mathbf{elif}\;b \leq 3 \cdot 10^{-32}:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(z \cdot \left(t \cdot a\right)\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c\_m \cdot z} - 4 \cdot \frac{t \cdot a}{c\_m}\\
\end{array}
\end{array}
\end{array}
if b < -3.39999999999999983e189Initial program 71.9%
associate-+l-71.9%
*-commutative71.9%
associate-*r*62.7%
*-commutative62.7%
associate-+l-62.7%
associate-*l*62.7%
associate-*l*67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in x around inf 57.9%
Taylor expanded in x around 0 72.4%
Taylor expanded in t around inf 70.5%
*-commutative70.5%
*-commutative70.5%
associate-*r/70.5%
Simplified70.5%
if -3.39999999999999983e189 < b < -1.85e18Initial program 90.7%
associate-+l-90.7%
*-commutative90.7%
associate-*r*87.7%
*-commutative87.7%
associate-+l-87.7%
associate-*l*87.7%
associate-*l*90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in x around inf 83.5%
associate-*r*83.5%
*-commutative83.5%
associate-*r*83.5%
Simplified83.5%
if -1.85e18 < b < -1e-191Initial program 81.0%
associate-+l-81.0%
*-commutative81.0%
associate-*r*77.0%
*-commutative77.0%
associate-+l-77.0%
associate-*l*77.1%
associate-*l*81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in b around 0 79.1%
Taylor expanded in t around inf 82.5%
if -1e-191 < b < 3e-32Initial program 81.1%
associate-+l-81.1%
*-commutative81.1%
associate-*r*84.6%
*-commutative84.6%
associate-+l-84.6%
associate-*l*85.7%
associate-*l*85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in b around 0 76.9%
pow176.9%
Applied egg-rr76.9%
unpow176.9%
*-commutative76.9%
*-commutative76.9%
associate-*l*80.3%
*-commutative80.3%
Simplified80.3%
if 3e-32 < b Initial program 78.7%
associate-+l-78.7%
*-commutative78.7%
associate-*r*80.0%
*-commutative80.0%
associate-+l-80.0%
associate-*l*80.0%
associate-*l*81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in x around inf 66.6%
Taylor expanded in x around 0 75.2%
Final simplification78.9%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -1.2e+94) (not (<= z 5.2e-33)))
(/ (* x (- (+ (* 9.0 (/ y z)) (/ b (* x z))) (* 4.0 (/ (* t a) x)))) c_m)
(/ (+ b (- (* y (* x 9.0)) (* 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 <= -1.2e+94) || !(z <= 5.2e-33)) {
tmp = (x * (((9.0 * (y / z)) + (b / (x * z))) - (4.0 * ((t * a) / x)))) / c_m;
} else {
tmp = (b + ((y * (x * 9.0)) - (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 <= (-1.2d+94)) .or. (.not. (z <= 5.2d-33))) then
tmp = (x * (((9.0d0 * (y / z)) + (b / (x * z))) - (4.0d0 * ((t * a) / x)))) / c_m
else
tmp = (b + ((y * (x * 9.0d0)) - (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 <= -1.2e+94) || !(z <= 5.2e-33)) {
tmp = (x * (((9.0 * (y / z)) + (b / (x * z))) - (4.0 * ((t * a) / x)))) / c_m;
} else {
tmp = (b + ((y * (x * 9.0)) - (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 <= -1.2e+94) or not (z <= 5.2e-33): tmp = (x * (((9.0 * (y / z)) + (b / (x * z))) - (4.0 * ((t * a) / x)))) / c_m else: tmp = (b + ((y * (x * 9.0)) - (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 <= -1.2e+94) || !(z <= 5.2e-33)) tmp = Float64(Float64(x * Float64(Float64(Float64(9.0 * Float64(y / z)) + Float64(b / Float64(x * z))) - Float64(4.0 * Float64(Float64(t * a) / x)))) / c_m); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - 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 <= -1.2e+94) || ~((z <= 5.2e-33)))
tmp = (x * (((9.0 * (y / z)) + (b / (x * z))) - (4.0 * ((t * a) / x)))) / c_m;
else
tmp = (b + ((y * (x * 9.0)) - (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, -1.2e+94], N[Not[LessEqual[z, 5.2e-33]], $MachinePrecision]], N[(N[(x * N[(N[(N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(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.2 \cdot 10^{+94} \lor \neg \left(z \leq 5.2 \cdot 10^{-33}\right):\\
\;\;\;\;\frac{x \cdot \left(\left(9 \cdot \frac{y}{z} + \frac{b}{x \cdot z}\right) - 4 \cdot \frac{t \cdot a}{x}\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -1.19999999999999991e94 or 5.19999999999999988e-33 < z Initial program 61.6%
associate-+l-61.6%
*-commutative61.6%
associate-*r*61.7%
*-commutative61.7%
associate-+l-61.7%
associate-*l*62.5%
associate-*l*69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in x around inf 65.2%
Taylor expanded in c around 0 82.6%
if -1.19999999999999991e94 < z < 5.19999999999999988e-33Initial program 95.8%
Final simplification90.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -1.7e+21) (not (<= z 5e+60)))
(-
(+ (/ b (* c_m z)) (* 9.0 (/ (* x y) (* c_m z))))
(* 4.0 (/ (* t a) c_m)))
(/ (+ b (- (* y (* x 9.0)) (* 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 <= -1.7e+21) || !(z <= 5e+60)) {
tmp = ((b / (c_m * z)) + (9.0 * ((x * y) / (c_m * z)))) - (4.0 * ((t * a) / c_m));
} else {
tmp = (b + ((y * (x * 9.0)) - (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 <= (-1.7d+21)) .or. (.not. (z <= 5d+60))) then
tmp = ((b / (c_m * z)) + (9.0d0 * ((x * y) / (c_m * z)))) - (4.0d0 * ((t * a) / c_m))
else
tmp = (b + ((y * (x * 9.0d0)) - (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 <= -1.7e+21) || !(z <= 5e+60)) {
tmp = ((b / (c_m * z)) + (9.0 * ((x * y) / (c_m * z)))) - (4.0 * ((t * a) / c_m));
} else {
tmp = (b + ((y * (x * 9.0)) - (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 <= -1.7e+21) or not (z <= 5e+60): tmp = ((b / (c_m * z)) + (9.0 * ((x * y) / (c_m * z)))) - (4.0 * ((t * a) / c_m)) else: tmp = (b + ((y * (x * 9.0)) - (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 <= -1.7e+21) || !(z <= 5e+60)) tmp = Float64(Float64(Float64(b / Float64(c_m * z)) + Float64(9.0 * Float64(Float64(x * y) / Float64(c_m * z)))) - Float64(4.0 * Float64(Float64(t * a) / c_m))); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - 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 <= -1.7e+21) || ~((z <= 5e+60)))
tmp = ((b / (c_m * z)) + (9.0 * ((x * y) / (c_m * z)))) - (4.0 * ((t * a) / c_m));
else
tmp = (b + ((y * (x * 9.0)) - (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, -1.7e+21], N[Not[LessEqual[z, 5e+60]], $MachinePrecision]], N[(N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(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.7 \cdot 10^{+21} \lor \neg \left(z \leq 5 \cdot 10^{+60}\right):\\
\;\;\;\;\left(\frac{b}{c\_m \cdot z} + 9 \cdot \frac{x \cdot y}{c\_m \cdot z}\right) - 4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -1.7e21 or 4.99999999999999975e60 < z Initial program 64.1%
associate-+l-64.1%
*-commutative64.1%
associate-*r*62.4%
*-commutative62.4%
associate-+l-62.4%
associate-*l*63.2%
associate-*l*70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in x around 0 81.4%
if -1.7e21 < z < 4.99999999999999975e60Initial program 95.0%
Final simplification88.7%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= b -4.1e+189)
(* t (- (/ b (* c_m (* t z))) (/ (* a 4.0) c_m)))
(if (<= b -9e+19)
(/ (+ b (* x (* 9.0 y))) (* c_m z))
(if (<= b 7.5e-33)
(/ (- (* 9.0 (* x y)) (* 4.0 (* z (* t a)))) (* c_m z))
(- (/ 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 <= -4.1e+189) {
tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0) / c_m));
} else if (b <= -9e+19) {
tmp = (b + (x * (9.0 * y))) / (c_m * z);
} else if (b <= 7.5e-33) {
tmp = ((9.0 * (x * y)) - (4.0 * (z * (t * a)))) / (c_m * z);
} else {
tmp = (b / (c_m * z)) - (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 <= (-4.1d+189)) then
tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0d0) / c_m))
else if (b <= (-9d+19)) then
tmp = (b + (x * (9.0d0 * y))) / (c_m * z)
else if (b <= 7.5d-33) then
tmp = ((9.0d0 * (x * y)) - (4.0d0 * (z * (t * a)))) / (c_m * z)
else
tmp = (b / (c_m * z)) - (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 <= -4.1e+189) {
tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0) / c_m));
} else if (b <= -9e+19) {
tmp = (b + (x * (9.0 * y))) / (c_m * z);
} else if (b <= 7.5e-33) {
tmp = ((9.0 * (x * y)) - (4.0 * (z * (t * a)))) / (c_m * z);
} else {
tmp = (b / (c_m * z)) - (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 <= -4.1e+189: tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0) / c_m)) elif b <= -9e+19: tmp = (b + (x * (9.0 * y))) / (c_m * z) elif b <= 7.5e-33: tmp = ((9.0 * (x * y)) - (4.0 * (z * (t * a)))) / (c_m * z) else: tmp = (b / (c_m * z)) - (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 <= -4.1e+189) tmp = Float64(t * Float64(Float64(b / Float64(c_m * Float64(t * z))) - Float64(Float64(a * 4.0) / c_m))); elseif (b <= -9e+19) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(c_m * z)); elseif (b <= 7.5e-33) tmp = Float64(Float64(Float64(9.0 * Float64(x * y)) - Float64(4.0 * Float64(z * Float64(t * a)))) / Float64(c_m * z)); else tmp = Float64(Float64(b / Float64(c_m * z)) - Float64(4.0 * Float64(Float64(t * a) / c_m))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (b <= -4.1e+189)
tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0) / c_m));
elseif (b <= -9e+19)
tmp = (b + (x * (9.0 * y))) / (c_m * z);
elseif (b <= 7.5e-33)
tmp = ((9.0 * (x * y)) - (4.0 * (z * (t * a)))) / (c_m * z);
else
tmp = (b / (c_m * z)) - (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[b, -4.1e+189], N[(t * N[(N[(b / N[(c$95$m * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -9e+19], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e-33], N[(N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(z * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / 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 -4.1 \cdot 10^{+189}:\\
\;\;\;\;t \cdot \left(\frac{b}{c\_m \cdot \left(t \cdot z\right)} - \frac{a \cdot 4}{c\_m}\right)\\
\mathbf{elif}\;b \leq -9 \cdot 10^{+19}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{c\_m \cdot z}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{-33}:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(z \cdot \left(t \cdot a\right)\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c\_m \cdot z} - 4 \cdot \frac{t \cdot a}{c\_m}\\
\end{array}
\end{array}
if b < -4.1000000000000002e189Initial program 71.9%
associate-+l-71.9%
*-commutative71.9%
associate-*r*62.7%
*-commutative62.7%
associate-+l-62.7%
associate-*l*62.7%
associate-*l*67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in x around inf 57.9%
Taylor expanded in x around 0 72.4%
Taylor expanded in t around inf 70.5%
*-commutative70.5%
*-commutative70.5%
associate-*r/70.5%
Simplified70.5%
if -4.1000000000000002e189 < b < -9e19Initial program 90.7%
associate-+l-90.7%
*-commutative90.7%
associate-*r*87.7%
*-commutative87.7%
associate-+l-87.7%
associate-*l*87.7%
associate-*l*90.8%
*-commutative90.8%
Simplified90.8%
Taylor expanded in x around inf 83.5%
associate-*r*83.5%
*-commutative83.5%
associate-*r*83.5%
Simplified83.5%
if -9e19 < b < 7.5000000000000001e-33Initial program 81.1%
associate-+l-81.1%
*-commutative81.1%
associate-*r*81.8%
*-commutative81.8%
associate-+l-81.8%
associate-*l*82.6%
associate-*l*84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in b around 0 77.7%
pow177.7%
Applied egg-rr77.7%
unpow177.7%
*-commutative77.7%
*-commutative77.7%
associate-*l*79.9%
*-commutative79.9%
Simplified79.9%
if 7.5000000000000001e-33 < b Initial program 78.7%
associate-+l-78.7%
*-commutative78.7%
associate-*r*80.0%
*-commutative80.0%
associate-+l-80.0%
associate-*l*80.0%
associate-*l*81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in x around inf 66.6%
Taylor expanded in x around 0 75.2%
Final simplification78.3%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= t -9e+214)
(* t (- (/ b (* c_m (* t z))) (/ (* a 4.0) c_m)))
(if (<= t -6.5e+186)
(/ (- (* 9.0 (* x y)) (* 4.0 (* a (* t z)))) (* c_m z))
(if (or (<= t -2.6e+64) (not (<= t 5.7e-108)))
(/ (- (/ b z) (* 4.0 (* t a))) 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 (t <= -9e+214) {
tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0) / c_m));
} else if (t <= -6.5e+186) {
tmp = ((9.0 * (x * y)) - (4.0 * (a * (t * z)))) / (c_m * z);
} else if ((t <= -2.6e+64) || !(t <= 5.7e-108)) {
tmp = ((b / z) - (4.0 * (t * a))) / 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 (t <= (-9d+214)) then
tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0d0) / c_m))
else if (t <= (-6.5d+186)) then
tmp = ((9.0d0 * (x * y)) - (4.0d0 * (a * (t * z)))) / (c_m * z)
else if ((t <= (-2.6d+64)) .or. (.not. (t <= 5.7d-108))) then
tmp = ((b / z) - (4.0d0 * (t * a))) / 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 (t <= -9e+214) {
tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0) / c_m));
} else if (t <= -6.5e+186) {
tmp = ((9.0 * (x * y)) - (4.0 * (a * (t * z)))) / (c_m * z);
} else if ((t <= -2.6e+64) || !(t <= 5.7e-108)) {
tmp = ((b / z) - (4.0 * (t * a))) / 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 t <= -9e+214: tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0) / c_m)) elif t <= -6.5e+186: tmp = ((9.0 * (x * y)) - (4.0 * (a * (t * z)))) / (c_m * z) elif (t <= -2.6e+64) or not (t <= 5.7e-108): tmp = ((b / z) - (4.0 * (t * a))) / 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 (t <= -9e+214) tmp = Float64(t * Float64(Float64(b / Float64(c_m * Float64(t * z))) - Float64(Float64(a * 4.0) / c_m))); elseif (t <= -6.5e+186) tmp = Float64(Float64(Float64(9.0 * Float64(x * y)) - Float64(4.0 * Float64(a * Float64(t * z)))) / Float64(c_m * z)); elseif ((t <= -2.6e+64) || !(t <= 5.7e-108)) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(t * a))) / 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 (t <= -9e+214)
tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0) / c_m));
elseif (t <= -6.5e+186)
tmp = ((9.0 * (x * y)) - (4.0 * (a * (t * z)))) / (c_m * z);
elseif ((t <= -2.6e+64) || ~((t <= 5.7e-108)))
tmp = ((b / z) - (4.0 * (t * a))) / 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[LessEqual[t, -9e+214], N[(t * N[(N[(b / N[(c$95$m * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.5e+186], N[(N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -2.6e+64], N[Not[LessEqual[t, 5.7e-108]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(t * a), $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}\;t \leq -9 \cdot 10^{+214}:\\
\;\;\;\;t \cdot \left(\frac{b}{c\_m \cdot \left(t \cdot z\right)} - \frac{a \cdot 4}{c\_m}\right)\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{+186}:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c\_m \cdot z}\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{+64} \lor \neg \left(t \leq 5.7 \cdot 10^{-108}\right):\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(t \cdot a\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if t < -8.99999999999999935e214Initial program 73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*83.9%
*-commutative83.9%
associate-+l-83.9%
associate-*l*83.9%
associate-*l*73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in x around inf 45.9%
Taylor expanded in x around 0 61.5%
Taylor expanded in t around inf 72.4%
*-commutative72.4%
*-commutative72.4%
associate-*r/72.4%
Simplified72.4%
if -8.99999999999999935e214 < t < -6.4999999999999997e186Initial program 67.7%
associate-+l-67.7%
*-commutative67.7%
associate-*r*67.7%
*-commutative67.7%
associate-+l-67.7%
associate-*l*67.7%
associate-*l*67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in b around 0 67.7%
if -6.4999999999999997e186 < t < -2.59999999999999997e64 or 5.7e-108 < t Initial program 72.4%
associate-+l-72.4%
*-commutative72.4%
associate-*r*76.6%
*-commutative76.6%
associate-+l-76.6%
associate-*l*76.7%
associate-*l*75.9%
*-commutative75.9%
Simplified75.9%
Taylor expanded in x around inf 62.3%
Taylor expanded in c around 0 77.8%
Taylor expanded in x around 0 69.4%
if -2.59999999999999997e64 < t < 5.7e-108Initial program 90.6%
associate-+l-90.6%
*-commutative90.6%
associate-*r*84.1%
*-commutative84.1%
associate-+l-84.1%
associate-*l*84.9%
associate-*l*91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in x around inf 75.8%
associate-*r*75.0%
*-commutative75.0%
associate-*r*75.9%
Simplified75.9%
Final simplification72.6%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= t -1.02e+215)
(* t (- (/ b (* c_m (* t z))) (/ (* a 4.0) c_m)))
(if (or (<= t -8e+186) (and (not (<= t -1.25e+64)) (<= t 4.2e-107)))
(/ (+ b (* x (* 9.0 y))) (* c_m z))
(/ (- (/ b 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 (t <= -1.02e+215) {
tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0) / c_m));
} else if ((t <= -8e+186) || (!(t <= -1.25e+64) && (t <= 4.2e-107))) {
tmp = (b + (x * (9.0 * y))) / (c_m * z);
} else {
tmp = ((b / z) - (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 (t <= (-1.02d+215)) then
tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0d0) / c_m))
else if ((t <= (-8d+186)) .or. (.not. (t <= (-1.25d+64))) .and. (t <= 4.2d-107)) then
tmp = (b + (x * (9.0d0 * y))) / (c_m * z)
else
tmp = ((b / z) - (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 (t <= -1.02e+215) {
tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0) / c_m));
} else if ((t <= -8e+186) || (!(t <= -1.25e+64) && (t <= 4.2e-107))) {
tmp = (b + (x * (9.0 * y))) / (c_m * z);
} else {
tmp = ((b / z) - (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 t <= -1.02e+215: tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0) / c_m)) elif (t <= -8e+186) or (not (t <= -1.25e+64) and (t <= 4.2e-107)): tmp = (b + (x * (9.0 * y))) / (c_m * z) else: tmp = ((b / z) - (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 (t <= -1.02e+215) tmp = Float64(t * Float64(Float64(b / Float64(c_m * Float64(t * z))) - Float64(Float64(a * 4.0) / c_m))); elseif ((t <= -8e+186) || (!(t <= -1.25e+64) && (t <= 4.2e-107))) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(c_m * z)); else tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(t * a))) / c_m); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (t <= -1.02e+215)
tmp = t * ((b / (c_m * (t * z))) - ((a * 4.0) / c_m));
elseif ((t <= -8e+186) || (~((t <= -1.25e+64)) && (t <= 4.2e-107)))
tmp = (b + (x * (9.0 * y))) / (c_m * z);
else
tmp = ((b / z) - (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[t, -1.02e+215], N[(t * N[(N[(b / N[(c$95$m * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -8e+186], And[N[Not[LessEqual[t, -1.25e+64]], $MachinePrecision], LessEqual[t, 4.2e-107]]], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -1.02 \cdot 10^{+215}:\\
\;\;\;\;t \cdot \left(\frac{b}{c\_m \cdot \left(t \cdot z\right)} - \frac{a \cdot 4}{c\_m}\right)\\
\mathbf{elif}\;t \leq -8 \cdot 10^{+186} \lor \neg \left(t \leq -1.25 \cdot 10^{+64}\right) \land t \leq 4.2 \cdot 10^{-107}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(t \cdot a\right)}{c\_m}\\
\end{array}
\end{array}
if t < -1.0199999999999999e215Initial program 73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*83.9%
*-commutative83.9%
associate-+l-83.9%
associate-*l*83.9%
associate-*l*73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in x around inf 45.9%
Taylor expanded in x around 0 61.5%
Taylor expanded in t around inf 72.4%
*-commutative72.4%
*-commutative72.4%
associate-*r/72.4%
Simplified72.4%
if -1.0199999999999999e215 < t < -7.99999999999999984e186 or -1.25e64 < t < 4.1999999999999998e-107Initial program 90.2%
associate-+l-90.2%
*-commutative90.2%
associate-*r*83.8%
*-commutative83.8%
associate-+l-83.8%
associate-*l*84.6%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in x around inf 75.9%
associate-*r*75.1%
*-commutative75.1%
associate-*r*75.9%
Simplified75.9%
if -7.99999999999999984e186 < t < -1.25e64 or 4.1999999999999998e-107 < t Initial program 72.2%
associate-+l-72.2%
*-commutative72.2%
associate-*r*76.4%
*-commutative76.4%
associate-+l-76.4%
associate-*l*76.5%
associate-*l*75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in x around inf 62.0%
Taylor expanded in c around 0 77.6%
Taylor expanded in x around 0 69.1%
Final simplification72.6%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -1.9e+53) (not (<= z 6.6e+26)))
(/ (- (/ b z) (* 4.0 (* t a))) 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 <= -1.9e+53) || !(z <= 6.6e+26)) {
tmp = ((b / z) - (4.0 * (t * a))) / 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 <= (-1.9d+53)) .or. (.not. (z <= 6.6d+26))) then
tmp = ((b / z) - (4.0d0 * (t * a))) / 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 <= -1.9e+53) || !(z <= 6.6e+26)) {
tmp = ((b / z) - (4.0 * (t * a))) / 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 <= -1.9e+53) or not (z <= 6.6e+26): tmp = ((b / z) - (4.0 * (t * a))) / 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 <= -1.9e+53) || !(z <= 6.6e+26)) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(t * a))) / 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 <= -1.9e+53) || ~((z <= 6.6e+26)))
tmp = ((b / z) - (4.0 * (t * a))) / 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, -1.9e+53], N[Not[LessEqual[z, 6.6e+26]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(t * a), $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 -1.9 \cdot 10^{+53} \lor \neg \left(z \leq 6.6 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(t \cdot a\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -1.89999999999999999e53 or 6.59999999999999987e26 < z Initial program 64.1%
associate-+l-64.1%
*-commutative64.1%
associate-*r*62.4%
*-commutative62.4%
associate-+l-62.4%
associate-*l*63.2%
associate-*l*70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in x around inf 65.8%
Taylor expanded in c around 0 80.8%
Taylor expanded in x around 0 72.9%
if -1.89999999999999999e53 < z < 6.59999999999999987e26Initial program 95.0%
associate-+l-95.0%
*-commutative95.0%
associate-*r*95.7%
*-commutative95.7%
associate-+l-95.7%
associate-*l*95.7%
associate-*l*92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in x around inf 80.5%
associate-*r*80.5%
*-commutative80.5%
associate-*r*80.5%
Simplified80.5%
Final simplification77.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -3e+53)
(- (/ b (* c_m z)) (* 4.0 (/ (* t a) c_m)))
(if (<= z 1.36e+27)
(/ (+ b (* x (* 9.0 y))) (* c_m z))
(/ (- (/ b 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 <= -3e+53) {
tmp = (b / (c_m * z)) - (4.0 * ((t * a) / c_m));
} else if (z <= 1.36e+27) {
tmp = (b + (x * (9.0 * y))) / (c_m * z);
} else {
tmp = ((b / z) - (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 <= (-3d+53)) then
tmp = (b / (c_m * z)) - (4.0d0 * ((t * a) / c_m))
else if (z <= 1.36d+27) then
tmp = (b + (x * (9.0d0 * y))) / (c_m * z)
else
tmp = ((b / z) - (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 <= -3e+53) {
tmp = (b / (c_m * z)) - (4.0 * ((t * a) / c_m));
} else if (z <= 1.36e+27) {
tmp = (b + (x * (9.0 * y))) / (c_m * z);
} else {
tmp = ((b / z) - (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 <= -3e+53: tmp = (b / (c_m * z)) - (4.0 * ((t * a) / c_m)) elif z <= 1.36e+27: tmp = (b + (x * (9.0 * y))) / (c_m * z) else: tmp = ((b / z) - (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 <= -3e+53) tmp = Float64(Float64(b / Float64(c_m * z)) - Float64(4.0 * Float64(Float64(t * a) / c_m))); elseif (z <= 1.36e+27) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / Float64(c_m * z)); else tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(t * a))) / c_m); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (z <= -3e+53)
tmp = (b / (c_m * z)) - (4.0 * ((t * a) / c_m));
elseif (z <= 1.36e+27)
tmp = (b + (x * (9.0 * y))) / (c_m * z);
else
tmp = ((b / z) - (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, -3e+53], N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.36e+27], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+53}:\\
\;\;\;\;\frac{b}{c\_m \cdot z} - 4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{elif}\;z \leq 1.36 \cdot 10^{+27}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(t \cdot a\right)}{c\_m}\\
\end{array}
\end{array}
if z < -2.99999999999999998e53Initial program 60.7%
associate-+l-60.7%
*-commutative60.7%
associate-*r*67.9%
*-commutative67.9%
associate-+l-67.9%
associate-*l*69.7%
associate-*l*73.7%
*-commutative73.7%
Simplified73.7%
Taylor expanded in x around inf 71.9%
Taylor expanded in x around 0 66.6%
if -2.99999999999999998e53 < z < 1.3600000000000001e27Initial program 95.0%
associate-+l-95.0%
*-commutative95.0%
associate-*r*95.7%
*-commutative95.7%
associate-+l-95.7%
associate-*l*95.7%
associate-*l*92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in x around inf 80.5%
associate-*r*80.5%
*-commutative80.5%
associate-*r*80.5%
Simplified80.5%
if 1.3600000000000001e27 < z Initial program 66.8%
associate-+l-66.8%
*-commutative66.8%
associate-*r*57.9%
*-commutative57.9%
associate-+l-57.9%
associate-*l*58.0%
associate-*l*68.4%
*-commutative68.4%
Simplified68.4%
Taylor expanded in x around inf 61.0%
Taylor expanded in c around 0 82.0%
Taylor expanded in x around 0 77.9%
Final simplification77.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -2.4e+138)
(* -4.0 (/ a (/ c_m t)))
(if (<= z 1.96e+27)
(/ (+ b (* x (* 9.0 y))) (* 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 (z <= -2.4e+138) {
tmp = -4.0 * (a / (c_m / t));
} else if (z <= 1.96e+27) {
tmp = (b + (x * (9.0 * y))) / (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 (z <= (-2.4d+138)) then
tmp = (-4.0d0) * (a / (c_m / t))
else if (z <= 1.96d+27) then
tmp = (b + (x * (9.0d0 * y))) / (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 (z <= -2.4e+138) {
tmp = -4.0 * (a / (c_m / t));
} else if (z <= 1.96e+27) {
tmp = (b + (x * (9.0 * y))) / (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 z <= -2.4e+138: tmp = -4.0 * (a / (c_m / t)) elif z <= 1.96e+27: tmp = (b + (x * (9.0 * y))) / (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 (z <= -2.4e+138) tmp = Float64(-4.0 * Float64(a / Float64(c_m / t))); elseif (z <= 1.96e+27) tmp = Float64(Float64(b + Float64(x * Float64(9.0 * y))) / 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 (z <= -2.4e+138)
tmp = -4.0 * (a / (c_m / t));
elseif (z <= 1.96e+27)
tmp = (b + (x * (9.0 * y))) / (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[LessEqual[z, -2.4e+138], N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.96e+27], N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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}\;z \leq -2.4 \cdot 10^{+138}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c\_m}{t}}\\
\mathbf{elif}\;z \leq 1.96 \cdot 10^{+27}:\\
\;\;\;\;\frac{b + x \cdot \left(9 \cdot y\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if z < -2.4000000000000001e138Initial program 44.3%
associate-+l-44.3%
*-commutative44.3%
associate-*r*59.0%
*-commutative59.0%
associate-+l-59.0%
associate-*l*59.0%
associate-*l*59.2%
*-commutative59.2%
Simplified59.2%
Taylor expanded in z around inf 55.9%
div-inv55.9%
Applied egg-rr55.9%
associate-*l*48.1%
div-inv48.1%
clear-num48.1%
un-div-inv48.2%
Applied egg-rr48.2%
if -2.4000000000000001e138 < z < 1.95999999999999989e27Initial program 92.2%
associate-+l-92.2%
*-commutative92.2%
associate-*r*92.7%
*-commutative92.7%
associate-+l-92.7%
associate-*l*93.3%
associate-*l*92.2%
*-commutative92.2%
Simplified92.2%
Taylor expanded in x around inf 76.3%
associate-*r*75.7%
*-commutative75.7%
associate-*r*76.3%
Simplified76.3%
if 1.95999999999999989e27 < z Initial program 66.8%
associate-+l-66.8%
*-commutative66.8%
associate-*r*57.9%
*-commutative57.9%
associate-+l-57.9%
associate-*l*58.0%
associate-*l*68.4%
*-commutative68.4%
Simplified68.4%
Taylor expanded in x around inf 61.0%
Taylor expanded in c around 0 82.0%
Taylor expanded in x around 0 77.9%
Taylor expanded in b around 0 62.8%
*-commutative62.8%
associate-/l*61.8%
Simplified61.8%
Final simplification69.8%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -7.4e-62) (not (<= z 5.2e-28)))
(* -4.0 (* t (/ a c_m)))
(/ b (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -7.4e-62) || !(z <= 5.2e-28)) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = b / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((z <= (-7.4d-62)) .or. (.not. (z <= 5.2d-28))) then
tmp = (-4.0d0) * (t * (a / c_m))
else
tmp = b / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -7.4e-62) || !(z <= 5.2e-28)) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = b / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -7.4e-62) or not (z <= 5.2e-28): tmp = -4.0 * (t * (a / c_m)) else: tmp = b / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -7.4e-62) || !(z <= 5.2e-28)) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); else tmp = Float64(b / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -7.4e-62) || ~((z <= 5.2e-28)))
tmp = -4.0 * (t * (a / c_m));
else
tmp = b / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -7.4e-62], N[Not[LessEqual[z, 5.2e-28]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{-62} \lor \neg \left(z \leq 5.2 \cdot 10^{-28}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -7.3999999999999996e-62 or 5.2e-28 < z Initial program 69.8%
associate-+l-69.8%
*-commutative69.8%
associate-*r*69.2%
*-commutative69.2%
associate-+l-69.2%
associate-*l*69.9%
associate-*l*75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in x around inf 66.7%
Taylor expanded in c around 0 83.4%
Taylor expanded in x around 0 68.2%
Taylor expanded in b around 0 51.4%
*-commutative51.4%
associate-/l*52.8%
Simplified52.8%
if -7.3999999999999996e-62 < z < 5.2e-28Initial program 97.2%
associate-+l-97.2%
*-commutative97.2%
associate-*r*97.2%
*-commutative97.2%
associate-+l-97.2%
associate-*l*97.2%
associate-*l*93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in b around inf 53.0%
*-commutative53.0%
Simplified53.0%
Final simplification52.9%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -1.85e-62)
(* -4.0 (* a (/ t c_m)))
(if (<= z 3.9e-29) (/ 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 (z <= -1.85e-62) {
tmp = -4.0 * (a * (t / c_m));
} else if (z <= 3.9e-29) {
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 (z <= (-1.85d-62)) then
tmp = (-4.0d0) * (a * (t / c_m))
else if (z <= 3.9d-29) 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 (z <= -1.85e-62) {
tmp = -4.0 * (a * (t / c_m));
} else if (z <= 3.9e-29) {
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 z <= -1.85e-62: tmp = -4.0 * (a * (t / c_m)) elif z <= 3.9e-29: 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 (z <= -1.85e-62) tmp = Float64(-4.0 * Float64(a * Float64(t / c_m))); elseif (z <= 3.9e-29) 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 (z <= -1.85e-62)
tmp = -4.0 * (a * (t / c_m));
elseif (z <= 3.9e-29)
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[LessEqual[z, -1.85e-62], N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.9e-29], 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}\;z \leq -1.85 \cdot 10^{-62}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-29}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if z < -1.8499999999999999e-62Initial program 73.0%
associate-+l-73.0%
*-commutative73.0%
associate-*r*77.8%
*-commutative77.8%
associate-+l-77.8%
associate-*l*79.0%
associate-*l*81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in z around inf 44.6%
*-commutative44.6%
associate-/l*41.7%
Simplified41.7%
if -1.8499999999999999e-62 < z < 3.8999999999999998e-29Initial program 97.1%
associate-+l-97.1%
*-commutative97.1%
associate-*r*97.1%
*-commutative97.1%
associate-+l-97.1%
associate-*l*97.1%
associate-*l*93.3%
*-commutative93.3%
Simplified93.3%
Taylor expanded in b around inf 53.5%
*-commutative53.5%
Simplified53.5%
if 3.8999999999999998e-29 < z Initial program 66.8%
associate-+l-66.8%
*-commutative66.8%
associate-*r*60.4%
*-commutative60.4%
associate-+l-60.4%
associate-*l*60.5%
associate-*l*69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in x around inf 61.8%
Taylor expanded in c around 0 82.9%
Taylor expanded in x around 0 74.1%
Taylor expanded in b around 0 59.4%
*-commutative59.4%
associate-/l*59.9%
Simplified59.9%
Final simplification51.6%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -1.65e-63)
(* -4.0 (/ a (/ c_m t)))
(if (<= z 1.7e-28) (/ 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 (z <= -1.65e-63) {
tmp = -4.0 * (a / (c_m / t));
} else if (z <= 1.7e-28) {
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 (z <= (-1.65d-63)) then
tmp = (-4.0d0) * (a / (c_m / t))
else if (z <= 1.7d-28) 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 (z <= -1.65e-63) {
tmp = -4.0 * (a / (c_m / t));
} else if (z <= 1.7e-28) {
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 z <= -1.65e-63: tmp = -4.0 * (a / (c_m / t)) elif z <= 1.7e-28: 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 (z <= -1.65e-63) tmp = Float64(-4.0 * Float64(a / Float64(c_m / t))); elseif (z <= 1.7e-28) 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 (z <= -1.65e-63)
tmp = -4.0 * (a / (c_m / t));
elseif (z <= 1.7e-28)
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[LessEqual[z, -1.65e-63], N[(-4.0 * N[(a / N[(c$95$m / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e-28], 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}\;z \leq -1.65 \cdot 10^{-63}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c\_m}{t}}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-28}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if z < -1.64999999999999997e-63Initial program 73.0%
associate-+l-73.0%
*-commutative73.0%
associate-*r*77.8%
*-commutative77.8%
associate-+l-77.8%
associate-*l*79.0%
associate-*l*81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in z around inf 44.6%
div-inv44.6%
Applied egg-rr44.6%
associate-*l*41.6%
div-inv41.7%
clear-num40.9%
un-div-inv40.9%
Applied egg-rr40.9%
if -1.64999999999999997e-63 < z < 1.7e-28Initial program 97.1%
associate-+l-97.1%
*-commutative97.1%
associate-*r*97.1%
*-commutative97.1%
associate-+l-97.1%
associate-*l*97.1%
associate-*l*93.3%
*-commutative93.3%
Simplified93.3%
Taylor expanded in b around inf 53.5%
*-commutative53.5%
Simplified53.5%
if 1.7e-28 < z Initial program 66.8%
associate-+l-66.8%
*-commutative66.8%
associate-*r*60.4%
*-commutative60.4%
associate-+l-60.4%
associate-*l*60.5%
associate-*l*69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in x around inf 61.8%
Taylor expanded in c around 0 82.9%
Taylor expanded in x around 0 74.1%
Taylor expanded in b around 0 59.4%
*-commutative59.4%
associate-/l*59.9%
Simplified59.9%
Final simplification51.4%
c\_m = (fabs.f64 c) c\_s = (copysign.f64 #s(literal 1 binary64) c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* 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.8%
associate-+l-80.8%
*-commutative80.8%
associate-*r*80.5%
*-commutative80.5%
associate-+l-80.5%
associate-*l*80.9%
associate-*l*82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in b around inf 35.6%
*-commutative35.6%
Simplified35.6%
Final simplification35.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024100
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))