
(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.
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 (/ (+ (- (* y (* x 9.0)) (* (* (* z 4.0) t) a)) b) (* z c_m))))
(*
c_s
(if (<= t_1 -2e-258)
t_1
(if (<= t_1 0.0)
(/
(+
(* -4.0 (* (/ a c_m) (* z t)))
(+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)))
z)
(if (<= t_1 INFINITY)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* z c_m))
(*
x
(-
(+ (* 9.0 (/ y (* z c_m))) (/ b (* c_m (* x z))))
(* 4.0 (/ (* t a) (* x 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);
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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -2e-258) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a / c_m) * (z * t))) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
} else {
tmp = x * (((9.0 * (y / (z * c_m))) + (b / (c_m * (x * z)))) - (4.0 * ((t * a) / (x * 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;
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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -2e-258) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a / c_m) * (z * t))) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
} else {
tmp = x * (((9.0 * (y / (z * c_m))) + (b / (c_m * (x * z)))) - (4.0 * ((t * a) / (x * 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]) [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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m) tmp = 0 if t_1 <= -2e-258: tmp = t_1 elif t_1 <= 0.0: tmp = ((-4.0 * ((a / c_m) * (z * t))) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z elif t_1 <= math.inf: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m) else: tmp = x * (((9.0 * (y / (z * c_m))) + (b / (c_m * (x * z)))) - (4.0 * ((t * a) / (x * 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]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(Float64(Float64(y * Float64(x * 9.0)) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m)) tmp = 0.0 if (t_1 <= -2e-258) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a / c_m) * Float64(z * t))) + Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m))) / z); elseif (t_1 <= Inf) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c_m)); else tmp = Float64(x * Float64(Float64(Float64(9.0 * Float64(y / Float64(z * c_m))) + Float64(b / Float64(c_m * Float64(x * z)))) - Float64(4.0 * Float64(Float64(t * a) / Float64(x * 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])){:}
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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
tmp = 0.0;
if (t_1 <= -2e-258)
tmp = t_1;
elseif (t_1 <= 0.0)
tmp = ((-4.0 * ((a / c_m) * (z * t))) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
elseif (t_1 <= Inf)
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
else
tmp = x * (((9.0 * (y / (z * c_m))) + (b / (c_m * (x * z)))) - (4.0 * ((t * a) / (x * 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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -2e-258], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a / c$95$m), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(9.0 * N[(y / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c$95$m * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / N[(x * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{\left(y \cdot \left(x \cdot 9\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-258}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \left(\frac{a}{c\_m} \cdot \left(z \cdot t\right)\right) + \left(9 \cdot \frac{x \cdot y}{c\_m} + \frac{b}{c\_m}\right)}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(9 \cdot \frac{y}{z \cdot c\_m} + \frac{b}{c\_m \cdot \left(x \cdot z\right)}\right) - 4 \cdot \frac{t \cdot a}{x \cdot c\_m}\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1.99999999999999991e-258Initial program 88.1%
if -1.99999999999999991e-258 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -0.0Initial program 45.5%
associate-+l-45.5%
*-commutative45.5%
associate-*r*45.5%
*-commutative45.5%
associate-+l-45.5%
associate-*l*45.5%
associate-*l*45.5%
*-commutative45.5%
Simplified45.5%
Taylor expanded in z around 0 95.4%
associate-/l*95.4%
Applied egg-rr95.4%
associate-*r/95.4%
*-commutative95.4%
associate-/l*95.4%
*-commutative95.4%
Simplified95.4%
if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 91.0%
associate-+l-91.0%
*-commutative91.0%
associate-*r*89.3%
*-commutative89.3%
associate-+l-89.3%
associate-*l*89.3%
associate-*l*92.7%
*-commutative92.7%
Simplified92.7%
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*1.4%
*-commutative1.4%
associate-+l-1.4%
associate-*l*1.4%
associate-*l*1.4%
*-commutative1.4%
Simplified1.4%
Taylor expanded in x around inf 71.5%
Final simplification89.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.
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 (/ (+ (- (* y (* x 9.0)) (* (* (* z 4.0) t) a)) b) (* z c_m))))
(*
c_s
(if (<= t_1 -2e-258)
t_1
(if (<= t_1 0.0)
(/
(+
(* -4.0 (* (/ a c_m) (* z t)))
(+ (* 9.0 (/ (* x y) c_m)) (/ b c_m)))
z)
(if (<= t_1 INFINITY)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* z c_m))
(* -4.0 (/ (* t a) c_m))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -2e-258) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a / c_m) * (z * t))) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
} else {
tmp = -4.0 * ((t * a) / 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;
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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -2e-258) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((-4.0 * ((a / c_m) * (z * t))) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
} else {
tmp = -4.0 * ((t * a) / c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m) tmp = 0 if t_1 <= -2e-258: tmp = t_1 elif t_1 <= 0.0: tmp = ((-4.0 * ((a / c_m) * (z * t))) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z elif t_1 <= math.inf: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m) else: tmp = -4.0 * ((t * a) / c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(Float64(Float64(y * Float64(x * 9.0)) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m)) tmp = 0.0 if (t_1 <= -2e-258) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(a / c_m) * Float64(z * t))) + Float64(Float64(9.0 * Float64(Float64(x * y) / c_m)) + Float64(b / c_m))) / z); elseif (t_1 <= Inf) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c_m)); else tmp = Float64(-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])){:}
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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
tmp = 0.0;
if (t_1 <= -2e-258)
tmp = t_1;
elseif (t_1 <= 0.0)
tmp = ((-4.0 * ((a / c_m) * (z * t))) + ((9.0 * ((x * y) / c_m)) + (b / c_m))) / z;
elseif (t_1 <= Inf)
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
else
tmp = -4.0 * ((t * a) / c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -2e-258], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(-4.0 * N[(N[(a / c$95$m), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{\left(y \cdot \left(x \cdot 9\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-258}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{-4 \cdot \left(\frac{a}{c\_m} \cdot \left(z \cdot t\right)\right) + \left(9 \cdot \frac{x \cdot y}{c\_m} + \frac{b}{c\_m}\right)}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1.99999999999999991e-258Initial program 88.1%
if -1.99999999999999991e-258 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -0.0Initial program 45.5%
associate-+l-45.5%
*-commutative45.5%
associate-*r*45.5%
*-commutative45.5%
associate-+l-45.5%
associate-*l*45.5%
associate-*l*45.5%
*-commutative45.5%
Simplified45.5%
Taylor expanded in z around 0 95.4%
associate-/l*95.4%
Applied egg-rr95.4%
associate-*r/95.4%
*-commutative95.4%
associate-/l*95.4%
*-commutative95.4%
Simplified95.4%
if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 91.0%
associate-+l-91.0%
*-commutative91.0%
associate-*r*89.3%
*-commutative89.3%
associate-+l-89.3%
associate-*l*89.3%
associate-*l*92.7%
*-commutative92.7%
Simplified92.7%
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*1.4%
*-commutative1.4%
associate-+l-1.4%
associate-*l*1.4%
associate-*l*1.4%
*-commutative1.4%
Simplified1.4%
Taylor expanded in z around inf 71.6%
*-commutative71.6%
Simplified71.6%
Final simplification89.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.
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 (/ (+ (- (* y (* x 9.0)) (* (* (* z 4.0) t) a)) b) (* z c_m))))
(*
c_s
(if (<= t_1 -2e-258)
t_1
(if (<= t_1 0.0)
(/ (/ (+ b (+ (* -4.0 (* a (* z t))) (* 9.0 (* x y)))) c_m) z)
(if (<= t_1 INFINITY)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* z c_m))
(* -4.0 (/ (* t a) c_m))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -2e-258) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((b + ((-4.0 * (a * (z * t))) + (9.0 * (x * y)))) / c_m) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
} else {
tmp = -4.0 * ((t * a) / 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;
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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -2e-258) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((b + ((-4.0 * (a * (z * t))) + (9.0 * (x * y)))) / c_m) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
} else {
tmp = -4.0 * ((t * a) / c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m) tmp = 0 if t_1 <= -2e-258: tmp = t_1 elif t_1 <= 0.0: tmp = ((b + ((-4.0 * (a * (z * t))) + (9.0 * (x * y)))) / c_m) / z elif t_1 <= math.inf: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m) else: tmp = -4.0 * ((t * a) / c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(Float64(Float64(y * Float64(x * 9.0)) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m)) tmp = 0.0 if (t_1 <= -2e-258) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(b + Float64(Float64(-4.0 * Float64(a * Float64(z * t))) + Float64(9.0 * Float64(x * y)))) / c_m) / z); elseif (t_1 <= Inf) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c_m)); else tmp = Float64(-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])){:}
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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
tmp = 0.0;
if (t_1 <= -2e-258)
tmp = t_1;
elseif (t_1 <= 0.0)
tmp = ((b + ((-4.0 * (a * (z * t))) + (9.0 * (x * y)))) / c_m) / z;
elseif (t_1 <= Inf)
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
else
tmp = -4.0 * ((t * a) / c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -2e-258], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(b + N[(N[(-4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{\left(y \cdot \left(x \cdot 9\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-258}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\frac{b + \left(-4 \cdot \left(a \cdot \left(z \cdot t\right)\right) + 9 \cdot \left(x \cdot y\right)\right)}{c\_m}}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1.99999999999999991e-258Initial program 88.1%
if -1.99999999999999991e-258 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -0.0Initial program 45.5%
associate-+l-45.5%
*-commutative45.5%
associate-*r*45.5%
*-commutative45.5%
associate-+l-45.5%
associate-*l*45.5%
associate-*l*45.5%
*-commutative45.5%
Simplified45.5%
Taylor expanded in z around 0 95.4%
associate-/l*95.4%
Applied egg-rr95.4%
associate-*r/95.4%
*-commutative95.4%
associate-/l*95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in c around 0 95.3%
if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 91.0%
associate-+l-91.0%
*-commutative91.0%
associate-*r*89.3%
*-commutative89.3%
associate-+l-89.3%
associate-*l*89.3%
associate-*l*92.7%
*-commutative92.7%
Simplified92.7%
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*1.4%
*-commutative1.4%
associate-+l-1.4%
associate-*l*1.4%
associate-*l*1.4%
*-commutative1.4%
Simplified1.4%
Taylor expanded in z around inf 71.6%
*-commutative71.6%
Simplified71.6%
Final simplification89.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.
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 (/ (+ (- (* y (* x 9.0)) (* (* (* z 4.0) t) a)) b) (* z c_m))))
(*
c_s
(if (<= t_1 -4e-318)
t_1
(if (<= t_1 0.0)
(/ (* y (+ (* 9.0 (/ x c_m)) (/ b (* y c_m)))) z)
(if (<= t_1 INFINITY)
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* z c_m))
(* -4.0 (/ (* t a) c_m))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -4e-318) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (y * ((9.0 * (x / c_m)) + (b / (y * c_m)))) / z;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
} else {
tmp = -4.0 * ((t * a) / 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;
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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
double tmp;
if (t_1 <= -4e-318) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (y * ((9.0 * (x / c_m)) + (b / (y * c_m)))) / z;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
} else {
tmp = -4.0 * ((t * a) / c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m) tmp = 0 if t_1 <= -4e-318: tmp = t_1 elif t_1 <= 0.0: tmp = (y * ((9.0 * (x / c_m)) + (b / (y * c_m)))) / z elif t_1 <= math.inf: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m) else: tmp = -4.0 * ((t * a) / c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(Float64(Float64(y * Float64(x * 9.0)) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m)) tmp = 0.0 if (t_1 <= -4e-318) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(y * Float64(Float64(9.0 * Float64(x / c_m)) + Float64(b / Float64(y * c_m)))) / z); elseif (t_1 <= Inf) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c_m)); else tmp = Float64(-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])){:}
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 = (((y * (x * 9.0)) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
tmp = 0.0;
if (t_1 <= -4e-318)
tmp = t_1;
elseif (t_1 <= 0.0)
tmp = (y * ((9.0 * (x / c_m)) + (b / (y * c_m)))) / z;
elseif (t_1 <= Inf)
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
else
tmp = -4.0 * ((t * a) / c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -4e-318], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(y * N[(N[(9.0 * N[(x / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(b / N[(y * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{\left(y \cdot \left(x \cdot 9\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-318}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot \frac{x}{c\_m} + \frac{b}{y \cdot c\_m}\right)}{z}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{t \cdot a}{c\_m}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -3.9999999e-318Initial program 88.4%
if -3.9999999e-318 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -0.0Initial program 35.3%
associate-+l-35.3%
*-commutative35.3%
associate-*r*35.3%
*-commutative35.3%
associate-+l-35.3%
associate-*l*35.3%
associate-*l*35.3%
*-commutative35.3%
Simplified35.3%
Taylor expanded in y around inf 70.3%
Taylor expanded in z around 0 88.0%
if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 91.0%
associate-+l-91.0%
*-commutative91.0%
associate-*r*89.3%
*-commutative89.3%
associate-+l-89.3%
associate-*l*89.3%
associate-*l*92.7%
*-commutative92.7%
Simplified92.7%
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*1.4%
*-commutative1.4%
associate-+l-1.4%
associate-*l*1.4%
associate-*l*1.4%
*-commutative1.4%
Simplified1.4%
Taylor expanded in z around inf 71.6%
*-commutative71.6%
Simplified71.6%
Final simplification89.1%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 -2.1e+172) (not (<= z 1.45e+134)))
(- (/ b (* z c_m)) (* 4.0 (/ (* t a) c_m)))
(/ (+ b (- (* x (* 9.0 y)) (* a (* z (* 4.0 t))))) (* z c_m)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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.1e+172) || !(z <= 1.45e+134)) {
tmp = (b / (z * c_m)) - (4.0 * ((t * a) / c_m));
} else {
tmp = (b + ((x * (9.0 * y)) - (a * (z * (4.0 * t))))) / (z * c_m);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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.1d+172)) .or. (.not. (z <= 1.45d+134))) then
tmp = (b / (z * c_m)) - (4.0d0 * ((t * a) / c_m))
else
tmp = (b + ((x * (9.0d0 * y)) - (a * (z * (4.0d0 * t))))) / (z * c_m)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
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.1e+172) || !(z <= 1.45e+134)) {
tmp = (b / (z * c_m)) - (4.0 * ((t * a) / c_m));
} else {
tmp = (b + ((x * (9.0 * y)) - (a * (z * (4.0 * t))))) / (z * c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [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.1e+172) or not (z <= 1.45e+134): tmp = (b / (z * c_m)) - (4.0 * ((t * a) / c_m)) else: tmp = (b + ((x * (9.0 * y)) - (a * (z * (4.0 * t))))) / (z * c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) 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.1e+172) || !(z <= 1.45e+134)) tmp = Float64(Float64(b / Float64(z * c_m)) - Float64(4.0 * Float64(Float64(t * a) / c_m))); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(a * Float64(z * Float64(4.0 * t))))) / Float64(z * c_m)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
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.1e+172) || ~((z <= 1.45e+134)))
tmp = (b / (z * c_m)) - (4.0 * ((t * a) / c_m));
else
tmp = (b + ((x * (9.0 * y)) - (a * (z * (4.0 * t))))) / (z * c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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, -2.1e+172], N[Not[LessEqual[z, 1.45e+134]], $MachinePrecision]], N[(N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(z * N[(4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[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.1 \cdot 10^{+172} \lor \neg \left(z \leq 1.45 \cdot 10^{+134}\right):\\
\;\;\;\;\frac{b}{z \cdot c\_m} - 4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - a \cdot \left(z \cdot \left(4 \cdot t\right)\right)\right)}{z \cdot c\_m}\\
\end{array}
\end{array}
if z < -2.1000000000000001e172 or 1.45000000000000006e134 < z Initial program 46.4%
associate-+l-46.4%
*-commutative46.4%
associate-*r*49.7%
*-commutative49.7%
associate-+l-49.7%
associate-*l*49.7%
associate-*l*56.9%
*-commutative56.9%
Simplified56.9%
Taylor expanded in y around inf 70.8%
Taylor expanded in y around 0 73.3%
if -2.1000000000000001e172 < z < 1.45000000000000006e134Initial program 91.9%
associate-+l-91.9%
*-commutative91.9%
associate-*r*91.3%
*-commutative91.3%
associate-+l-91.3%
associate-*l*91.3%
associate-*l*91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in z around 0 91.9%
*-commutative91.9%
associate-*r*91.9%
*-commutative91.9%
associate-*r*91.9%
*-commutative91.9%
Simplified91.9%
Final simplification87.2%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 -2.45e-34)
(/ (/ b c_m) z)
(if (<= b 1.56e-229)
(* a (/ (* t -4.0) c_m))
(if (<= b 4.6e+142)
(/ (* x (/ (* 9.0 y) z)) c_m)
(/ 1.0 (* z (/ c_m b))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -2.45e-34) {
tmp = (b / c_m) / z;
} else if (b <= 1.56e-229) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 4.6e+142) {
tmp = (x * ((9.0 * y) / z)) / c_m;
} else {
tmp = 1.0 / (z * (c_m / b));
}
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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (b <= (-2.45d-34)) then
tmp = (b / c_m) / z
else if (b <= 1.56d-229) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (b <= 4.6d+142) then
tmp = (x * ((9.0d0 * y) / z)) / c_m
else
tmp = 1.0d0 / (z * (c_m / b))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -2.45e-34) {
tmp = (b / c_m) / z;
} else if (b <= 1.56e-229) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 4.6e+142) {
tmp = (x * ((9.0 * y) / z)) / c_m;
} else {
tmp = 1.0 / (z * (c_m / b));
}
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]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if b <= -2.45e-34: tmp = (b / c_m) / z elif b <= 1.56e-229: tmp = a * ((t * -4.0) / c_m) elif b <= 4.6e+142: tmp = (x * ((9.0 * y) / z)) / c_m else: tmp = 1.0 / (z * (c_m / b)) 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]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (b <= -2.45e-34) tmp = Float64(Float64(b / c_m) / z); elseif (b <= 1.56e-229) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (b <= 4.6e+142) tmp = Float64(Float64(x * Float64(Float64(9.0 * y) / z)) / c_m); else tmp = Float64(1.0 / Float64(z * Float64(c_m / b))); 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])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (b <= -2.45e-34)
tmp = (b / c_m) / z;
elseif (b <= 1.56e-229)
tmp = a * ((t * -4.0) / c_m);
elseif (b <= 4.6e+142)
tmp = (x * ((9.0 * y) / z)) / c_m;
else
tmp = 1.0 / (z * (c_m / b));
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.
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, -2.45e-34], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 1.56e-229], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.6e+142], N[(N[(x * N[(N[(9.0 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(1.0 / N[(z * N[(c$95$m / b), $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])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -2.45 \cdot 10^{-34}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;b \leq 1.56 \cdot 10^{-229}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;b \leq 4.6 \cdot 10^{+142}:\\
\;\;\;\;\frac{x \cdot \frac{9 \cdot y}{z}}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c\_m}{b}}\\
\end{array}
\end{array}
if b < -2.44999999999999981e-34Initial program 82.9%
associate-+l-82.9%
*-commutative82.9%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in b around inf 61.8%
associate-/r*64.7%
Simplified64.7%
if -2.44999999999999981e-34 < b < 1.5600000000000001e-229Initial program 79.1%
associate-+l-79.1%
*-commutative79.1%
associate-*r*81.8%
*-commutative81.8%
associate-+l-81.8%
associate-*l*81.8%
associate-*l*79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in z around inf 55.4%
*-commutative55.4%
associate-/l*57.9%
associate-*r*57.9%
associate-*l/57.9%
Simplified57.9%
if 1.5600000000000001e-229 < b < 4.60000000000000004e142Initial program 84.4%
associate-+l-84.4%
*-commutative84.4%
associate-*r*77.5%
*-commutative77.5%
associate-+l-77.5%
associate-*l*77.5%
associate-*l*85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in z around 0 84.4%
*-commutative84.4%
associate-*r*84.4%
*-commutative84.4%
associate-*r*84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in x around inf 50.3%
associate-*r/50.3%
*-commutative50.3%
associate-/r*51.6%
associate-*r/51.8%
*-commutative51.8%
associate-/l*53.0%
associate-*l*52.9%
Simplified52.9%
associate-*l/53.0%
Applied egg-rr53.0%
if 4.60000000000000004e142 < b Initial program 73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
associate-*l*77.3%
associate-*l*75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in b around inf 58.0%
*-commutative58.0%
Simplified58.0%
clear-num58.0%
inv-pow58.0%
Applied egg-rr58.0%
unpow-158.0%
associate-/l*61.5%
Simplified61.5%
Final simplification58.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.
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 -2.45e-34)
(/ (/ b c_m) z)
(if (<= b 3.5e-229)
(* a (/ (* t -4.0) c_m))
(if (<= b 5.4e+142)
(/ (* x (* 9.0 (/ y z))) c_m)
(/ 1.0 (* z (/ c_m b))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -2.45e-34) {
tmp = (b / c_m) / z;
} else if (b <= 3.5e-229) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 5.4e+142) {
tmp = (x * (9.0 * (y / z))) / c_m;
} else {
tmp = 1.0 / (z * (c_m / b));
}
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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (b <= (-2.45d-34)) then
tmp = (b / c_m) / z
else if (b <= 3.5d-229) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (b <= 5.4d+142) then
tmp = (x * (9.0d0 * (y / z))) / c_m
else
tmp = 1.0d0 / (z * (c_m / b))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -2.45e-34) {
tmp = (b / c_m) / z;
} else if (b <= 3.5e-229) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 5.4e+142) {
tmp = (x * (9.0 * (y / z))) / c_m;
} else {
tmp = 1.0 / (z * (c_m / b));
}
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]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if b <= -2.45e-34: tmp = (b / c_m) / z elif b <= 3.5e-229: tmp = a * ((t * -4.0) / c_m) elif b <= 5.4e+142: tmp = (x * (9.0 * (y / z))) / c_m else: tmp = 1.0 / (z * (c_m / b)) 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]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (b <= -2.45e-34) tmp = Float64(Float64(b / c_m) / z); elseif (b <= 3.5e-229) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (b <= 5.4e+142) tmp = Float64(Float64(x * Float64(9.0 * Float64(y / z))) / c_m); else tmp = Float64(1.0 / Float64(z * Float64(c_m / b))); 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])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (b <= -2.45e-34)
tmp = (b / c_m) / z;
elseif (b <= 3.5e-229)
tmp = a * ((t * -4.0) / c_m);
elseif (b <= 5.4e+142)
tmp = (x * (9.0 * (y / z))) / c_m;
else
tmp = 1.0 / (z * (c_m / b));
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.
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, -2.45e-34], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 3.5e-229], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.4e+142], N[(N[(x * N[(9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(1.0 / N[(z * N[(c$95$m / b), $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])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -2.45 \cdot 10^{-34}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;b \leq 3.5 \cdot 10^{-229}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;b \leq 5.4 \cdot 10^{+142}:\\
\;\;\;\;\frac{x \cdot \left(9 \cdot \frac{y}{z}\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c\_m}{b}}\\
\end{array}
\end{array}
if b < -2.44999999999999981e-34Initial program 82.9%
associate-+l-82.9%
*-commutative82.9%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in b around inf 61.8%
associate-/r*64.7%
Simplified64.7%
if -2.44999999999999981e-34 < b < 3.5000000000000003e-229Initial program 79.1%
associate-+l-79.1%
*-commutative79.1%
associate-*r*81.8%
*-commutative81.8%
associate-+l-81.8%
associate-*l*81.8%
associate-*l*79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in z around inf 55.4%
*-commutative55.4%
associate-/l*57.9%
associate-*r*57.9%
associate-*l/57.9%
Simplified57.9%
if 3.5000000000000003e-229 < b < 5.39999999999999965e142Initial program 84.4%
associate-+l-84.4%
*-commutative84.4%
associate-*r*77.5%
*-commutative77.5%
associate-+l-77.5%
associate-*l*77.5%
associate-*l*85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in z around 0 84.4%
*-commutative84.4%
associate-*r*84.4%
*-commutative84.4%
associate-*r*84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in x around inf 50.3%
associate-*r/50.3%
*-commutative50.3%
associate-/r*51.6%
associate-*r/51.8%
*-commutative51.8%
associate-/l*53.0%
associate-*l*52.9%
Simplified52.9%
if 5.39999999999999965e142 < b Initial program 73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
associate-*l*77.3%
associate-*l*75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in b around inf 58.0%
*-commutative58.0%
Simplified58.0%
clear-num58.0%
inv-pow58.0%
Applied egg-rr58.0%
unpow-158.0%
associate-/l*61.5%
Simplified61.5%
Final simplification58.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.
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 -2.15e-35)
(/ (/ b c_m) z)
(if (<= b 9e-227)
(* a (/ (* t -4.0) c_m))
(if (<= b 9.2e+142)
(* y (/ 9.0 (* c_m (/ z x))))
(/ 1.0 (* z (/ c_m b))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -2.15e-35) {
tmp = (b / c_m) / z;
} else if (b <= 9e-227) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 9.2e+142) {
tmp = y * (9.0 / (c_m * (z / x)));
} else {
tmp = 1.0 / (z * (c_m / b));
}
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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (b <= (-2.15d-35)) then
tmp = (b / c_m) / z
else if (b <= 9d-227) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (b <= 9.2d+142) then
tmp = y * (9.0d0 / (c_m * (z / x)))
else
tmp = 1.0d0 / (z * (c_m / b))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -2.15e-35) {
tmp = (b / c_m) / z;
} else if (b <= 9e-227) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 9.2e+142) {
tmp = y * (9.0 / (c_m * (z / x)));
} else {
tmp = 1.0 / (z * (c_m / b));
}
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]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if b <= -2.15e-35: tmp = (b / c_m) / z elif b <= 9e-227: tmp = a * ((t * -4.0) / c_m) elif b <= 9.2e+142: tmp = y * (9.0 / (c_m * (z / x))) else: tmp = 1.0 / (z * (c_m / b)) 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]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (b <= -2.15e-35) tmp = Float64(Float64(b / c_m) / z); elseif (b <= 9e-227) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (b <= 9.2e+142) tmp = Float64(y * Float64(9.0 / Float64(c_m * Float64(z / x)))); else tmp = Float64(1.0 / Float64(z * Float64(c_m / b))); 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])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (b <= -2.15e-35)
tmp = (b / c_m) / z;
elseif (b <= 9e-227)
tmp = a * ((t * -4.0) / c_m);
elseif (b <= 9.2e+142)
tmp = y * (9.0 / (c_m * (z / x)));
else
tmp = 1.0 / (z * (c_m / b));
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.
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, -2.15e-35], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 9e-227], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.2e+142], N[(y * N[(9.0 / N[(c$95$m * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(z * N[(c$95$m / b), $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])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -2.15 \cdot 10^{-35}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-227}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;b \leq 9.2 \cdot 10^{+142}:\\
\;\;\;\;y \cdot \frac{9}{c\_m \cdot \frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c\_m}{b}}\\
\end{array}
\end{array}
if b < -2.1500000000000001e-35Initial program 82.9%
associate-+l-82.9%
*-commutative82.9%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in b around inf 61.8%
associate-/r*64.7%
Simplified64.7%
if -2.1500000000000001e-35 < b < 8.99999999999999986e-227Initial program 79.1%
associate-+l-79.1%
*-commutative79.1%
associate-*r*81.8%
*-commutative81.8%
associate-+l-81.8%
associate-*l*81.8%
associate-*l*79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in z around inf 55.4%
*-commutative55.4%
associate-/l*57.9%
associate-*r*57.9%
associate-*l/57.9%
Simplified57.9%
if 8.99999999999999986e-227 < b < 9.20000000000000009e142Initial program 84.4%
associate-+l-84.4%
*-commutative84.4%
associate-*r*77.5%
*-commutative77.5%
associate-+l-77.5%
associate-*l*77.5%
associate-*l*85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in x around inf 50.3%
associate-/l*49.0%
*-commutative49.0%
Applied egg-rr49.0%
associate-*r/50.3%
times-frac52.9%
Simplified52.9%
clear-num52.9%
inv-pow52.9%
clear-num52.9%
inv-pow52.9%
unpow-prod-down53.2%
inv-pow53.2%
un-div-inv53.3%
Applied egg-rr53.3%
associate-*r/50.5%
associate-*l/49.0%
*-commutative49.0%
associate-/r/49.0%
associate-*r/50.4%
Simplified50.4%
if 9.20000000000000009e142 < b Initial program 73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
associate-*l*77.3%
associate-*l*75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in b around inf 58.0%
*-commutative58.0%
Simplified58.0%
clear-num58.0%
inv-pow58.0%
Applied egg-rr58.0%
unpow-158.0%
associate-/l*61.5%
Simplified61.5%
Final simplification58.2%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 -1.12e-34)
(/ (/ b c_m) z)
(if (<= b 9.8e-222)
(* a (/ (* t -4.0) c_m))
(if (<= b 4.5e+142)
(* 9.0 (* (/ x z) (/ y c_m)))
(/ 1.0 (* z (/ c_m b))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 <= -1.12e-34) {
tmp = (b / c_m) / z;
} else if (b <= 9.8e-222) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 4.5e+142) {
tmp = 9.0 * ((x / z) * (y / c_m));
} else {
tmp = 1.0 / (z * (c_m / b));
}
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.
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 <= (-1.12d-34)) then
tmp = (b / c_m) / z
else if (b <= 9.8d-222) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (b <= 4.5d+142) then
tmp = 9.0d0 * ((x / z) * (y / c_m))
else
tmp = 1.0d0 / (z * (c_m / b))
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;
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 <= -1.12e-34) {
tmp = (b / c_m) / z;
} else if (b <= 9.8e-222) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 4.5e+142) {
tmp = 9.0 * ((x / z) * (y / c_m));
} else {
tmp = 1.0 / (z * (c_m / b));
}
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]) [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 <= -1.12e-34: tmp = (b / c_m) / z elif b <= 9.8e-222: tmp = a * ((t * -4.0) / c_m) elif b <= 4.5e+142: tmp = 9.0 * ((x / z) * (y / c_m)) else: tmp = 1.0 / (z * (c_m / b)) 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]) 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 <= -1.12e-34) tmp = Float64(Float64(b / c_m) / z); elseif (b <= 9.8e-222) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (b <= 4.5e+142) tmp = Float64(9.0 * Float64(Float64(x / z) * Float64(y / c_m))); else tmp = Float64(1.0 / Float64(z * Float64(c_m / b))); 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])){:}
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 <= -1.12e-34)
tmp = (b / c_m) / z;
elseif (b <= 9.8e-222)
tmp = a * ((t * -4.0) / c_m);
elseif (b <= 4.5e+142)
tmp = 9.0 * ((x / z) * (y / c_m));
else
tmp = 1.0 / (z * (c_m / b));
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.
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, -1.12e-34], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 9.8e-222], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.5e+142], N[(9.0 * N[(N[(x / z), $MachinePrecision] * N[(y / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(z * N[(c$95$m / b), $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])\\\\
[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 -1.12 \cdot 10^{-34}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;b \leq 9.8 \cdot 10^{-222}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+142}:\\
\;\;\;\;9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c\_m}{b}}\\
\end{array}
\end{array}
if b < -1.12e-34Initial program 82.9%
associate-+l-82.9%
*-commutative82.9%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in b around inf 61.8%
associate-/r*64.7%
Simplified64.7%
if -1.12e-34 < b < 9.7999999999999999e-222Initial program 80.2%
associate-+l-80.2%
*-commutative80.2%
associate-*r*82.7%
*-commutative82.7%
associate-+l-82.7%
associate-*l*82.7%
associate-*l*80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in z around inf 55.3%
*-commutative55.3%
associate-/l*58.9%
associate-*r*58.9%
associate-*l/58.9%
Simplified58.9%
if 9.7999999999999999e-222 < b < 4.4999999999999999e142Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*76.2%
*-commutative76.2%
associate-+l-76.2%
associate-*l*76.2%
associate-*l*84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in x around inf 48.8%
associate-/l*47.4%
*-commutative47.4%
Applied egg-rr47.4%
associate-*r/48.8%
times-frac51.5%
Simplified51.5%
if 4.4999999999999999e142 < b Initial program 73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
associate-*l*77.3%
associate-*l*75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in b around inf 58.0%
*-commutative58.0%
Simplified58.0%
clear-num58.0%
inv-pow58.0%
Applied egg-rr58.0%
unpow-158.0%
associate-/l*61.5%
Simplified61.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.
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 -1.15e-35)
(/ (/ b c_m) z)
(if (<= b 2.1e-221)
(* a (/ (* t -4.0) c_m))
(if (<= b 4.5e+142)
(* 9.0 (* x (/ (/ y c_m) z)))
(/ 1.0 (* z (/ c_m b))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 <= -1.15e-35) {
tmp = (b / c_m) / z;
} else if (b <= 2.1e-221) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 4.5e+142) {
tmp = 9.0 * (x * ((y / c_m) / z));
} else {
tmp = 1.0 / (z * (c_m / b));
}
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.
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 <= (-1.15d-35)) then
tmp = (b / c_m) / z
else if (b <= 2.1d-221) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (b <= 4.5d+142) then
tmp = 9.0d0 * (x * ((y / c_m) / z))
else
tmp = 1.0d0 / (z * (c_m / b))
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;
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 <= -1.15e-35) {
tmp = (b / c_m) / z;
} else if (b <= 2.1e-221) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 4.5e+142) {
tmp = 9.0 * (x * ((y / c_m) / z));
} else {
tmp = 1.0 / (z * (c_m / b));
}
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]) [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 <= -1.15e-35: tmp = (b / c_m) / z elif b <= 2.1e-221: tmp = a * ((t * -4.0) / c_m) elif b <= 4.5e+142: tmp = 9.0 * (x * ((y / c_m) / z)) else: tmp = 1.0 / (z * (c_m / b)) 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]) 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 <= -1.15e-35) tmp = Float64(Float64(b / c_m) / z); elseif (b <= 2.1e-221) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (b <= 4.5e+142) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c_m) / z))); else tmp = Float64(1.0 / Float64(z * Float64(c_m / b))); 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])){:}
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 <= -1.15e-35)
tmp = (b / c_m) / z;
elseif (b <= 2.1e-221)
tmp = a * ((t * -4.0) / c_m);
elseif (b <= 4.5e+142)
tmp = 9.0 * (x * ((y / c_m) / z));
else
tmp = 1.0 / (z * (c_m / b));
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.
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, -1.15e-35], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 2.1e-221], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.5e+142], N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(z * N[(c$95$m / b), $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])\\\\
[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 -1.15 \cdot 10^{-35}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{-221}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+142}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c\_m}{b}}\\
\end{array}
\end{array}
if b < -1.1499999999999999e-35Initial program 82.9%
associate-+l-82.9%
*-commutative82.9%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in b around inf 61.8%
associate-/r*64.7%
Simplified64.7%
if -1.1499999999999999e-35 < b < 2.1e-221Initial program 80.2%
associate-+l-80.2%
*-commutative80.2%
associate-*r*82.7%
*-commutative82.7%
associate-+l-82.7%
associate-*l*82.7%
associate-*l*80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in z around inf 55.3%
*-commutative55.3%
associate-/l*58.9%
associate-*r*58.9%
associate-*l/58.9%
Simplified58.9%
if 2.1e-221 < b < 4.4999999999999999e142Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*76.2%
*-commutative76.2%
associate-+l-76.2%
associate-*l*76.2%
associate-*l*84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in x around inf 48.8%
associate-/l*47.4%
associate-/r*51.7%
Simplified51.7%
if 4.4999999999999999e142 < b Initial program 73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
associate-*l*77.3%
associate-*l*75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in b around inf 58.0%
*-commutative58.0%
Simplified58.0%
clear-num58.0%
inv-pow58.0%
Applied egg-rr58.0%
unpow-158.0%
associate-/l*61.5%
Simplified61.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.
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.5e+172)
(- (/ b (* z c_m)) (* 4.0 (/ (* t a) c_m)))
(/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* z c_m)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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.5e+172) {
tmp = (b / (z * c_m)) - (4.0 * ((t * a) / c_m));
} else {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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.5d+172)) then
tmp = (b / (z * c_m)) - (4.0d0 * ((t * a) / c_m))
else
tmp = (b + ((x * (9.0d0 * y)) - ((z * 4.0d0) * (t * a)))) / (z * c_m)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
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.5e+172) {
tmp = (b / (z * c_m)) - (4.0 * ((t * a) / c_m));
} else {
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [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.5e+172: tmp = (b / (z * c_m)) - (4.0 * ((t * a) / c_m)) else: tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) 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.5e+172) tmp = Float64(Float64(b / Float64(z * c_m)) - Float64(4.0 * Float64(Float64(t * a) / c_m))); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c_m)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
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.5e+172)
tmp = (b / (z * c_m)) - (4.0 * ((t * a) / c_m));
else
tmp = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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.5e+172], N[(N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]]), $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])\\\\
[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.5 \cdot 10^{+172}:\\
\;\;\;\;\frac{b}{z \cdot c\_m} - 4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c\_m}\\
\end{array}
\end{array}
if z < -2.5e172Initial program 40.3%
associate-+l-40.3%
*-commutative40.3%
associate-*r*52.9%
*-commutative52.9%
associate-+l-52.9%
associate-*l*52.9%
associate-*l*56.0%
*-commutative56.0%
Simplified56.0%
Taylor expanded in y around inf 74.8%
Taylor expanded in y around 0 84.0%
if -2.5e172 < z Initial program 85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*84.6%
*-commutative84.6%
associate-+l-84.6%
associate-*l*84.6%
associate-*l*86.3%
*-commutative86.3%
Simplified86.3%
Final simplification86.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.
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 (<= x -0.0145) (not (<= x 4.6e-60)))
(/ (+ (* y (* x 9.0)) b) (* z c_m))
(- (/ b (* z c_m)) (* 4.0 (/ (* t a) c_m))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((x <= -0.0145) || !(x <= 4.6e-60)) {
tmp = ((y * (x * 9.0)) + b) / (z * c_m);
} else {
tmp = (b / (z * c_m)) - (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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((x <= (-0.0145d0)) .or. (.not. (x <= 4.6d-60))) then
tmp = ((y * (x * 9.0d0)) + b) / (z * c_m)
else
tmp = (b / (z * c_m)) - (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;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((x <= -0.0145) || !(x <= 4.6e-60)) {
tmp = ((y * (x * 9.0)) + b) / (z * c_m);
} else {
tmp = (b / (z * c_m)) - (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]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (x <= -0.0145) or not (x <= 4.6e-60): tmp = ((y * (x * 9.0)) + b) / (z * c_m) else: tmp = (b / (z * c_m)) - (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]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((x <= -0.0145) || !(x <= 4.6e-60)) tmp = Float64(Float64(Float64(y * Float64(x * 9.0)) + b) / Float64(z * c_m)); else tmp = Float64(Float64(b / Float64(z * c_m)) - 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])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((x <= -0.0145) || ~((x <= 4.6e-60)))
tmp = ((y * (x * 9.0)) + b) / (z * c_m);
else
tmp = (b / (z * c_m)) - (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.
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[x, -0.0145], N[Not[LessEqual[x, 4.6e-60]], $MachinePrecision]], N[(N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(b / N[(z * c$95$m), $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])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -0.0145 \lor \neg \left(x \leq 4.6 \cdot 10^{-60}\right):\\
\;\;\;\;\frac{y \cdot \left(x \cdot 9\right) + b}{z \cdot c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c\_m} - 4 \cdot \frac{t \cdot a}{c\_m}\\
\end{array}
\end{array}
if x < -0.0145000000000000007 or 4.6000000000000003e-60 < x Initial program 74.9%
associate-+l-74.9%
*-commutative74.9%
associate-*r*77.2%
*-commutative77.2%
associate-+l-77.2%
associate-*l*77.2%
associate-*l*77.9%
*-commutative77.9%
Simplified77.9%
Taylor expanded in x around inf 66.7%
associate-*r*66.7%
Simplified66.7%
if -0.0145000000000000007 < x < 4.6000000000000003e-60Initial program 86.0%
associate-+l-86.0%
*-commutative86.0%
associate-*r*84.5%
*-commutative84.5%
associate-+l-84.5%
associate-*l*84.5%
associate-*l*87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in y around inf 66.6%
Taylor expanded in y around 0 86.4%
Final simplification76.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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= x -0.0132)
(/ (+ (* y (* x 9.0)) b) (* z c_m))
(if (<= x 1.2e-58)
(- (/ b (* z c_m)) (* 4.0 (/ (* t a) c_m)))
(/ (* y (/ (+ (* x 9.0) (/ b 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (x <= -0.0132) {
tmp = ((y * (x * 9.0)) + b) / (z * c_m);
} else if (x <= 1.2e-58) {
tmp = (b / (z * c_m)) - (4.0 * ((t * a) / c_m));
} else {
tmp = (y * (((x * 9.0) + (b / 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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (x <= (-0.0132d0)) then
tmp = ((y * (x * 9.0d0)) + b) / (z * c_m)
else if (x <= 1.2d-58) then
tmp = (b / (z * c_m)) - (4.0d0 * ((t * a) / c_m))
else
tmp = (y * (((x * 9.0d0) + (b / 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;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (x <= -0.0132) {
tmp = ((y * (x * 9.0)) + b) / (z * c_m);
} else if (x <= 1.2e-58) {
tmp = (b / (z * c_m)) - (4.0 * ((t * a) / c_m));
} else {
tmp = (y * (((x * 9.0) + (b / 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]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if x <= -0.0132: tmp = ((y * (x * 9.0)) + b) / (z * c_m) elif x <= 1.2e-58: tmp = (b / (z * c_m)) - (4.0 * ((t * a) / c_m)) else: tmp = (y * (((x * 9.0) + (b / 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]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (x <= -0.0132) tmp = Float64(Float64(Float64(y * Float64(x * 9.0)) + b) / Float64(z * c_m)); elseif (x <= 1.2e-58) tmp = Float64(Float64(b / Float64(z * c_m)) - Float64(4.0 * Float64(Float64(t * a) / c_m))); else tmp = Float64(Float64(y * Float64(Float64(Float64(x * 9.0) + Float64(b / y)) / c_m)) / z); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (x <= -0.0132)
tmp = ((y * (x * 9.0)) + b) / (z * c_m);
elseif (x <= 1.2e-58)
tmp = (b / (z * c_m)) - (4.0 * ((t * a) / c_m));
else
tmp = (y * (((x * 9.0) + (b / 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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[x, -0.0132], N[(N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.2e-58], N[(N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(N[(N[(x * 9.0), $MachinePrecision] + N[(b / y), $MachinePrecision]), $MachinePrecision] / c$95$m), $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])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -0.0132:\\
\;\;\;\;\frac{y \cdot \left(x \cdot 9\right) + b}{z \cdot c\_m}\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-58}:\\
\;\;\;\;\frac{b}{z \cdot c\_m} - 4 \cdot \frac{t \cdot a}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \frac{x \cdot 9 + \frac{b}{y}}{c\_m}}{z}\\
\end{array}
\end{array}
if x < -0.0132Initial program 75.7%
associate-+l-75.7%
*-commutative75.7%
associate-*r*79.0%
*-commutative79.0%
associate-+l-79.0%
associate-*l*79.1%
associate-*l*79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in x around inf 69.7%
associate-*r*69.7%
Simplified69.7%
if -0.0132 < x < 1.2e-58Initial program 86.1%
associate-+l-86.1%
*-commutative86.1%
associate-*r*84.6%
*-commutative84.6%
associate-+l-84.6%
associate-*l*84.6%
associate-*l*87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in y around inf 66.1%
Taylor expanded in y around 0 86.5%
if 1.2e-58 < x Initial program 73.8%
associate-+l-73.8%
*-commutative73.8%
associate-*r*75.2%
*-commutative75.2%
associate-+l-75.2%
associate-*l*75.2%
associate-*l*76.6%
*-commutative76.6%
Simplified76.6%
Taylor expanded in y around inf 75.9%
Taylor expanded in z around 0 64.9%
Taylor expanded in c around 0 65.6%
Final simplification76.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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= b -1.45e-37) (not (<= b 3.7e+96)))
(/ (/ 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);
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 <= -1.45e-37) || !(b <= 3.7e+96)) {
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.
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 <= (-1.45d-37)) .or. (.not. (b <= 3.7d+96))) 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;
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 <= -1.45e-37) || !(b <= 3.7e+96)) {
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]) [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 <= -1.45e-37) or not (b <= 3.7e+96): 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]) 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 <= -1.45e-37) || !(b <= 3.7e+96)) tmp = Float64(Float64(b / 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])){:}
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 <= -1.45e-37) || ~((b <= 3.7e+96)))
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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[b, -1.45e-37], N[Not[LessEqual[b, 3.7e+96]], $MachinePrecision]], N[(N[(b / c$95$m), $MachinePrecision] / z), $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])\\\\
[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 -1.45 \cdot 10^{-37} \lor \neg \left(b \leq 3.7 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\end{array}
\end{array}
if b < -1.45000000000000002e-37 or 3.69999999999999991e96 < b Initial program 79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*83.0%
*-commutative83.0%
associate-+l-83.0%
associate-*l*83.0%
associate-*l*83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in b around inf 58.8%
associate-/r*61.2%
Simplified61.2%
if -1.45000000000000002e-37 < b < 3.69999999999999991e96Initial program 80.9%
associate-+l-80.9%
*-commutative80.9%
associate-*r*78.9%
*-commutative78.9%
associate-+l-78.9%
associate-*l*78.9%
associate-*l*81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in z around 0 76.4%
Taylor expanded in a around inf 48.6%
*-commutative48.6%
associate-/l*49.2%
Simplified49.2%
Final simplification54.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.
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 -8.4e-36)
(/ (/ b c_m) z)
(if (<= b 3.8e+110) (* -4.0 (* t (/ a c_m))) (/ 1.0 (* z (/ c_m b)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 <= -8.4e-36) {
tmp = (b / c_m) / z;
} else if (b <= 3.8e+110) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = 1.0 / (z * (c_m / b));
}
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.
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 <= (-8.4d-36)) then
tmp = (b / c_m) / z
else if (b <= 3.8d+110) then
tmp = (-4.0d0) * (t * (a / c_m))
else
tmp = 1.0d0 / (z * (c_m / b))
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;
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 <= -8.4e-36) {
tmp = (b / c_m) / z;
} else if (b <= 3.8e+110) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = 1.0 / (z * (c_m / b));
}
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]) [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 <= -8.4e-36: tmp = (b / c_m) / z elif b <= 3.8e+110: tmp = -4.0 * (t * (a / c_m)) else: tmp = 1.0 / (z * (c_m / b)) 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]) 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 <= -8.4e-36) tmp = Float64(Float64(b / c_m) / z); elseif (b <= 3.8e+110) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); else tmp = Float64(1.0 / Float64(z * Float64(c_m / b))); 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])){:}
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 <= -8.4e-36)
tmp = (b / c_m) / z;
elseif (b <= 3.8e+110)
tmp = -4.0 * (t * (a / c_m));
else
tmp = 1.0 / (z * (c_m / b));
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.
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, -8.4e-36], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 3.8e+110], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(z * N[(c$95$m / b), $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])\\\\
[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 -8.4 \cdot 10^{-36}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;b \leq 3.8 \cdot 10^{+110}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z \cdot \frac{c\_m}{b}}\\
\end{array}
\end{array}
if b < -8.39999999999999964e-36Initial program 82.9%
associate-+l-82.9%
*-commutative82.9%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in b around inf 61.8%
associate-/r*64.7%
Simplified64.7%
if -8.39999999999999964e-36 < b < 3.79999999999999989e110Initial program 80.9%
associate-+l-80.9%
*-commutative80.9%
associate-*r*78.9%
*-commutative78.9%
associate-+l-78.9%
associate-*l*78.9%
associate-*l*81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in z around 0 76.4%
Taylor expanded in a around inf 48.6%
*-commutative48.6%
associate-/l*49.2%
Simplified49.2%
if 3.79999999999999989e110 < b Initial program 76.1%
associate-+l-76.1%
*-commutative76.1%
associate-*r*79.6%
*-commutative79.6%
associate-+l-79.6%
associate-*l*79.6%
associate-*l*78.1%
*-commutative78.1%
Simplified78.1%
Taylor expanded in b around inf 55.7%
*-commutative55.7%
Simplified55.7%
clear-num55.7%
inv-pow55.7%
Applied egg-rr55.7%
unpow-155.7%
associate-/l*58.9%
Simplified58.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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= t -6.5e+167)
(* a (/ (* t -4.0) c_m))
(/ (+ (* y (* x 9.0)) b) (* z c_m)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -6.5e+167) {
tmp = a * ((t * -4.0) / c_m);
} else {
tmp = ((y * (x * 9.0)) + b) / (z * c_m);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (t <= (-6.5d+167)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else
tmp = ((y * (x * 9.0d0)) + b) / (z * c_m)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -6.5e+167) {
tmp = a * ((t * -4.0) / c_m);
} else {
tmp = ((y * (x * 9.0)) + b) / (z * c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if t <= -6.5e+167: tmp = a * ((t * -4.0) / c_m) else: tmp = ((y * (x * 9.0)) + b) / (z * c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (t <= -6.5e+167) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); else tmp = Float64(Float64(Float64(y * Float64(x * 9.0)) + b) / Float64(z * c_m)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (t <= -6.5e+167)
tmp = a * ((t * -4.0) / c_m);
else
tmp = ((y * (x * 9.0)) + b) / (z * c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[t, -6.5e+167], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+167}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(x \cdot 9\right) + b}{z \cdot c\_m}\\
\end{array}
\end{array}
if t < -6.5e167Initial program 65.2%
associate-+l-65.2%
*-commutative65.2%
associate-*r*76.7%
*-commutative76.7%
associate-+l-76.7%
associate-*l*76.8%
associate-*l*65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in z around inf 56.7%
*-commutative56.7%
associate-/l*67.0%
associate-*r*67.0%
associate-*l/67.0%
Simplified67.0%
if -6.5e167 < t Initial program 82.6%
associate-+l-82.6%
*-commutative82.6%
associate-*r*81.4%
*-commutative81.4%
associate-+l-81.4%
associate-*l*81.4%
associate-*l*85.2%
*-commutative85.2%
Simplified85.2%
Taylor expanded in x around inf 65.8%
associate-*r*65.8%
Simplified65.8%
Final simplification65.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. 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 2e+38) (/ b (* z c_m)) (/ (/ b z) c_m))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 <= 2e+38) {
tmp = b / (z * c_m);
} else {
tmp = (b / z) / c_m;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 <= 2d+38) then
tmp = b / (z * c_m)
else
tmp = (b / z) / c_m
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
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 <= 2e+38) {
tmp = b / (z * c_m);
} else {
tmp = (b / z) / c_m;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [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 <= 2e+38: tmp = b / (z * c_m) else: tmp = (b / z) / c_m return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) 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 <= 2e+38) tmp = Float64(b / Float64(z * c_m)); else tmp = Float64(Float64(b / z) / c_m); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
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 <= 2e+38)
tmp = b / (z * c_m);
else
tmp = (b / z) / c_m;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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, 2e+38], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(b / z), $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])\\\\
[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 \cdot 10^{+38}:\\
\;\;\;\;\frac{b}{z \cdot c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z}}{c\_m}\\
\end{array}
\end{array}
if z < 1.99999999999999995e38Initial program 84.7%
associate-+l-84.7%
*-commutative84.7%
associate-*r*86.1%
*-commutative86.1%
associate-+l-86.1%
associate-*l*86.1%
associate-*l*86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in b around inf 43.6%
*-commutative43.6%
Simplified43.6%
if 1.99999999999999995e38 < z Initial program 61.0%
associate-+l-61.0%
*-commutative61.0%
associate-*r*57.3%
*-commutative57.3%
associate-+l-57.3%
associate-*l*57.3%
associate-*l*67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in z around 0 62.8%
associate-/l*58.7%
Applied egg-rr58.7%
associate-*r/62.8%
*-commutative62.8%
associate-/l*62.8%
*-commutative62.8%
Simplified62.8%
Taylor expanded in b around inf 23.2%
*-commutative23.2%
associate-/r*33.2%
Simplified33.2%
c\_m = (fabs.f64 c) c\_s = (copysign.f64 #s(literal 1 binary64) c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. 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 4.4e+203) (/ b (* z 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 4.4e+203) {
tmp = b / (z * 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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (c_m <= 4.4d+203) then
tmp = b / (z * 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;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 4.4e+203) {
tmp = b / (z * 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]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if c_m <= 4.4e+203: tmp = b / (z * 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]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (c_m <= 4.4e+203) tmp = Float64(b / Float64(z * c_m)); else tmp = Float64(Float64(b / c_m) / z); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (c_m <= 4.4e+203)
tmp = b / (z * 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.
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, 4.4e+203], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(b / c$95$m), $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])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 4.4 \cdot 10^{+203}:\\
\;\;\;\;\frac{b}{z \cdot c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\end{array}
\end{array}
if c < 4.40000000000000009e203Initial program 82.4%
associate-+l-82.4%
*-commutative82.4%
associate-*r*82.9%
*-commutative82.9%
associate-+l-82.9%
associate-*l*82.9%
associate-*l*85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in b around inf 39.1%
*-commutative39.1%
Simplified39.1%
if 4.40000000000000009e203 < c Initial program 64.7%
associate-+l-64.7%
*-commutative64.7%
associate-*r*64.9%
*-commutative64.9%
associate-+l-64.9%
associate-*l*64.9%
associate-*l*64.9%
*-commutative64.9%
Simplified64.9%
Taylor expanded in b around inf 45.7%
associate-/r*61.3%
Simplified61.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. NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (/ b (* z c_m))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
return c_s * (b / (z * c_m));
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
code = c_s * (b / (z * c_m))
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
return c_s * (b / (z * c_m));
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): return c_s * (b / (z * c_m))
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) return Float64(c_s * Float64(b / Float64(z * c_m))) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp = code(c_s, x, y, z, t, a, b, c_m)
tmp = c_s * (b / (z * c_m));
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \frac{b}{z \cdot c\_m}
\end{array}
Initial program 80.3%
associate-+l-80.3%
*-commutative80.3%
associate-*r*80.8%
*-commutative80.8%
associate-+l-80.8%
associate-*l*80.8%
associate-*l*82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in b around inf 39.9%
*-commutative39.9%
Simplified39.9%
(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 2024088
(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)))