
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= c_m 6.2e-49)
(/ (- (+ (* 9.0 (/ (* x y) z)) (/ b z)) (* 4.0 (* a t))) c_m)
(if (<= c_m 3e+279)
(+ (* a (/ (* t -4.0) c_m)) (/ (- (/ b c_m) (* (/ y c_m) (* x -9.0))) z))
(-
(/ (* 9.0 (* x y)) (* c_m z))
(* b (+ (* 4.0 (/ (* a t) (* c_m b))) (/ -1.0 (* c_m z)))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 6.2e-49) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
} else if (c_m <= 3e+279) {
tmp = (a * ((t * -4.0) / c_m)) + (((b / c_m) - ((y / c_m) * (x * -9.0))) / z);
} else {
tmp = ((9.0 * (x * y)) / (c_m * z)) - (b * ((4.0 * ((a * t) / (c_m * b))) + (-1.0 / (c_m * z))));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (c_m <= 6.2d-49) then
tmp = (((9.0d0 * ((x * y) / z)) + (b / z)) - (4.0d0 * (a * t))) / c_m
else if (c_m <= 3d+279) then
tmp = (a * ((t * (-4.0d0)) / c_m)) + (((b / c_m) - ((y / c_m) * (x * (-9.0d0)))) / z)
else
tmp = ((9.0d0 * (x * y)) / (c_m * z)) - (b * ((4.0d0 * ((a * t) / (c_m * b))) + ((-1.0d0) / (c_m * z))))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 6.2e-49) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
} else if (c_m <= 3e+279) {
tmp = (a * ((t * -4.0) / c_m)) + (((b / c_m) - ((y / c_m) * (x * -9.0))) / z);
} else {
tmp = ((9.0 * (x * y)) / (c_m * z)) - (b * ((4.0 * ((a * t) / (c_m * b))) + (-1.0 / (c_m * z))));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if c_m <= 6.2e-49: tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m elif c_m <= 3e+279: tmp = (a * ((t * -4.0) / c_m)) + (((b / c_m) - ((y / c_m) * (x * -9.0))) / z) else: tmp = ((9.0 * (x * y)) / (c_m * z)) - (b * ((4.0 * ((a * t) / (c_m * b))) + (-1.0 / (c_m * z)))) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (c_m <= 6.2e-49) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z)) - Float64(4.0 * Float64(a * t))) / c_m); elseif (c_m <= 3e+279) tmp = Float64(Float64(a * Float64(Float64(t * -4.0) / c_m)) + Float64(Float64(Float64(b / c_m) - Float64(Float64(y / c_m) * Float64(x * -9.0))) / z)); else tmp = Float64(Float64(Float64(9.0 * Float64(x * y)) / Float64(c_m * z)) - Float64(b * Float64(Float64(4.0 * Float64(Float64(a * t) / Float64(c_m * b))) + Float64(-1.0 / Float64(c_m * z))))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (c_m <= 6.2e-49)
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
elseif (c_m <= 3e+279)
tmp = (a * ((t * -4.0) / c_m)) + (((b / c_m) - ((y / c_m) * (x * -9.0))) / z);
else
tmp = ((9.0 * (x * y)) / (c_m * z)) - (b * ((4.0 * ((a * t) / (c_m * b))) + (-1.0 / (c_m * z))));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 6.2e-49], N[(N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[c$95$m, 3e+279], N[(N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b / c$95$m), $MachinePrecision] - N[(N[(y / c$95$m), $MachinePrecision] * N[(x * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(4.0 * N[(N[(a * t), $MachinePrecision] / N[(c$95$m * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 6.2 \cdot 10^{-49}:\\
\;\;\;\;\frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}{c\_m}\\
\mathbf{elif}\;c\_m \leq 3 \cdot 10^{+279}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m} + \frac{\frac{b}{c\_m} - \frac{y}{c\_m} \cdot \left(x \cdot -9\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot y\right)}{c\_m \cdot z} - b \cdot \left(4 \cdot \frac{a \cdot t}{c\_m \cdot b} + \frac{-1}{c\_m \cdot z}\right)\\
\end{array}
\end{array}
if c < 6.2e-49Initial program 82.5%
associate-+l-82.5%
*-commutative82.5%
associate-*r*85.3%
*-commutative85.3%
associate-+l-85.3%
associate-*l*85.3%
associate-*l*86.4%
*-commutative86.4%
Simplified86.4%
associate-+l-86.4%
div-sub77.4%
associate-*r*77.4%
*-commutative77.4%
associate-*l*77.4%
*-commutative77.4%
associate-*l*77.4%
Applied egg-rr77.4%
Taylor expanded in c around 0 89.1%
if 6.2e-49 < c < 2.9999999999999998e279Initial program 71.1%
associate-+l-71.1%
*-commutative71.1%
associate-*r*75.8%
*-commutative75.8%
associate-+l-75.8%
associate-*l*75.9%
associate-*l*74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in x around 0 80.8%
associate--l+80.8%
fma-define80.7%
associate-/r*82.3%
associate-/l*84.0%
cancel-sign-sub-inv84.0%
metadata-eval84.0%
+-commutative84.0%
*-commutative84.0%
fma-define84.0%
associate-/l*88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in z around -inf 85.5%
mul-1-neg85.5%
sub-neg85.5%
sub-neg85.5%
mul-1-neg85.5%
mul-1-neg85.5%
sub-neg85.5%
mul-1-neg85.5%
unsub-neg85.5%
Simplified91.6%
if 2.9999999999999998e279 < c Initial program 84.8%
associate-+l-84.8%
*-commutative84.8%
associate-*r*86.1%
*-commutative86.1%
associate-+l-86.1%
associate-*l*86.1%
associate-*l*86.1%
*-commutative86.1%
Simplified86.1%
associate-+l-86.1%
div-sub86.3%
associate-*r*86.3%
*-commutative86.3%
associate-*l*86.3%
*-commutative86.3%
associate-*l*86.3%
Applied egg-rr86.3%
Taylor expanded in b around inf 99.8%
Final simplification90.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* c_m z)))
(t_2 (/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* c_m z))))
(*
c_s
(if (<= t_1 -1e-170)
t_2
(if (<= t_1 0.0)
(/ (- (/ b z) (* 4.0 (* a t))) c_m)
(if (<= t_1 INFINITY) t_2 (* a (/ (* t -4.0) c_m))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
double t_2 = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (c_m * z);
double tmp;
if (t_1 <= -1e-170) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = ((b / z) - (4.0 * (a * t))) / c_m;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = a * ((t * -4.0) / c_m);
}
return c_s * tmp;
}
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
double t_2 = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (c_m * z);
double tmp;
if (t_1 <= -1e-170) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = ((b / z) - (4.0 * (a * t))) / c_m;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = a * ((t * -4.0) / c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z) t_2 = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (c_m * z) tmp = 0 if t_1 <= -1e-170: tmp = t_2 elif t_1 <= 0.0: tmp = ((b / z) - (4.0 * (a * t))) / c_m elif t_1 <= math.inf: tmp = t_2 else: tmp = a * ((t * -4.0) / c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)) t_2 = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(c_m * z)) tmp = 0.0 if (t_1 <= -1e-170) tmp = t_2; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c_m); elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
t_2 = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (c_m * z);
tmp = 0.0;
if (t_1 <= -1e-170)
tmp = t_2;
elseif (t_1 <= 0.0)
tmp = ((b / z) - (4.0 * (a * t))) / c_m;
elseif (t_1 <= Inf)
tmp = t_2;
else
tmp = a * ((t * -4.0) / c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -1e-170], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c\_m \cdot z}\\
t_2 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{c\_m \cdot z}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-170}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c\_m}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{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)) < -9.99999999999999983e-171 or -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 88.0%
associate-+l-88.0%
*-commutative88.0%
associate-*r*91.7%
*-commutative91.7%
associate-+l-91.7%
associate-*l*91.7%
associate-*l*91.7%
*-commutative91.7%
Simplified91.7%
if -9.99999999999999983e-171 < (/.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 39.3%
associate-+l-39.3%
*-commutative39.3%
associate-*r*31.6%
*-commutative31.6%
associate-+l-31.6%
associate-*l*31.6%
associate-*l*39.3%
*-commutative39.3%
Simplified39.3%
associate-+l-39.3%
div-sub39.3%
associate-*r*39.3%
*-commutative39.3%
associate-*l*39.3%
*-commutative39.3%
associate-*l*39.3%
Applied egg-rr39.3%
Taylor expanded in c around 0 99.9%
Taylor expanded in x around 0 86.8%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*7.1%
*-commutative7.1%
associate-+l-7.1%
associate-*l*7.1%
associate-*l*7.1%
*-commutative7.1%
Simplified7.1%
Taylor expanded in z around inf 58.3%
*-commutative58.3%
associate-/l*87.2%
associate-*r*87.2%
associate-*l/87.2%
Simplified87.2%
Final simplification91.2%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= c_m 1.35e-48)
(/ (- (+ (* 9.0 (/ (* x y) z)) (/ b z)) (* 4.0 (* a t))) c_m)
(if (<= c_m 3e+279)
(+ (* a (/ (* t -4.0) c_m)) (/ (- (/ b c_m) (* (/ y c_m) (* x -9.0))) z))
(-
(/ (* 9.0 (* x y)) (* c_m z))
(/ (- (* 4.0 (* z (* a t))) b) (* c_m z)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 1.35e-48) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
} else if (c_m <= 3e+279) {
tmp = (a * ((t * -4.0) / c_m)) + (((b / c_m) - ((y / c_m) * (x * -9.0))) / z);
} else {
tmp = ((9.0 * (x * y)) / (c_m * z)) - (((4.0 * (z * (a * t))) - b) / (c_m * z));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (c_m <= 1.35d-48) then
tmp = (((9.0d0 * ((x * y) / z)) + (b / z)) - (4.0d0 * (a * t))) / c_m
else if (c_m <= 3d+279) then
tmp = (a * ((t * (-4.0d0)) / c_m)) + (((b / c_m) - ((y / c_m) * (x * (-9.0d0)))) / z)
else
tmp = ((9.0d0 * (x * y)) / (c_m * z)) - (((4.0d0 * (z * (a * t))) - b) / (c_m * z))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 1.35e-48) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
} else if (c_m <= 3e+279) {
tmp = (a * ((t * -4.0) / c_m)) + (((b / c_m) - ((y / c_m) * (x * -9.0))) / z);
} else {
tmp = ((9.0 * (x * y)) / (c_m * z)) - (((4.0 * (z * (a * t))) - b) / (c_m * z));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if c_m <= 1.35e-48: tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m elif c_m <= 3e+279: tmp = (a * ((t * -4.0) / c_m)) + (((b / c_m) - ((y / c_m) * (x * -9.0))) / z) else: tmp = ((9.0 * (x * y)) / (c_m * z)) - (((4.0 * (z * (a * t))) - b) / (c_m * z)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (c_m <= 1.35e-48) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z)) - Float64(4.0 * Float64(a * t))) / c_m); elseif (c_m <= 3e+279) tmp = Float64(Float64(a * Float64(Float64(t * -4.0) / c_m)) + Float64(Float64(Float64(b / c_m) - Float64(Float64(y / c_m) * Float64(x * -9.0))) / z)); else tmp = Float64(Float64(Float64(9.0 * Float64(x * y)) / Float64(c_m * z)) - Float64(Float64(Float64(4.0 * Float64(z * Float64(a * t))) - b) / Float64(c_m * z))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (c_m <= 1.35e-48)
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
elseif (c_m <= 3e+279)
tmp = (a * ((t * -4.0) / c_m)) + (((b / c_m) - ((y / c_m) * (x * -9.0))) / z);
else
tmp = ((9.0 * (x * y)) / (c_m * z)) - (((4.0 * (z * (a * t))) - b) / (c_m * z));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 1.35e-48], N[(N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[c$95$m, 3e+279], N[(N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b / c$95$m), $MachinePrecision] - N[(N[(y / c$95$m), $MachinePrecision] * N[(x * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(4.0 * N[(z * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 1.35 \cdot 10^{-48}:\\
\;\;\;\;\frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}{c\_m}\\
\mathbf{elif}\;c\_m \leq 3 \cdot 10^{+279}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m} + \frac{\frac{b}{c\_m} - \frac{y}{c\_m} \cdot \left(x \cdot -9\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot y\right)}{c\_m \cdot z} - \frac{4 \cdot \left(z \cdot \left(a \cdot t\right)\right) - b}{c\_m \cdot z}\\
\end{array}
\end{array}
if c < 1.35000000000000006e-48Initial program 82.5%
associate-+l-82.5%
*-commutative82.5%
associate-*r*85.3%
*-commutative85.3%
associate-+l-85.3%
associate-*l*85.3%
associate-*l*86.4%
*-commutative86.4%
Simplified86.4%
associate-+l-86.4%
div-sub77.4%
associate-*r*77.4%
*-commutative77.4%
associate-*l*77.4%
*-commutative77.4%
associate-*l*77.4%
Applied egg-rr77.4%
Taylor expanded in c around 0 89.1%
if 1.35000000000000006e-48 < c < 2.9999999999999998e279Initial program 71.1%
associate-+l-71.1%
*-commutative71.1%
associate-*r*75.8%
*-commutative75.8%
associate-+l-75.8%
associate-*l*75.9%
associate-*l*74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in x around 0 80.8%
associate--l+80.8%
fma-define80.7%
associate-/r*82.3%
associate-/l*84.0%
cancel-sign-sub-inv84.0%
metadata-eval84.0%
+-commutative84.0%
*-commutative84.0%
fma-define84.0%
associate-/l*88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in z around -inf 85.5%
mul-1-neg85.5%
sub-neg85.5%
sub-neg85.5%
mul-1-neg85.5%
mul-1-neg85.5%
sub-neg85.5%
mul-1-neg85.5%
unsub-neg85.5%
Simplified91.6%
if 2.9999999999999998e279 < c Initial program 84.8%
associate-+l-84.8%
*-commutative84.8%
associate-*r*86.1%
*-commutative86.1%
associate-+l-86.1%
associate-*l*86.1%
associate-*l*86.1%
*-commutative86.1%
Simplified86.1%
associate-+l-86.1%
div-sub86.3%
associate-*r*86.3%
*-commutative86.3%
associate-*l*86.3%
*-commutative86.3%
associate-*l*86.3%
Applied egg-rr86.3%
Final simplification89.6%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ (+ b (* y (* 9.0 x))) (* c_m z)))
(t_2 (/ (- (/ b z) (* 4.0 (* a t))) c_m)))
(*
c_s
(if (<= z -170.0)
t_2
(if (<= z 2e-131)
t_1
(if (<= z 1.35e-61)
(/ (- b (* 4.0 (* a (* z t)))) (* c_m z))
(if (<= z 3e-21) t_1 t_2)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (b + (y * (9.0 * x))) / (c_m * z);
double t_2 = ((b / z) - (4.0 * (a * t))) / c_m;
double tmp;
if (z <= -170.0) {
tmp = t_2;
} else if (z <= 2e-131) {
tmp = t_1;
} else if (z <= 1.35e-61) {
tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z);
} else if (z <= 3e-21) {
tmp = t_1;
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b + (y * (9.0d0 * x))) / (c_m * z)
t_2 = ((b / z) - (4.0d0 * (a * t))) / c_m
if (z <= (-170.0d0)) then
tmp = t_2
else if (z <= 2d-131) then
tmp = t_1
else if (z <= 1.35d-61) then
tmp = (b - (4.0d0 * (a * (z * t)))) / (c_m * z)
else if (z <= 3d-21) then
tmp = t_1
else
tmp = t_2
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (b + (y * (9.0 * x))) / (c_m * z);
double t_2 = ((b / z) - (4.0 * (a * t))) / c_m;
double tmp;
if (z <= -170.0) {
tmp = t_2;
} else if (z <= 2e-131) {
tmp = t_1;
} else if (z <= 1.35e-61) {
tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z);
} else if (z <= 3e-21) {
tmp = t_1;
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = (b + (y * (9.0 * x))) / (c_m * z) t_2 = ((b / z) - (4.0 * (a * t))) / c_m tmp = 0 if z <= -170.0: tmp = t_2 elif z <= 2e-131: tmp = t_1 elif z <= 1.35e-61: tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z) elif z <= 3e-21: tmp = t_1 else: tmp = t_2 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(c_m * z)) t_2 = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c_m) tmp = 0.0 if (z <= -170.0) tmp = t_2; elseif (z <= 2e-131) tmp = t_1; elseif (z <= 1.35e-61) tmp = Float64(Float64(b - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(c_m * z)); elseif (z <= 3e-21) tmp = t_1; else tmp = t_2; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = (b + (y * (9.0 * x))) / (c_m * z);
t_2 = ((b / z) - (4.0 * (a * t))) / c_m;
tmp = 0.0;
if (z <= -170.0)
tmp = t_2;
elseif (z <= 2e-131)
tmp = t_1;
elseif (z <= 1.35e-61)
tmp = (b - (4.0 * (a * (z * t)))) / (c_m * z);
elseif (z <= 3e-21)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -170.0], t$95$2, If[LessEqual[z, 2e-131], t$95$1, If[LessEqual[z, 1.35e-61], N[(N[(b - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e-21], t$95$1, t$95$2]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{b + y \cdot \left(9 \cdot x\right)}{c\_m \cdot z}\\
t_2 := \frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -170:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-61}:\\
\;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{c\_m \cdot z}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if z < -170 or 2.99999999999999991e-21 < z Initial program 65.4%
associate-+l-65.4%
*-commutative65.4%
associate-*r*72.0%
*-commutative72.0%
associate-+l-72.0%
associate-*l*72.0%
associate-*l*77.1%
*-commutative77.1%
Simplified77.1%
associate-+l-77.1%
div-sub77.1%
associate-*r*77.1%
*-commutative77.1%
associate-*l*77.1%
*-commutative77.1%
associate-*l*77.1%
Applied egg-rr77.1%
Taylor expanded in c around 0 92.4%
Taylor expanded in x around 0 74.6%
if -170 < z < 2e-131 or 1.34999999999999997e-61 < z < 2.99999999999999991e-21Initial program 95.5%
associate-+l-95.5%
*-commutative95.5%
associate-*r*95.1%
*-commutative95.1%
associate-+l-95.1%
associate-*l*95.1%
associate-*l*90.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in x around inf 83.1%
associate-*r*83.1%
Simplified83.1%
if 2e-131 < z < 1.34999999999999997e-61Initial program 93.6%
associate-+l-93.6%
*-commutative93.6%
associate-*r*93.7%
*-commutative93.7%
associate-+l-93.7%
associate-*l*93.7%
associate-*l*86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in x around 0 93.6%
Final simplification79.4%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= c_m 1.5e-48)
(/ (- (+ (* 9.0 (/ (* x y) z)) (/ b z)) (* 4.0 (* a t))) c_m)
(if (<= c_m 3e+279)
(+ (* a (/ (* t -4.0) c_m)) (/ (- (/ b c_m) (* (/ y c_m) (* x -9.0))) z))
(/ (+ b (- (* x (* 9.0 y)) (* (* a t) (* z 4.0)))) (* c_m z))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 1.5e-48) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
} else if (c_m <= 3e+279) {
tmp = (a * ((t * -4.0) / c_m)) + (((b / c_m) - ((y / c_m) * (x * -9.0))) / z);
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (c_m <= 1.5d-48) then
tmp = (((9.0d0 * ((x * y) / z)) + (b / z)) - (4.0d0 * (a * t))) / c_m
else if (c_m <= 3d+279) then
tmp = (a * ((t * (-4.0d0)) / c_m)) + (((b / c_m) - ((y / c_m) * (x * (-9.0d0)))) / z)
else
tmp = (b + ((x * (9.0d0 * y)) - ((a * t) * (z * 4.0d0)))) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 1.5e-48) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
} else if (c_m <= 3e+279) {
tmp = (a * ((t * -4.0) / c_m)) + (((b / c_m) - ((y / c_m) * (x * -9.0))) / z);
} else {
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if c_m <= 1.5e-48: tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m elif c_m <= 3e+279: tmp = (a * ((t * -4.0) / c_m)) + (((b / c_m) - ((y / c_m) * (x * -9.0))) / z) else: tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (c_m <= 1.5e-48) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z)) - Float64(4.0 * Float64(a * t))) / c_m); elseif (c_m <= 3e+279) tmp = Float64(Float64(a * Float64(Float64(t * -4.0) / c_m)) + Float64(Float64(Float64(b / c_m) - Float64(Float64(y / c_m) * Float64(x * -9.0))) / z)); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(a * t) * Float64(z * 4.0)))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (c_m <= 1.5e-48)
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
elseif (c_m <= 3e+279)
tmp = (a * ((t * -4.0) / c_m)) + (((b / c_m) - ((y / c_m) * (x * -9.0))) / z);
else
tmp = (b + ((x * (9.0 * y)) - ((a * t) * (z * 4.0)))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 1.5e-48], N[(N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[c$95$m, 3e+279], N[(N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b / c$95$m), $MachinePrecision] - N[(N[(y / c$95$m), $MachinePrecision] * N[(x * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 1.5 \cdot 10^{-48}:\\
\;\;\;\;\frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}{c\_m}\\
\mathbf{elif}\;c\_m \leq 3 \cdot 10^{+279}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m} + \frac{\frac{b}{c\_m} - \frac{y}{c\_m} \cdot \left(x \cdot -9\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(a \cdot t\right) \cdot \left(z \cdot 4\right)\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if c < 1.5e-48Initial program 82.5%
associate-+l-82.5%
*-commutative82.5%
associate-*r*85.3%
*-commutative85.3%
associate-+l-85.3%
associate-*l*85.3%
associate-*l*86.4%
*-commutative86.4%
Simplified86.4%
associate-+l-86.4%
div-sub77.4%
associate-*r*77.4%
*-commutative77.4%
associate-*l*77.4%
*-commutative77.4%
associate-*l*77.4%
Applied egg-rr77.4%
Taylor expanded in c around 0 89.1%
if 1.5e-48 < c < 2.9999999999999998e279Initial program 71.1%
associate-+l-71.1%
*-commutative71.1%
associate-*r*75.8%
*-commutative75.8%
associate-+l-75.8%
associate-*l*75.9%
associate-*l*74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in x around 0 80.8%
associate--l+80.8%
fma-define80.7%
associate-/r*82.3%
associate-/l*84.0%
cancel-sign-sub-inv84.0%
metadata-eval84.0%
+-commutative84.0%
*-commutative84.0%
fma-define84.0%
associate-/l*88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in z around -inf 85.5%
mul-1-neg85.5%
sub-neg85.5%
sub-neg85.5%
mul-1-neg85.5%
mul-1-neg85.5%
sub-neg85.5%
mul-1-neg85.5%
unsub-neg85.5%
Simplified91.6%
if 2.9999999999999998e279 < c Initial program 84.8%
associate-+l-84.8%
*-commutative84.8%
associate-*r*86.1%
*-commutative86.1%
associate-+l-86.1%
associate-*l*86.1%
associate-*l*86.1%
*-commutative86.1%
Simplified86.1%
Final simplification89.6%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -2e-71) (not (<= z 1e-16)))
(/ (- (+ (* 9.0 (/ (* x y) z)) (/ b z)) (* 4.0 (* a t))) c_m)
(/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -2e-71) || !(z <= 1e-16)) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((z <= (-2d-71)) .or. (.not. (z <= 1d-16))) then
tmp = (((9.0d0 * ((x * y) / z)) + (b / z)) - (4.0d0 * (a * t))) / c_m
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -2e-71) || !(z <= 1e-16)) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -2e-71) or not (z <= 1e-16): tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -2e-71) || !(z <= 1e-16)) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z)) - Float64(4.0 * Float64(a * t))) / c_m); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -2e-71) || ~((z <= 1e-16)))
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -2e-71], N[Not[LessEqual[z, 1e-16]], $MachinePrecision]], N[(N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-71} \lor \neg \left(z \leq 10^{-16}\right):\\
\;\;\;\;\frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -1.9999999999999998e-71 or 9.9999999999999998e-17 < z Initial program 69.3%
associate-+l-69.3%
*-commutative69.3%
associate-*r*74.7%
*-commutative74.7%
associate-+l-74.7%
associate-*l*74.7%
associate-*l*79.4%
*-commutative79.4%
Simplified79.4%
associate-+l-79.4%
div-sub76.8%
associate-*r*76.8%
*-commutative76.8%
associate-*l*76.8%
*-commutative76.8%
associate-*l*76.8%
Applied egg-rr76.8%
Taylor expanded in c around 0 92.8%
if -1.9999999999999998e-71 < z < 9.9999999999999998e-17Initial program 95.3%
Final simplification93.8%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= b -3.1e+204)
(/ 1.0 (/ z (/ b c_m)))
(if (<= b -3e-202)
(* a (/ (* t -4.0) c_m))
(if (<= b 3.5e-152)
(/ (* y (* 9.0 x)) (* c_m z))
(if (<= b 1300.0) (* -4.0 (/ (* a t) c_m)) (/ (/ b c_m) z)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -3.1e+204) {
tmp = 1.0 / (z / (b / c_m));
} else if (b <= -3e-202) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 3.5e-152) {
tmp = (y * (9.0 * x)) / (c_m * z);
} else if (b <= 1300.0) {
tmp = -4.0 * ((a * t) / c_m);
} else {
tmp = (b / c_m) / z;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (b <= (-3.1d+204)) then
tmp = 1.0d0 / (z / (b / c_m))
else if (b <= (-3d-202)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (b <= 3.5d-152) then
tmp = (y * (9.0d0 * x)) / (c_m * z)
else if (b <= 1300.0d0) then
tmp = (-4.0d0) * ((a * t) / c_m)
else
tmp = (b / c_m) / z
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -3.1e+204) {
tmp = 1.0 / (z / (b / c_m));
} else if (b <= -3e-202) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 3.5e-152) {
tmp = (y * (9.0 * x)) / (c_m * z);
} else if (b <= 1300.0) {
tmp = -4.0 * ((a * t) / c_m);
} else {
tmp = (b / c_m) / z;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if b <= -3.1e+204: tmp = 1.0 / (z / (b / c_m)) elif b <= -3e-202: tmp = a * ((t * -4.0) / c_m) elif b <= 3.5e-152: tmp = (y * (9.0 * x)) / (c_m * z) elif b <= 1300.0: tmp = -4.0 * ((a * t) / c_m) else: tmp = (b / c_m) / z return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (b <= -3.1e+204) tmp = Float64(1.0 / Float64(z / Float64(b / c_m))); elseif (b <= -3e-202) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (b <= 3.5e-152) tmp = Float64(Float64(y * Float64(9.0 * x)) / Float64(c_m * z)); elseif (b <= 1300.0) tmp = Float64(-4.0 * Float64(Float64(a * t) / 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])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (b <= -3.1e+204)
tmp = 1.0 / (z / (b / c_m));
elseif (b <= -3e-202)
tmp = a * ((t * -4.0) / c_m);
elseif (b <= 3.5e-152)
tmp = (y * (9.0 * x)) / (c_m * z);
elseif (b <= 1300.0)
tmp = -4.0 * ((a * t) / c_m);
else
tmp = (b / c_m) / z;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -3.1e+204], N[(1.0 / N[(z / N[(b / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3e-202], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.5e-152], N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1300.0], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / 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])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -3.1 \cdot 10^{+204}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{b}{c\_m}}}\\
\mathbf{elif}\;b \leq -3 \cdot 10^{-202}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;b \leq 3.5 \cdot 10^{-152}:\\
\;\;\;\;\frac{y \cdot \left(9 \cdot x\right)}{c\_m \cdot z}\\
\mathbf{elif}\;b \leq 1300:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\end{array}
\end{array}
if b < -3.1000000000000002e204Initial program 86.6%
associate-+l-86.6%
*-commutative86.6%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in b around inf 60.3%
associate-/r*68.7%
Simplified68.7%
clear-num68.9%
inv-pow68.9%
Applied egg-rr68.9%
unpow-168.9%
Simplified68.9%
if -3.1000000000000002e204 < b < -3.00000000000000011e-202Initial program 67.7%
associate-+l-67.7%
*-commutative67.7%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in z around inf 46.4%
*-commutative46.4%
associate-/l*52.5%
associate-*r*52.5%
associate-*l/52.5%
Simplified52.5%
if -3.00000000000000011e-202 < b < 3.5000000000000001e-152Initial program 84.4%
associate-+l-84.4%
*-commutative84.4%
associate-*r*85.6%
*-commutative85.6%
associate-+l-85.6%
associate-*l*85.5%
associate-*l*87.5%
*-commutative87.5%
Simplified87.5%
associate-+l-87.5%
div-sub84.4%
associate-*r*84.4%
*-commutative84.4%
associate-*l*84.4%
*-commutative84.4%
associate-*l*84.4%
Applied egg-rr84.4%
Taylor expanded in c around 0 92.1%
Taylor expanded in x around inf 64.6%
associate-*r/64.6%
associate-*r*64.6%
*-commutative64.6%
*-commutative64.6%
Simplified64.6%
if 3.5000000000000001e-152 < b < 1300Initial program 81.4%
associate-+l-81.4%
*-commutative81.4%
associate-*r*87.4%
*-commutative87.4%
associate-+l-87.4%
associate-*l*87.4%
associate-*l*87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in z around inf 57.8%
*-commutative57.8%
Simplified57.8%
if 1300 < b Initial program 86.5%
associate-+l-86.5%
*-commutative86.5%
associate-*r*89.4%
*-commutative89.4%
associate-+l-89.4%
associate-*l*89.4%
associate-*l*87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in b around inf 54.9%
associate-/r*58.0%
Simplified58.0%
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.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= b -3.1e+204)
(/ 1.0 (/ z (/ b c_m)))
(if (<= b -1.7e-202)
(* a (/ (* t -4.0) c_m))
(if (<= b 4e-153)
(* 9.0 (/ (* x y) (* c_m z)))
(if (<= b 2650.0) (* -4.0 (/ (* a t) c_m)) (/ (/ b c_m) z)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -3.1e+204) {
tmp = 1.0 / (z / (b / c_m));
} else if (b <= -1.7e-202) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 4e-153) {
tmp = 9.0 * ((x * y) / (c_m * z));
} else if (b <= 2650.0) {
tmp = -4.0 * ((a * t) / c_m);
} else {
tmp = (b / c_m) / z;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (b <= (-3.1d+204)) then
tmp = 1.0d0 / (z / (b / c_m))
else if (b <= (-1.7d-202)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (b <= 4d-153) then
tmp = 9.0d0 * ((x * y) / (c_m * z))
else if (b <= 2650.0d0) then
tmp = (-4.0d0) * ((a * t) / c_m)
else
tmp = (b / c_m) / z
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -3.1e+204) {
tmp = 1.0 / (z / (b / c_m));
} else if (b <= -1.7e-202) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 4e-153) {
tmp = 9.0 * ((x * y) / (c_m * z));
} else if (b <= 2650.0) {
tmp = -4.0 * ((a * t) / c_m);
} else {
tmp = (b / c_m) / z;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if b <= -3.1e+204: tmp = 1.0 / (z / (b / c_m)) elif b <= -1.7e-202: tmp = a * ((t * -4.0) / c_m) elif b <= 4e-153: tmp = 9.0 * ((x * y) / (c_m * z)) elif b <= 2650.0: tmp = -4.0 * ((a * t) / c_m) else: tmp = (b / c_m) / z return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (b <= -3.1e+204) tmp = Float64(1.0 / Float64(z / Float64(b / c_m))); elseif (b <= -1.7e-202) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (b <= 4e-153) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c_m * z))); elseif (b <= 2650.0) tmp = Float64(-4.0 * Float64(Float64(a * t) / 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])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (b <= -3.1e+204)
tmp = 1.0 / (z / (b / c_m));
elseif (b <= -1.7e-202)
tmp = a * ((t * -4.0) / c_m);
elseif (b <= 4e-153)
tmp = 9.0 * ((x * y) / (c_m * z));
elseif (b <= 2650.0)
tmp = -4.0 * ((a * t) / c_m);
else
tmp = (b / c_m) / z;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -3.1e+204], N[(1.0 / N[(z / N[(b / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.7e-202], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4e-153], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2650.0], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / 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])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -3.1 \cdot 10^{+204}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{b}{c\_m}}}\\
\mathbf{elif}\;b \leq -1.7 \cdot 10^{-202}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;b \leq 4 \cdot 10^{-153}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{c\_m \cdot z}\\
\mathbf{elif}\;b \leq 2650:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\end{array}
\end{array}
if b < -3.1000000000000002e204Initial program 86.6%
associate-+l-86.6%
*-commutative86.6%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in b around inf 60.3%
associate-/r*68.7%
Simplified68.7%
clear-num68.9%
inv-pow68.9%
Applied egg-rr68.9%
unpow-168.9%
Simplified68.9%
if -3.1000000000000002e204 < b < -1.70000000000000006e-202Initial program 67.7%
associate-+l-67.7%
*-commutative67.7%
associate-*r*72.9%
*-commutative72.9%
associate-+l-72.9%
associate-*l*72.9%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in z around inf 46.4%
*-commutative46.4%
associate-/l*52.5%
associate-*r*52.5%
associate-*l/52.5%
Simplified52.5%
if -1.70000000000000006e-202 < b < 4.00000000000000016e-153Initial program 84.4%
associate-+l-84.4%
*-commutative84.4%
associate-*r*85.6%
*-commutative85.6%
associate-+l-85.6%
associate-*l*85.5%
associate-*l*87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in x around inf 64.6%
if 4.00000000000000016e-153 < b < 2650Initial program 81.4%
associate-+l-81.4%
*-commutative81.4%
associate-*r*87.4%
*-commutative87.4%
associate-+l-87.4%
associate-*l*87.4%
associate-*l*87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in z around inf 57.8%
*-commutative57.8%
Simplified57.8%
if 2650 < b Initial program 86.5%
associate-+l-86.5%
*-commutative86.5%
associate-*r*89.4%
*-commutative89.4%
associate-+l-89.4%
associate-*l*89.4%
associate-*l*87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in b around inf 54.9%
associate-/r*58.0%
Simplified58.0%
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.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= b -3.1e+204)
(/ 1.0 (/ z (/ b c_m)))
(if (<= b -1.4e-253)
(* a (/ (* t -4.0) c_m))
(if (<= b 2.2e-152)
(* 9.0 (* x (/ (/ y c_m) z)))
(if (<= b 580.0) (* -4.0 (/ (* a t) c_m)) (/ (/ b c_m) z)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -3.1e+204) {
tmp = 1.0 / (z / (b / c_m));
} else if (b <= -1.4e-253) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 2.2e-152) {
tmp = 9.0 * (x * ((y / c_m) / z));
} else if (b <= 580.0) {
tmp = -4.0 * ((a * t) / c_m);
} else {
tmp = (b / c_m) / z;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (b <= (-3.1d+204)) then
tmp = 1.0d0 / (z / (b / c_m))
else if (b <= (-1.4d-253)) then
tmp = a * ((t * (-4.0d0)) / c_m)
else if (b <= 2.2d-152) then
tmp = 9.0d0 * (x * ((y / c_m) / z))
else if (b <= 580.0d0) then
tmp = (-4.0d0) * ((a * t) / c_m)
else
tmp = (b / c_m) / z
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -3.1e+204) {
tmp = 1.0 / (z / (b / c_m));
} else if (b <= -1.4e-253) {
tmp = a * ((t * -4.0) / c_m);
} else if (b <= 2.2e-152) {
tmp = 9.0 * (x * ((y / c_m) / z));
} else if (b <= 580.0) {
tmp = -4.0 * ((a * t) / c_m);
} else {
tmp = (b / c_m) / z;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if b <= -3.1e+204: tmp = 1.0 / (z / (b / c_m)) elif b <= -1.4e-253: tmp = a * ((t * -4.0) / c_m) elif b <= 2.2e-152: tmp = 9.0 * (x * ((y / c_m) / z)) elif b <= 580.0: tmp = -4.0 * ((a * t) / c_m) else: tmp = (b / c_m) / z return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (b <= -3.1e+204) tmp = Float64(1.0 / Float64(z / Float64(b / c_m))); elseif (b <= -1.4e-253) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); elseif (b <= 2.2e-152) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c_m) / z))); elseif (b <= 580.0) tmp = Float64(-4.0 * Float64(Float64(a * t) / 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])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (b <= -3.1e+204)
tmp = 1.0 / (z / (b / c_m));
elseif (b <= -1.4e-253)
tmp = a * ((t * -4.0) / c_m);
elseif (b <= 2.2e-152)
tmp = 9.0 * (x * ((y / c_m) / z));
elseif (b <= 580.0)
tmp = -4.0 * ((a * t) / c_m);
else
tmp = (b / c_m) / z;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -3.1e+204], N[(1.0 / N[(z / N[(b / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.4e-253], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.2e-152], N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 580.0], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / 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])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -3.1 \cdot 10^{+204}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{b}{c\_m}}}\\
\mathbf{elif}\;b \leq -1.4 \cdot 10^{-253}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{elif}\;b \leq 2.2 \cdot 10^{-152}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\mathbf{elif}\;b \leq 580:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\end{array}
\end{array}
if b < -3.1000000000000002e204Initial program 86.6%
associate-+l-86.6%
*-commutative86.6%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
associate-*l*86.2%
associate-*l*86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in b around inf 60.3%
associate-/r*68.7%
Simplified68.7%
clear-num68.9%
inv-pow68.9%
Applied egg-rr68.9%
unpow-168.9%
Simplified68.9%
if -3.1000000000000002e204 < b < -1.40000000000000003e-253Initial program 70.0%
associate-+l-70.0%
*-commutative70.0%
associate-*r*75.1%
*-commutative75.1%
associate-+l-75.1%
associate-*l*75.1%
associate-*l*76.6%
*-commutative76.6%
Simplified76.6%
Taylor expanded in z around inf 46.5%
*-commutative46.5%
associate-/l*50.1%
associate-*r*50.1%
associate-*l/50.1%
Simplified50.1%
if -1.40000000000000003e-253 < b < 2.19999999999999985e-152Initial program 84.5%
associate-+l-84.5%
*-commutative84.5%
associate-*r*84.8%
*-commutative84.8%
associate-+l-84.8%
associate-*l*84.8%
associate-*l*86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in x around inf 71.3%
associate-/l*69.6%
associate-/r*63.2%
Simplified63.2%
if 2.19999999999999985e-152 < b < 580Initial program 81.4%
associate-+l-81.4%
*-commutative81.4%
associate-*r*87.4%
*-commutative87.4%
associate-+l-87.4%
associate-*l*87.4%
associate-*l*87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in z around inf 57.8%
*-commutative57.8%
Simplified57.8%
if 580 < b Initial program 86.5%
associate-+l-86.5%
*-commutative86.5%
associate-*r*89.4%
*-commutative89.4%
associate-+l-89.4%
associate-*l*89.4%
associate-*l*87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in b around inf 54.9%
associate-/r*58.0%
Simplified58.0%
Final simplification57.3%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= b -3.6e+42)
(/ (- (/ b z) (* 4.0 (* a t))) c_m)
(if (<= b 28.0)
(/ (- (/ (* y (* 9.0 x)) z) (* t (* 4.0 a))) c_m)
(/ (+ (/ b c_m) (* 9.0 (/ (* x y) c_m))) z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -3.6e+42) {
tmp = ((b / z) - (4.0 * (a * t))) / c_m;
} else if (b <= 28.0) {
tmp = (((y * (9.0 * x)) / z) - (t * (4.0 * a))) / c_m;
} else {
tmp = ((b / c_m) + (9.0 * ((x * y) / c_m))) / z;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (b <= (-3.6d+42)) then
tmp = ((b / z) - (4.0d0 * (a * t))) / c_m
else if (b <= 28.0d0) then
tmp = (((y * (9.0d0 * x)) / z) - (t * (4.0d0 * a))) / c_m
else
tmp = ((b / c_m) + (9.0d0 * ((x * y) / c_m))) / z
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -3.6e+42) {
tmp = ((b / z) - (4.0 * (a * t))) / c_m;
} else if (b <= 28.0) {
tmp = (((y * (9.0 * x)) / z) - (t * (4.0 * a))) / c_m;
} else {
tmp = ((b / c_m) + (9.0 * ((x * y) / c_m))) / z;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if b <= -3.6e+42: tmp = ((b / z) - (4.0 * (a * t))) / c_m elif b <= 28.0: tmp = (((y * (9.0 * x)) / z) - (t * (4.0 * a))) / c_m else: tmp = ((b / c_m) + (9.0 * ((x * y) / c_m))) / z return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (b <= -3.6e+42) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c_m); elseif (b <= 28.0) tmp = Float64(Float64(Float64(Float64(y * Float64(9.0 * x)) / z) - Float64(t * Float64(4.0 * a))) / c_m); else tmp = Float64(Float64(Float64(b / c_m) + Float64(9.0 * Float64(Float64(x * y) / c_m))) / z); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (b <= -3.6e+42)
tmp = ((b / z) - (4.0 * (a * t))) / c_m;
elseif (b <= 28.0)
tmp = (((y * (9.0 * x)) / z) - (t * (4.0 * a))) / c_m;
else
tmp = ((b / c_m) + (9.0 * ((x * y) / c_m))) / z;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -3.6e+42], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[b, 28.0], N[(N[(N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(t * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(N[(b / c$95$m), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -3.6 \cdot 10^{+42}:\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c\_m}\\
\mathbf{elif}\;b \leq 28:\\
\;\;\;\;\frac{\frac{y \cdot \left(9 \cdot x\right)}{z} - t \cdot \left(4 \cdot a\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c\_m} + 9 \cdot \frac{x \cdot y}{c\_m}}{z}\\
\end{array}
\end{array}
if b < -3.6000000000000001e42Initial program 78.7%
associate-+l-78.7%
*-commutative78.7%
associate-*r*84.3%
*-commutative84.3%
associate-+l-84.3%
associate-*l*84.3%
associate-*l*82.3%
*-commutative82.3%
Simplified82.3%
associate-+l-82.3%
div-sub76.3%
associate-*r*76.3%
*-commutative76.3%
associate-*l*76.3%
*-commutative76.3%
associate-*l*76.3%
Applied egg-rr76.3%
Taylor expanded in c around 0 84.4%
Taylor expanded in x around 0 82.6%
if -3.6000000000000001e42 < b < 28Initial program 77.7%
associate-+l-77.7%
*-commutative77.7%
associate-*r*80.3%
*-commutative80.3%
associate-+l-80.3%
associate-*l*80.3%
associate-*l*82.6%
*-commutative82.6%
Simplified82.6%
associate-+l-82.6%
div-sub76.1%
associate-*r*76.1%
*-commutative76.1%
associate-*l*76.1%
*-commutative76.1%
associate-*l*76.1%
Applied egg-rr76.1%
Taylor expanded in c around 0 89.6%
Taylor expanded in b around 0 82.0%
associate-*r/81.9%
associate-*r*81.9%
*-commutative81.9%
associate-*r*81.9%
*-commutative81.9%
Simplified81.9%
if 28 < b Initial program 85.3%
associate-+l-85.3%
*-commutative85.3%
associate-*r*88.1%
*-commutative88.1%
associate-+l-88.1%
associate-*l*88.1%
associate-*l*86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in x around 0 75.8%
associate--l+75.8%
fma-define75.8%
associate-/r*77.5%
associate-/l*76.3%
cancel-sign-sub-inv76.3%
metadata-eval76.3%
+-commutative76.3%
*-commutative76.3%
fma-define76.3%
associate-/l*77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in z around 0 72.0%
Final simplification79.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -1750.0) (not (<= z 4.4e-85)))
(/ (- (/ b z) (* 4.0 (* a t))) c_m)
(/ (+ b (* y (* 9.0 x))) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -1750.0) || !(z <= 4.4e-85)) {
tmp = ((b / z) - (4.0 * (a * t))) / c_m;
} else {
tmp = (b + (y * (9.0 * x))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((z <= (-1750.0d0)) .or. (.not. (z <= 4.4d-85))) then
tmp = ((b / z) - (4.0d0 * (a * t))) / c_m
else
tmp = (b + (y * (9.0d0 * x))) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -1750.0) || !(z <= 4.4e-85)) {
tmp = ((b / z) - (4.0 * (a * t))) / c_m;
} else {
tmp = (b + (y * (9.0 * x))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -1750.0) or not (z <= 4.4e-85): tmp = ((b / z) - (4.0 * (a * t))) / c_m else: tmp = (b + (y * (9.0 * x))) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -1750.0) || !(z <= 4.4e-85)) tmp = Float64(Float64(Float64(b / z) - Float64(4.0 * Float64(a * t))) / c_m); else tmp = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -1750.0) || ~((z <= 4.4e-85)))
tmp = ((b / z) - (4.0 * (a * t))) / c_m;
else
tmp = (b + (y * (9.0 * x))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -1750.0], N[Not[LessEqual[z, 4.4e-85]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1750 \lor \neg \left(z \leq 4.4 \cdot 10^{-85}\right):\\
\;\;\;\;\frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -1750 or 4.4e-85 < z Initial program 68.0%
associate-+l-68.0%
*-commutative68.0%
associate-*r*74.0%
*-commutative74.0%
associate-+l-74.0%
associate-*l*74.0%
associate-*l*78.6%
*-commutative78.6%
Simplified78.6%
associate-+l-78.6%
div-sub77.9%
associate-*r*77.9%
*-commutative77.9%
associate-*l*77.9%
*-commutative77.9%
associate-*l*77.9%
Applied egg-rr77.9%
Taylor expanded in c around 0 91.8%
Taylor expanded in x around 0 73.8%
if -1750 < z < 4.4e-85Initial program 95.5%
associate-+l-95.5%
*-commutative95.5%
associate-*r*95.2%
*-commutative95.2%
associate-+l-95.2%
associate-*l*95.2%
associate-*l*90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in x around inf 82.7%
associate-*r*82.7%
Simplified82.7%
Final simplification77.6%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= t -8.1e+151) (not (<= t 1.15e-50)))
(* a (/ (* t -4.0) c_m))
(/ (+ b (* y (* 9.0 x))) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((t <= -8.1e+151) || !(t <= 1.15e-50)) {
tmp = a * ((t * -4.0) / c_m);
} else {
tmp = (b + (y * (9.0 * x))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((t <= (-8.1d+151)) .or. (.not. (t <= 1.15d-50))) then
tmp = a * ((t * (-4.0d0)) / c_m)
else
tmp = (b + (y * (9.0d0 * x))) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((t <= -8.1e+151) || !(t <= 1.15e-50)) {
tmp = a * ((t * -4.0) / c_m);
} else {
tmp = (b + (y * (9.0 * x))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (t <= -8.1e+151) or not (t <= 1.15e-50): tmp = a * ((t * -4.0) / c_m) else: tmp = (b + (y * (9.0 * x))) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((t <= -8.1e+151) || !(t <= 1.15e-50)) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); else tmp = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((t <= -8.1e+151) || ~((t <= 1.15e-50)))
tmp = a * ((t * -4.0) / c_m);
else
tmp = (b + (y * (9.0 * x))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[t, -8.1e+151], N[Not[LessEqual[t, 1.15e-50]], $MachinePrecision]], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -8.1 \cdot 10^{+151} \lor \neg \left(t \leq 1.15 \cdot 10^{-50}\right):\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if t < -8.1000000000000004e151 or 1.1500000000000001e-50 < t Initial program 71.4%
associate-+l-71.4%
*-commutative71.4%
associate-*r*81.1%
*-commutative81.1%
associate-+l-81.1%
associate-*l*81.1%
associate-*l*77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in z around inf 53.6%
*-commutative53.6%
associate-/l*59.5%
associate-*r*59.5%
associate-*l/59.5%
Simplified59.5%
if -8.1000000000000004e151 < t < 1.1500000000000001e-50Initial program 86.8%
associate-+l-86.8%
*-commutative86.8%
associate-*r*84.7%
*-commutative84.7%
associate-+l-84.7%
associate-*l*84.7%
associate-*l*88.8%
*-commutative88.8%
Simplified88.8%
Taylor expanded in x around inf 74.8%
associate-*r*74.7%
Simplified74.7%
Final simplification67.9%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -2.4e-30) (not (<= z 1.05e-19)))
(* a (/ (* t -4.0) c_m))
(/ b (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -2.4e-30) || !(z <= 1.05e-19)) {
tmp = a * ((t * -4.0) / c_m);
} else {
tmp = b / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((z <= (-2.4d-30)) .or. (.not. (z <= 1.05d-19))) then
tmp = a * ((t * (-4.0d0)) / c_m)
else
tmp = b / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -2.4e-30) || !(z <= 1.05e-19)) {
tmp = a * ((t * -4.0) / c_m);
} else {
tmp = b / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -2.4e-30) or not (z <= 1.05e-19): tmp = a * ((t * -4.0) / c_m) else: tmp = b / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -2.4e-30) || !(z <= 1.05e-19)) tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); else tmp = Float64(b / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -2.4e-30) || ~((z <= 1.05e-19)))
tmp = a * ((t * -4.0) / c_m);
else
tmp = b / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -2.4e-30], N[Not[LessEqual[z, 1.05e-19]], $MachinePrecision]], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-30} \lor \neg \left(z \leq 1.05 \cdot 10^{-19}\right):\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -2.39999999999999985e-30 or 1.0499999999999999e-19 < z Initial program 67.6%
associate-+l-67.6%
*-commutative67.6%
associate-*r*73.8%
*-commutative73.8%
associate-+l-73.8%
associate-*l*73.8%
associate-*l*78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in z around inf 57.5%
*-commutative57.5%
associate-/l*58.5%
associate-*r*58.5%
associate-*l/58.5%
Simplified58.5%
if -2.39999999999999985e-30 < z < 1.0499999999999999e-19Initial program 94.9%
associate-+l-94.9%
*-commutative94.9%
associate-*r*94.5%
*-commutative94.5%
associate-+l-94.5%
associate-*l*94.5%
associate-*l*89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in b around inf 49.5%
*-commutative49.5%
Simplified49.5%
Final simplification54.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -2.5e-29) (not (<= z 6e-20)))
(* a (* t (/ -4.0 c_m)))
(/ b (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -2.5e-29) || !(z <= 6e-20)) {
tmp = a * (t * (-4.0 / c_m));
} else {
tmp = b / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((z <= (-2.5d-29)) .or. (.not. (z <= 6d-20))) then
tmp = a * (t * ((-4.0d0) / c_m))
else
tmp = b / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -2.5e-29) || !(z <= 6e-20)) {
tmp = a * (t * (-4.0 / c_m));
} else {
tmp = b / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -2.5e-29) or not (z <= 6e-20): tmp = a * (t * (-4.0 / c_m)) else: tmp = b / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -2.5e-29) || !(z <= 6e-20)) tmp = Float64(a * Float64(t * Float64(-4.0 / c_m))); else tmp = Float64(b / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -2.5e-29) || ~((z <= 6e-20)))
tmp = a * (t * (-4.0 / c_m));
else
tmp = b / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -2.5e-29], N[Not[LessEqual[z, 6e-20]], $MachinePrecision]], N[(a * N[(t * N[(-4.0 / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-29} \lor \neg \left(z \leq 6 \cdot 10^{-20}\right):\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -2.49999999999999993e-29 or 6.00000000000000057e-20 < z Initial program 67.6%
associate-+l-67.6%
*-commutative67.6%
associate-*r*73.8%
*-commutative73.8%
associate-+l-73.8%
associate-*l*73.8%
associate-*l*78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in y around inf 73.0%
Taylor expanded in c around 0 72.0%
Taylor expanded in z around inf 57.5%
associate-*r/58.5%
associate-*r*58.5%
*-commutative58.5%
associate-*r*58.5%
associate-*r/58.5%
*-commutative58.5%
associate-/l*58.4%
Simplified58.4%
if -2.49999999999999993e-29 < z < 6.00000000000000057e-20Initial program 94.9%
associate-+l-94.9%
*-commutative94.9%
associate-*r*94.5%
*-commutative94.5%
associate-+l-94.5%
associate-*l*94.5%
associate-*l*89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in b around inf 49.5%
*-commutative49.5%
Simplified49.5%
Final simplification54.4%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= z -2800000.0)
(* -4.0 (/ (* a t) c_m))
(if (<= z 4.2e-20) (/ b (* c_m z)) (* a (/ (* t -4.0) c_m))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -2800000.0) {
tmp = -4.0 * ((a * t) / c_m);
} else if (z <= 4.2e-20) {
tmp = b / (c_m * z);
} else {
tmp = a * ((t * -4.0) / c_m);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (z <= (-2800000.0d0)) then
tmp = (-4.0d0) * ((a * t) / c_m)
else if (z <= 4.2d-20) then
tmp = b / (c_m * z)
else
tmp = a * ((t * (-4.0d0)) / c_m)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -2800000.0) {
tmp = -4.0 * ((a * t) / c_m);
} else if (z <= 4.2e-20) {
tmp = b / (c_m * z);
} else {
tmp = a * ((t * -4.0) / c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if z <= -2800000.0: tmp = -4.0 * ((a * t) / c_m) elif z <= 4.2e-20: tmp = b / (c_m * z) else: tmp = a * ((t * -4.0) / c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (z <= -2800000.0) tmp = Float64(-4.0 * Float64(Float64(a * t) / c_m)); elseif (z <= 4.2e-20) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (z <= -2800000.0)
tmp = -4.0 * ((a * t) / c_m);
elseif (z <= 4.2e-20)
tmp = b / (c_m * z);
else
tmp = a * ((t * -4.0) / c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -2800000.0], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-20], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2800000:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-20}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\end{array}
\end{array}
if z < -2.8e6Initial program 60.6%
associate-+l-60.6%
*-commutative60.6%
associate-*r*68.7%
*-commutative68.7%
associate-+l-68.7%
associate-*l*68.7%
associate-*l*72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in z around inf 62.0%
*-commutative62.0%
Simplified62.0%
if -2.8e6 < z < 4.1999999999999998e-20Initial program 94.6%
associate-+l-94.6%
*-commutative94.6%
associate-*r*94.3%
*-commutative94.3%
associate-+l-94.3%
associate-*l*94.3%
associate-*l*90.0%
*-commutative90.0%
Simplified90.0%
Taylor expanded in b around inf 47.8%
*-commutative47.8%
Simplified47.8%
if 4.1999999999999998e-20 < z Initial program 69.0%
associate-+l-69.0%
*-commutative69.0%
associate-*r*74.5%
*-commutative74.5%
associate-+l-74.5%
associate-*l*74.5%
associate-*l*81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in z around inf 59.6%
*-commutative59.6%
associate-/l*59.2%
associate-*r*59.2%
associate-*l/59.2%
Simplified59.2%
Final simplification54.2%
c\_m = (fabs.f64 c) c\_s = (copysign.f64 #s(literal 1 binary64) c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (if (<= t -9e-70) (/ (/ b c_m) z) (/ (/ b z) c_m))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -9e-70) {
tmp = (b / c_m) / z;
} else {
tmp = (b / z) / c_m;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (t <= (-9d-70)) then
tmp = (b / c_m) / z
else
tmp = (b / z) / c_m
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -9e-70) {
tmp = (b / c_m) / z;
} else {
tmp = (b / z) / c_m;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if t <= -9e-70: tmp = (b / c_m) / z else: tmp = (b / z) / c_m return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (t <= -9e-70) tmp = Float64(Float64(b / c_m) / z); 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])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (t <= -9e-70)
tmp = (b / c_m) / z;
else
tmp = (b / z) / c_m;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[t, -9e-70], N[(N[(b / c$95$m), $MachinePrecision] / z), $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])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{-70}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{z}}{c\_m}\\
\end{array}
\end{array}
if t < -9.00000000000000044e-70Initial program 72.8%
associate-+l-72.8%
*-commutative72.8%
associate-*r*79.8%
*-commutative79.8%
associate-+l-79.8%
associate-*l*79.8%
associate-*l*78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in b around inf 32.2%
associate-/r*39.1%
Simplified39.1%
if -9.00000000000000044e-70 < t Initial program 83.2%
associate-+l-83.2%
*-commutative83.2%
associate-*r*84.7%
*-commutative84.7%
associate-+l-84.7%
associate-*l*84.6%
associate-*l*85.9%
*-commutative85.9%
Simplified85.9%
associate-+l-85.9%
div-sub80.1%
associate-*r*80.2%
*-commutative80.2%
associate-*l*80.2%
*-commutative80.2%
associate-*l*80.2%
Applied egg-rr80.2%
Taylor expanded in c around 0 89.2%
Taylor expanded in b around inf 32.4%
c\_m = (fabs.f64 c) c\_s = (copysign.f64 #s(literal 1 binary64) c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (if (<= t -4.2e-56) (/ (/ b c_m) z) (/ b (* c_m z)))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -4.2e-56) {
tmp = (b / c_m) / z;
} else {
tmp = b / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (t <= (-4.2d-56)) then
tmp = (b / c_m) / z
else
tmp = b / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (t <= -4.2e-56) {
tmp = (b / c_m) / z;
} else {
tmp = b / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if t <= -4.2e-56: tmp = (b / c_m) / z else: tmp = b / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (t <= -4.2e-56) tmp = Float64(Float64(b / c_m) / z); else tmp = Float64(b / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (t <= -4.2e-56)
tmp = (b / c_m) / z;
else
tmp = b / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[t, -4.2e-56], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-56}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\end{array}
\end{array}
if t < -4.20000000000000012e-56Initial program 71.4%
associate-+l-71.4%
*-commutative71.4%
associate-*r*80.0%
*-commutative80.0%
associate-+l-80.0%
associate-*l*80.1%
associate-*l*77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in b around inf 31.3%
associate-/r*38.5%
Simplified38.5%
if -4.20000000000000012e-56 < t Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*84.4%
*-commutative84.4%
associate-+l-84.4%
associate-*l*84.4%
associate-*l*86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in b around inf 33.2%
*-commutative33.2%
Simplified33.2%
Final simplification34.8%
c\_m = (fabs.f64 c) c\_s = (copysign.f64 #s(literal 1 binary64) c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (/ b (* c_m z))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
return c_s * (b / (c_m * z));
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
code = c_s * (b / (c_m * z))
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
return c_s * (b / (c_m * z));
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): return c_s * (b / (c_m * z))
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) return Float64(c_s * Float64(b / Float64(c_m * z))) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp = code(c_s, x, y, z, t, a, b, c_m)
tmp = c_s * (b / (c_m * z));
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \frac{b}{c\_m \cdot z}
\end{array}
Initial program 79.9%
associate-+l-79.9%
*-commutative79.9%
associate-*r*83.1%
*-commutative83.1%
associate-+l-83.1%
associate-*l*83.1%
associate-*l*83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in b around inf 32.6%
*-commutative32.6%
Simplified32.6%
Final simplification32.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024089
(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)))