
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= c_m 2e+104)
(/ (- (+ (* 9.0 (/ (* x y) z)) (/ b z)) (* 4.0 (* a t))) c_m)
(+
(* a (* (/ t c_m) -4.0))
(/ (- (/ b c_m) (* x (* (/ y c_m) -9.0))) z)))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 2e+104) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
} else {
tmp = (a * ((t / c_m) * -4.0)) + (((b / c_m) - (x * ((y / c_m) * -9.0))) / z);
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (c_m <= 2d+104) then
tmp = (((9.0d0 * ((x * y) / z)) + (b / z)) - (4.0d0 * (a * t))) / c_m
else
tmp = (a * ((t / c_m) * (-4.0d0))) + (((b / c_m) - (x * ((y / c_m) * (-9.0d0)))) / z)
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 2e+104) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
} else {
tmp = (a * ((t / c_m) * -4.0)) + (((b / c_m) - (x * ((y / c_m) * -9.0))) / z);
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if c_m <= 2e+104: tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m else: tmp = (a * ((t / c_m) * -4.0)) + (((b / c_m) - (x * ((y / c_m) * -9.0))) / z) return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (c_m <= 2e+104) 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(a * Float64(Float64(t / c_m) * -4.0)) + Float64(Float64(Float64(b / c_m) - Float64(x * Float64(Float64(y / c_m) * -9.0))) / z)); end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (c_m <= 2e+104)
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
else
tmp = (a * ((t / c_m) * -4.0)) + (((b / c_m) - (x * ((y / c_m) * -9.0))) / z);
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 2e+104], 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[(a * N[(N[(t / c$95$m), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b / c$95$m), $MachinePrecision] - N[(x * N[(N[(y / c$95$m), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 2 \cdot 10^{+104}:\\
\;\;\;\;\frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\frac{t}{c\_m} \cdot -4\right) + \frac{\frac{b}{c\_m} - x \cdot \left(\frac{y}{c\_m} \cdot -9\right)}{z}\\
\end{array}
\end{array}
if c < 2e104Initial program 79.7%
associate-+l-79.7%
*-commutative79.7%
associate-*r*79.8%
*-commutative79.8%
associate-+l-79.8%
associate-*l*79.8%
associate-*l*78.8%
*-commutative78.8%
Simplified78.8%
Taylor expanded in x around 0 74.6%
Taylor expanded in c around 0 85.5%
if 2e104 < c Initial program 64.1%
associate-+l-64.1%
*-commutative64.1%
associate-*r*64.0%
*-commutative64.0%
associate-+l-64.0%
associate-*l*64.1%
associate-*l*61.9%
*-commutative61.9%
Simplified61.9%
Taylor expanded in x around 0 78.5%
cancel-sign-sub-inv78.5%
metadata-eval78.5%
+-commutative78.5%
*-commutative78.5%
fma-define78.5%
associate-/l*78.7%
fma-define78.7%
times-frac87.9%
*-commutative87.9%
Simplified87.9%
Taylor expanded in z around -inf 82.1%
associate-*r/82.1%
associate-*r*82.1%
mul-1-neg82.1%
unsub-neg82.1%
associate-*r/82.2%
associate-*r*82.2%
*-commutative82.2%
associate-*l*82.2%
mul-1-neg82.2%
unsub-neg82.2%
*-commutative82.2%
associate-/l*92.7%
associate-*l*92.6%
Simplified92.6%
Final simplification86.6%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* 9.0 (* (/ y z) (/ x c_m)))) (t_2 (* -4.0 (* a (/ t c_m)))))
(*
c_s
(if (<= a -6.4e-102)
t_2
(if (<= a -5.8e-149)
t_1
(if (<= a -2.2e-162)
(/ (* (* a t) -4.0) c_m)
(if (<= a 3.7e-197)
(/ b (* c_m z))
(if (<= a 1.4e-159)
t_1
(if (<= a 1.02e+58) (* b (/ 1.0 (* c_m z))) 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * ((y / z) * (x / c_m));
double t_2 = -4.0 * (a * (t / c_m));
double tmp;
if (a <= -6.4e-102) {
tmp = t_2;
} else if (a <= -5.8e-149) {
tmp = t_1;
} else if (a <= -2.2e-162) {
tmp = ((a * t) * -4.0) / c_m;
} else if (a <= 3.7e-197) {
tmp = b / (c_m * z);
} else if (a <= 1.4e-159) {
tmp = t_1;
} else if (a <= 1.02e+58) {
tmp = b * (1.0 / (c_m * z));
} 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.
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 = 9.0d0 * ((y / z) * (x / c_m))
t_2 = (-4.0d0) * (a * (t / c_m))
if (a <= (-6.4d-102)) then
tmp = t_2
else if (a <= (-5.8d-149)) then
tmp = t_1
else if (a <= (-2.2d-162)) then
tmp = ((a * t) * (-4.0d0)) / c_m
else if (a <= 3.7d-197) then
tmp = b / (c_m * z)
else if (a <= 1.4d-159) then
tmp = t_1
else if (a <= 1.02d+58) then
tmp = b * (1.0d0 / (c_m * z))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 9.0 * ((y / z) * (x / c_m));
double t_2 = -4.0 * (a * (t / c_m));
double tmp;
if (a <= -6.4e-102) {
tmp = t_2;
} else if (a <= -5.8e-149) {
tmp = t_1;
} else if (a <= -2.2e-162) {
tmp = ((a * t) * -4.0) / c_m;
} else if (a <= 3.7e-197) {
tmp = b / (c_m * z);
} else if (a <= 1.4e-159) {
tmp = t_1;
} else if (a <= 1.02e+58) {
tmp = b * (1.0 / (c_m * z));
} 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]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = 9.0 * ((y / z) * (x / c_m)) t_2 = -4.0 * (a * (t / c_m)) tmp = 0 if a <= -6.4e-102: tmp = t_2 elif a <= -5.8e-149: tmp = t_1 elif a <= -2.2e-162: tmp = ((a * t) * -4.0) / c_m elif a <= 3.7e-197: tmp = b / (c_m * z) elif a <= 1.4e-159: tmp = t_1 elif a <= 1.02e+58: tmp = b * (1.0 / (c_m * z)) 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]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c_m))) t_2 = Float64(-4.0 * Float64(a * Float64(t / c_m))) tmp = 0.0 if (a <= -6.4e-102) tmp = t_2; elseif (a <= -5.8e-149) tmp = t_1; elseif (a <= -2.2e-162) tmp = Float64(Float64(Float64(a * t) * -4.0) / c_m); elseif (a <= 3.7e-197) tmp = Float64(b / Float64(c_m * z)); elseif (a <= 1.4e-159) tmp = t_1; elseif (a <= 1.02e+58) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); 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])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = 9.0 * ((y / z) * (x / c_m));
t_2 = -4.0 * (a * (t / c_m));
tmp = 0.0;
if (a <= -6.4e-102)
tmp = t_2;
elseif (a <= -5.8e-149)
tmp = t_1;
elseif (a <= -2.2e-162)
tmp = ((a * t) * -4.0) / c_m;
elseif (a <= 3.7e-197)
tmp = b / (c_m * z);
elseif (a <= 1.4e-159)
tmp = t_1;
elseif (a <= 1.02e+58)
tmp = b * (1.0 / (c_m * z));
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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -6.4e-102], t$95$2, If[LessEqual[a, -5.8e-149], t$95$1, If[LessEqual[a, -2.2e-162], N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[a, 3.7e-197], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.4e-159], t$95$1, If[LessEqual[a, 1.02e+58], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c\_m}\right)\\
t_2 := -4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -6.4 \cdot 10^{-102}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -5.8 \cdot 10^{-149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.2 \cdot 10^{-162}:\\
\;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\
\mathbf{elif}\;a \leq 3.7 \cdot 10^{-197}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.02 \cdot 10^{+58}:\\
\;\;\;\;b \cdot \frac{1}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if a < -6.39999999999999973e-102 or 1.02000000000000005e58 < a Initial program 72.8%
associate-+l-72.8%
*-commutative72.8%
associate-*r*70.4%
*-commutative70.4%
associate-+l-70.4%
associate-*l*70.5%
associate-*l*67.4%
*-commutative67.4%
Simplified67.4%
Taylor expanded in z around inf 49.1%
*-commutative49.1%
associate-/l*55.8%
Simplified55.8%
if -6.39999999999999973e-102 < a < -5.8e-149 or 3.6999999999999999e-197 < a < 1.4000000000000001e-159Initial program 61.4%
associate-+l-61.4%
*-commutative61.4%
associate-*r*70.4%
*-commutative70.4%
associate-+l-70.4%
associate-*l*70.5%
associate-*l*70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in x around inf 38.9%
times-frac43.0%
Simplified43.0%
if -5.8e-149 < a < -2.1999999999999999e-162Initial program 80.7%
associate-+l-80.7%
*-commutative80.7%
associate-*r*99.7%
*-commutative99.7%
associate-+l-99.7%
associate-*l*99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in z around inf 61.0%
associate-*r/61.0%
Simplified61.0%
if -2.1999999999999999e-162 < a < 3.6999999999999999e-197Initial program 86.0%
associate-+l-86.0%
*-commutative86.0%
associate-*r*89.5%
*-commutative89.5%
associate-+l-89.5%
associate-*l*89.5%
associate-*l*89.6%
*-commutative89.6%
Simplified89.6%
Taylor expanded in b around inf 53.0%
*-commutative53.0%
Simplified53.0%
if 1.4000000000000001e-159 < a < 1.02000000000000005e58Initial program 85.1%
associate-+l-85.1%
*-commutative85.1%
associate-*r*81.5%
*-commutative81.5%
associate-+l-81.5%
associate-*l*81.6%
associate-*l*83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in b around inf 51.0%
*-commutative51.0%
Simplified51.0%
div-inv51.0%
Applied egg-rr51.0%
Final simplification53.3%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* a (/ t c_m)))))
(*
c_s
(if (<= a -3.2e-97)
t_1
(if (<= a -1.45e-148)
(* 9.0 (* (/ y c_m) (/ x z)))
(if (<= a -7.5e-163)
(/ (* (* a t) -4.0) c_m)
(if (<= a 4.9e-197)
(/ b (* c_m z))
(if (<= a 4.4e-160)
(* 9.0 (* (/ y z) (/ x c_m)))
(if (<= a 1.65e+58) (* b (/ 1.0 (* c_m z))) t_1)))))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (a * (t / c_m));
double tmp;
if (a <= -3.2e-97) {
tmp = t_1;
} else if (a <= -1.45e-148) {
tmp = 9.0 * ((y / c_m) * (x / z));
} else if (a <= -7.5e-163) {
tmp = ((a * t) * -4.0) / c_m;
} else if (a <= 4.9e-197) {
tmp = b / (c_m * z);
} else if (a <= 4.4e-160) {
tmp = 9.0 * ((y / z) * (x / c_m));
} else if (a <= 1.65e+58) {
tmp = b * (1.0 / (c_m * z));
} else {
tmp = t_1;
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (a * (t / c_m))
if (a <= (-3.2d-97)) then
tmp = t_1
else if (a <= (-1.45d-148)) then
tmp = 9.0d0 * ((y / c_m) * (x / z))
else if (a <= (-7.5d-163)) then
tmp = ((a * t) * (-4.0d0)) / c_m
else if (a <= 4.9d-197) then
tmp = b / (c_m * z)
else if (a <= 4.4d-160) then
tmp = 9.0d0 * ((y / z) * (x / c_m))
else if (a <= 1.65d+58) then
tmp = b * (1.0d0 / (c_m * z))
else
tmp = t_1
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (a * (t / c_m));
double tmp;
if (a <= -3.2e-97) {
tmp = t_1;
} else if (a <= -1.45e-148) {
tmp = 9.0 * ((y / c_m) * (x / z));
} else if (a <= -7.5e-163) {
tmp = ((a * t) * -4.0) / c_m;
} else if (a <= 4.9e-197) {
tmp = b / (c_m * z);
} else if (a <= 4.4e-160) {
tmp = 9.0 * ((y / z) * (x / c_m));
} else if (a <= 1.65e+58) {
tmp = b * (1.0 / (c_m * z));
} else {
tmp = t_1;
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = -4.0 * (a * (t / c_m)) tmp = 0 if a <= -3.2e-97: tmp = t_1 elif a <= -1.45e-148: tmp = 9.0 * ((y / c_m) * (x / z)) elif a <= -7.5e-163: tmp = ((a * t) * -4.0) / c_m elif a <= 4.9e-197: tmp = b / (c_m * z) elif a <= 4.4e-160: tmp = 9.0 * ((y / z) * (x / c_m)) elif a <= 1.65e+58: tmp = b * (1.0 / (c_m * z)) else: tmp = t_1 return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(-4.0 * Float64(a * Float64(t / c_m))) tmp = 0.0 if (a <= -3.2e-97) tmp = t_1; elseif (a <= -1.45e-148) tmp = Float64(9.0 * Float64(Float64(y / c_m) * Float64(x / z))); elseif (a <= -7.5e-163) tmp = Float64(Float64(Float64(a * t) * -4.0) / c_m); elseif (a <= 4.9e-197) tmp = Float64(b / Float64(c_m * z)); elseif (a <= 4.4e-160) tmp = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c_m))); elseif (a <= 1.65e+58) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); else tmp = t_1; end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = -4.0 * (a * (t / c_m));
tmp = 0.0;
if (a <= -3.2e-97)
tmp = t_1;
elseif (a <= -1.45e-148)
tmp = 9.0 * ((y / c_m) * (x / z));
elseif (a <= -7.5e-163)
tmp = ((a * t) * -4.0) / c_m;
elseif (a <= 4.9e-197)
tmp = b / (c_m * z);
elseif (a <= 4.4e-160)
tmp = 9.0 * ((y / z) * (x / c_m));
elseif (a <= 1.65e+58)
tmp = b * (1.0 / (c_m * z));
else
tmp = t_1;
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -3.2e-97], t$95$1, If[LessEqual[a, -1.45e-148], N[(9.0 * N[(N[(y / c$95$m), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -7.5e-163], N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[a, 4.9e-197], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.4e-160], N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.65e+58], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]), $MachinePrecision]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{-97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.45 \cdot 10^{-148}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c\_m} \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{-163}:\\
\;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\
\mathbf{elif}\;a \leq 4.9 \cdot 10^{-197}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{-160}:\\
\;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c\_m}\right)\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{+58}:\\
\;\;\;\;b \cdot \frac{1}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if a < -3.1999999999999998e-97 or 1.64999999999999991e58 < a Initial program 73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*70.9%
*-commutative70.9%
associate-+l-70.9%
associate-*l*70.9%
associate-*l*67.8%
*-commutative67.8%
Simplified67.8%
Taylor expanded in z around inf 49.5%
*-commutative49.5%
associate-/l*56.3%
Simplified56.3%
if -3.1999999999999998e-97 < a < -1.4499999999999999e-148Initial program 60.0%
associate-+l-60.0%
*-commutative60.0%
associate-*r*66.9%
*-commutative66.9%
associate-+l-66.9%
associate-*l*66.9%
associate-*l*66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in x around inf 24.8%
*-commutative24.8%
Simplified24.8%
times-frac44.3%
Applied egg-rr44.3%
if -1.4499999999999999e-148 < a < -7.49999999999999996e-163Initial program 80.7%
associate-+l-80.7%
*-commutative80.7%
associate-*r*99.7%
*-commutative99.7%
associate-+l-99.7%
associate-*l*99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in z around inf 61.0%
associate-*r/61.0%
Simplified61.0%
if -7.49999999999999996e-163 < a < 4.9000000000000002e-197Initial program 86.0%
associate-+l-86.0%
*-commutative86.0%
associate-*r*89.5%
*-commutative89.5%
associate-+l-89.5%
associate-*l*89.5%
associate-*l*89.6%
*-commutative89.6%
Simplified89.6%
Taylor expanded in b around inf 53.0%
*-commutative53.0%
Simplified53.0%
if 4.9000000000000002e-197 < a < 4.4e-160Initial program 57.9%
associate-+l-57.9%
*-commutative57.9%
associate-*r*69.3%
*-commutative69.3%
associate-+l-69.3%
associate-*l*69.5%
associate-*l*69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in x around inf 57.9%
times-frac46.8%
Simplified46.8%
if 4.4e-160 < a < 1.64999999999999991e58Initial program 85.1%
associate-+l-85.1%
*-commutative85.1%
associate-*r*81.5%
*-commutative81.5%
associate-+l-81.5%
associate-*l*81.6%
associate-*l*83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in b around inf 51.0%
*-commutative51.0%
Simplified51.0%
div-inv51.0%
Applied egg-rr51.0%
Final simplification53.7%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* a (/ t c_m)))))
(*
c_s
(if (<= a -7.5e-97)
t_1
(if (<= a -1.6e-148)
(* 9.0 (* (/ y c_m) (/ x z)))
(if (<= a -7e-164)
(/ (* (* a t) -4.0) c_m)
(if (<= a 3.6e-196)
(/ b (* c_m z))
(if (<= a 2.05e-107)
(* 9.0 (/ (* x y) (* c_m z)))
(if (<= a 1.9e+59) (* b (/ 1.0 (* c_m z))) t_1)))))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (a * (t / c_m));
double tmp;
if (a <= -7.5e-97) {
tmp = t_1;
} else if (a <= -1.6e-148) {
tmp = 9.0 * ((y / c_m) * (x / z));
} else if (a <= -7e-164) {
tmp = ((a * t) * -4.0) / c_m;
} else if (a <= 3.6e-196) {
tmp = b / (c_m * z);
} else if (a <= 2.05e-107) {
tmp = 9.0 * ((x * y) / (c_m * z));
} else if (a <= 1.9e+59) {
tmp = b * (1.0 / (c_m * z));
} else {
tmp = t_1;
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (a * (t / c_m))
if (a <= (-7.5d-97)) then
tmp = t_1
else if (a <= (-1.6d-148)) then
tmp = 9.0d0 * ((y / c_m) * (x / z))
else if (a <= (-7d-164)) then
tmp = ((a * t) * (-4.0d0)) / c_m
else if (a <= 3.6d-196) then
tmp = b / (c_m * z)
else if (a <= 2.05d-107) then
tmp = 9.0d0 * ((x * y) / (c_m * z))
else if (a <= 1.9d+59) then
tmp = b * (1.0d0 / (c_m * z))
else
tmp = t_1
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (a * (t / c_m));
double tmp;
if (a <= -7.5e-97) {
tmp = t_1;
} else if (a <= -1.6e-148) {
tmp = 9.0 * ((y / c_m) * (x / z));
} else if (a <= -7e-164) {
tmp = ((a * t) * -4.0) / c_m;
} else if (a <= 3.6e-196) {
tmp = b / (c_m * z);
} else if (a <= 2.05e-107) {
tmp = 9.0 * ((x * y) / (c_m * z));
} else if (a <= 1.9e+59) {
tmp = b * (1.0 / (c_m * z));
} else {
tmp = t_1;
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = -4.0 * (a * (t / c_m)) tmp = 0 if a <= -7.5e-97: tmp = t_1 elif a <= -1.6e-148: tmp = 9.0 * ((y / c_m) * (x / z)) elif a <= -7e-164: tmp = ((a * t) * -4.0) / c_m elif a <= 3.6e-196: tmp = b / (c_m * z) elif a <= 2.05e-107: tmp = 9.0 * ((x * y) / (c_m * z)) elif a <= 1.9e+59: tmp = b * (1.0 / (c_m * z)) else: tmp = t_1 return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(-4.0 * Float64(a * Float64(t / c_m))) tmp = 0.0 if (a <= -7.5e-97) tmp = t_1; elseif (a <= -1.6e-148) tmp = Float64(9.0 * Float64(Float64(y / c_m) * Float64(x / z))); elseif (a <= -7e-164) tmp = Float64(Float64(Float64(a * t) * -4.0) / c_m); elseif (a <= 3.6e-196) tmp = Float64(b / Float64(c_m * z)); elseif (a <= 2.05e-107) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c_m * z))); elseif (a <= 1.9e+59) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); else tmp = t_1; end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = -4.0 * (a * (t / c_m));
tmp = 0.0;
if (a <= -7.5e-97)
tmp = t_1;
elseif (a <= -1.6e-148)
tmp = 9.0 * ((y / c_m) * (x / z));
elseif (a <= -7e-164)
tmp = ((a * t) * -4.0) / c_m;
elseif (a <= 3.6e-196)
tmp = b / (c_m * z);
elseif (a <= 2.05e-107)
tmp = 9.0 * ((x * y) / (c_m * z));
elseif (a <= 1.9e+59)
tmp = b * (1.0 / (c_m * z));
else
tmp = t_1;
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -7.5e-97], t$95$1, If[LessEqual[a, -1.6e-148], N[(9.0 * N[(N[(y / c$95$m), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -7e-164], N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[a, 3.6e-196], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.05e-107], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.9e+59], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]), $MachinePrecision]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.6 \cdot 10^{-148}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c\_m} \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;a \leq -7 \cdot 10^{-164}:\\
\;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-196}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;a \leq 2.05 \cdot 10^{-107}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{c\_m \cdot z}\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{+59}:\\
\;\;\;\;b \cdot \frac{1}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if a < -7.5e-97 or 1.9e59 < a Initial program 73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*70.9%
*-commutative70.9%
associate-+l-70.9%
associate-*l*70.9%
associate-*l*67.8%
*-commutative67.8%
Simplified67.8%
Taylor expanded in z around inf 49.5%
*-commutative49.5%
associate-/l*56.3%
Simplified56.3%
if -7.5e-97 < a < -1.59999999999999997e-148Initial program 60.0%
associate-+l-60.0%
*-commutative60.0%
associate-*r*66.9%
*-commutative66.9%
associate-+l-66.9%
associate-*l*66.9%
associate-*l*66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in x around inf 24.8%
*-commutative24.8%
Simplified24.8%
times-frac44.3%
Applied egg-rr44.3%
if -1.59999999999999997e-148 < a < -6.9999999999999999e-164Initial program 83.6%
associate-+l-83.6%
*-commutative83.6%
associate-*r*99.5%
*-commutative99.5%
associate-+l-99.5%
associate-*l*99.5%
associate-*l*99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in z around inf 51.1%
associate-*r/51.1%
Simplified51.1%
if -6.9999999999999999e-164 < a < 3.6000000000000001e-196Initial program 85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*89.4%
*-commutative89.4%
associate-+l-89.4%
associate-*l*89.3%
associate-*l*89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in b around inf 53.9%
*-commutative53.9%
Simplified53.9%
if 3.6000000000000001e-196 < a < 2.05e-107Initial program 73.7%
associate-+l-73.7%
*-commutative73.7%
associate-*r*79.4%
*-commutative79.4%
associate-+l-79.4%
associate-*l*79.5%
associate-*l*79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in x around inf 53.3%
*-commutative53.3%
Simplified53.3%
if 2.05e-107 < a < 1.9e59Initial program 84.1%
associate-+l-84.1%
*-commutative84.1%
associate-*r*79.7%
*-commutative79.7%
associate-+l-79.7%
associate-*l*79.8%
associate-*l*81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in b around inf 54.6%
*-commutative54.6%
Simplified54.6%
div-inv54.5%
Applied egg-rr54.5%
Final simplification54.5%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* a (/ t c_m)))))
(*
c_s
(if (<= a -7e-97)
t_1
(if (<= a -8.2e-148)
(* (* x (/ y z)) (/ 9.0 c_m))
(if (<= a -1.9e-164)
(/ (* (* a t) -4.0) c_m)
(if (<= a 9e-196)
(/ b (* c_m z))
(if (<= a 3.6e-107)
(* 9.0 (/ (* x y) (* c_m z)))
(if (<= a 1e+58) (* b (/ 1.0 (* c_m z))) t_1)))))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (a * (t / c_m));
double tmp;
if (a <= -7e-97) {
tmp = t_1;
} else if (a <= -8.2e-148) {
tmp = (x * (y / z)) * (9.0 / c_m);
} else if (a <= -1.9e-164) {
tmp = ((a * t) * -4.0) / c_m;
} else if (a <= 9e-196) {
tmp = b / (c_m * z);
} else if (a <= 3.6e-107) {
tmp = 9.0 * ((x * y) / (c_m * z));
} else if (a <= 1e+58) {
tmp = b * (1.0 / (c_m * z));
} else {
tmp = t_1;
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (a * (t / c_m))
if (a <= (-7d-97)) then
tmp = t_1
else if (a <= (-8.2d-148)) then
tmp = (x * (y / z)) * (9.0d0 / c_m)
else if (a <= (-1.9d-164)) then
tmp = ((a * t) * (-4.0d0)) / c_m
else if (a <= 9d-196) then
tmp = b / (c_m * z)
else if (a <= 3.6d-107) then
tmp = 9.0d0 * ((x * y) / (c_m * z))
else if (a <= 1d+58) then
tmp = b * (1.0d0 / (c_m * z))
else
tmp = t_1
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (a * (t / c_m));
double tmp;
if (a <= -7e-97) {
tmp = t_1;
} else if (a <= -8.2e-148) {
tmp = (x * (y / z)) * (9.0 / c_m);
} else if (a <= -1.9e-164) {
tmp = ((a * t) * -4.0) / c_m;
} else if (a <= 9e-196) {
tmp = b / (c_m * z);
} else if (a <= 3.6e-107) {
tmp = 9.0 * ((x * y) / (c_m * z));
} else if (a <= 1e+58) {
tmp = b * (1.0 / (c_m * z));
} else {
tmp = t_1;
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = -4.0 * (a * (t / c_m)) tmp = 0 if a <= -7e-97: tmp = t_1 elif a <= -8.2e-148: tmp = (x * (y / z)) * (9.0 / c_m) elif a <= -1.9e-164: tmp = ((a * t) * -4.0) / c_m elif a <= 9e-196: tmp = b / (c_m * z) elif a <= 3.6e-107: tmp = 9.0 * ((x * y) / (c_m * z)) elif a <= 1e+58: tmp = b * (1.0 / (c_m * z)) else: tmp = t_1 return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(-4.0 * Float64(a * Float64(t / c_m))) tmp = 0.0 if (a <= -7e-97) tmp = t_1; elseif (a <= -8.2e-148) tmp = Float64(Float64(x * Float64(y / z)) * Float64(9.0 / c_m)); elseif (a <= -1.9e-164) tmp = Float64(Float64(Float64(a * t) * -4.0) / c_m); elseif (a <= 9e-196) tmp = Float64(b / Float64(c_m * z)); elseif (a <= 3.6e-107) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c_m * z))); elseif (a <= 1e+58) tmp = Float64(b * Float64(1.0 / Float64(c_m * z))); else tmp = t_1; end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = -4.0 * (a * (t / c_m));
tmp = 0.0;
if (a <= -7e-97)
tmp = t_1;
elseif (a <= -8.2e-148)
tmp = (x * (y / z)) * (9.0 / c_m);
elseif (a <= -1.9e-164)
tmp = ((a * t) * -4.0) / c_m;
elseif (a <= 9e-196)
tmp = b / (c_m * z);
elseif (a <= 3.6e-107)
tmp = 9.0 * ((x * y) / (c_m * z));
elseif (a <= 1e+58)
tmp = b * (1.0 / (c_m * z));
else
tmp = t_1;
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -7e-97], t$95$1, If[LessEqual[a, -8.2e-148], N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] * N[(9.0 / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.9e-164], N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[a, 9e-196], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e-107], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1e+58], N[(b * N[(1.0 / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]), $MachinePrecision]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{-97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -8.2 \cdot 10^{-148}:\\
\;\;\;\;\left(x \cdot \frac{y}{z}\right) \cdot \frac{9}{c\_m}\\
\mathbf{elif}\;a \leq -1.9 \cdot 10^{-164}:\\
\;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-196}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-107}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{c\_m \cdot z}\\
\mathbf{elif}\;a \leq 10^{+58}:\\
\;\;\;\;b \cdot \frac{1}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if a < -7.00000000000000038e-97 or 9.99999999999999944e57 < a Initial program 73.3%
associate-+l-73.3%
*-commutative73.3%
associate-*r*70.9%
*-commutative70.9%
associate-+l-70.9%
associate-*l*70.9%
associate-*l*67.8%
*-commutative67.8%
Simplified67.8%
Taylor expanded in z around inf 49.5%
*-commutative49.5%
associate-/l*56.3%
Simplified56.3%
if -7.00000000000000038e-97 < a < -8.2000000000000005e-148Initial program 60.0%
associate-+l-60.0%
*-commutative60.0%
associate-*r*66.9%
*-commutative66.9%
associate-+l-66.9%
associate-*l*66.9%
associate-*l*66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in x around 0 66.0%
cancel-sign-sub-inv66.0%
metadata-eval66.0%
+-commutative66.0%
*-commutative66.0%
fma-define66.0%
associate-/l*52.2%
fma-define52.3%
times-frac45.7%
*-commutative45.7%
Simplified45.7%
Taylor expanded in x around inf 24.8%
associate-*r/24.8%
*-commutative24.8%
*-commutative24.8%
times-frac31.5%
associate-*r/37.8%
Simplified37.8%
if -8.2000000000000005e-148 < a < -1.89999999999999995e-164Initial program 83.6%
associate-+l-83.6%
*-commutative83.6%
associate-*r*99.5%
*-commutative99.5%
associate-+l-99.5%
associate-*l*99.5%
associate-*l*99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in z around inf 51.1%
associate-*r/51.1%
Simplified51.1%
if -1.89999999999999995e-164 < a < 9e-196Initial program 85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*89.4%
*-commutative89.4%
associate-+l-89.4%
associate-*l*89.3%
associate-*l*89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in b around inf 53.9%
*-commutative53.9%
Simplified53.9%
if 9e-196 < a < 3.59999999999999976e-107Initial program 73.7%
associate-+l-73.7%
*-commutative73.7%
associate-*r*79.4%
*-commutative79.4%
associate-+l-79.4%
associate-*l*79.5%
associate-*l*79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in x around inf 53.3%
*-commutative53.3%
Simplified53.3%
if 3.59999999999999976e-107 < a < 9.99999999999999944e57Initial program 84.1%
associate-+l-84.1%
*-commutative84.1%
associate-*r*79.7%
*-commutative79.7%
associate-+l-79.7%
associate-*l*79.8%
associate-*l*81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in b around inf 54.6%
*-commutative54.6%
Simplified54.6%
div-inv54.5%
Applied egg-rr54.5%
Final simplification54.2%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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+31) (not (<= z 1.55e+17)))
(/ (- (+ (* 9.0 (/ (* x y) z)) (/ b z)) (* 4.0 (* a t))) c_m)
(/ (+ b (- (* x (* 9.0 y)) (* (* 4.0 t) (* z a)))) (* c_m z)))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -2e+31) || !(z <= 1.55e+17)) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
} else {
tmp = (b + ((x * (9.0 * y)) - ((4.0 * t) * (z * a)))) / (c_m * z);
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((z <= (-2d+31)) .or. (.not. (z <= 1.55d+17))) then
tmp = (((9.0d0 * ((x * y) / z)) + (b / z)) - (4.0d0 * (a * t))) / c_m
else
tmp = (b + ((x * (9.0d0 * y)) - ((4.0d0 * t) * (z * a)))) / (c_m * z)
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -2e+31) || !(z <= 1.55e+17)) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
} else {
tmp = (b + ((x * (9.0 * y)) - ((4.0 * t) * (z * a)))) / (c_m * z);
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -2e+31) or not (z <= 1.55e+17): tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m else: tmp = (b + ((x * (9.0 * y)) - ((4.0 * t) * (z * a)))) / (c_m * z) return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -2e+31) || !(z <= 1.55e+17)) 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(x * Float64(9.0 * y)) - Float64(Float64(4.0 * t) * Float64(z * a)))) / 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])){:}
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+31) || ~((z <= 1.55e+17)))
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - (4.0 * (a * t))) / c_m;
else
tmp = (b + ((x * (9.0 * y)) - ((4.0 * t) * (z * a)))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -2e+31], N[Not[LessEqual[z, 1.55e+17]], $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[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * t), $MachinePrecision] * N[(z * a), $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])\\\\
[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^{+31} \lor \neg \left(z \leq 1.55 \cdot 10^{+17}\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(x \cdot \left(9 \cdot y\right) - \left(4 \cdot t\right) \cdot \left(z \cdot a\right)\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -1.9999999999999999e31 or 1.55e17 < z Initial program 56.2%
associate-+l-56.2%
*-commutative56.2%
associate-*r*55.6%
*-commutative55.6%
associate-+l-55.6%
associate-*l*55.6%
associate-*l*59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in x around 0 81.9%
Taylor expanded in c around 0 87.7%
if -1.9999999999999999e31 < z < 1.55e17Initial program 93.0%
associate-+l-93.0%
*-commutative93.0%
associate-*r*93.6%
*-commutative93.6%
associate-+l-93.6%
associate-*l*93.6%
associate-*l*88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in z around 0 93.0%
*-commutative93.0%
associate-*r*93.0%
associate-*l*93.0%
associate-*l*93.6%
*-commutative93.6%
Simplified93.6%
Final simplification91.1%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 -7.8e+121)
(/ (+ (/ b z) (* t (* a -4.0))) c_m)
(if (<= z 9.2e+48)
(/ (+ b (- (* x (* 9.0 y)) (* (* 4.0 t) (* z a)))) (* c_m z))
(/ (- (* 9.0 (* x (/ y z))) (* 4.0 (* a t))) c_m)))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -7.8e+121) {
tmp = ((b / z) + (t * (a * -4.0))) / c_m;
} else if (z <= 9.2e+48) {
tmp = (b + ((x * (9.0 * y)) - ((4.0 * t) * (z * a)))) / (c_m * z);
} else {
tmp = ((9.0 * (x * (y / z))) - (4.0 * (a * t))) / c_m;
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (z <= (-7.8d+121)) then
tmp = ((b / z) + (t * (a * (-4.0d0)))) / c_m
else if (z <= 9.2d+48) then
tmp = (b + ((x * (9.0d0 * y)) - ((4.0d0 * t) * (z * a)))) / (c_m * z)
else
tmp = ((9.0d0 * (x * (y / z))) - (4.0d0 * (a * t))) / c_m
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -7.8e+121) {
tmp = ((b / z) + (t * (a * -4.0))) / c_m;
} else if (z <= 9.2e+48) {
tmp = (b + ((x * (9.0 * y)) - ((4.0 * t) * (z * a)))) / (c_m * z);
} else {
tmp = ((9.0 * (x * (y / z))) - (4.0 * (a * t))) / c_m;
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if z <= -7.8e+121: tmp = ((b / z) + (t * (a * -4.0))) / c_m elif z <= 9.2e+48: tmp = (b + ((x * (9.0 * y)) - ((4.0 * t) * (z * a)))) / (c_m * z) else: tmp = ((9.0 * (x * (y / z))) - (4.0 * (a * t))) / c_m return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (z <= -7.8e+121) tmp = Float64(Float64(Float64(b / z) + Float64(t * Float64(a * -4.0))) / c_m); elseif (z <= 9.2e+48) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(4.0 * t) * Float64(z * a)))) / Float64(c_m * z)); else tmp = Float64(Float64(Float64(9.0 * Float64(x * Float64(y / z))) - Float64(4.0 * Float64(a * t))) / c_m); end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (z <= -7.8e+121)
tmp = ((b / z) + (t * (a * -4.0))) / c_m;
elseif (z <= 9.2e+48)
tmp = (b + ((x * (9.0 * y)) - ((4.0 * t) * (z * a)))) / (c_m * z);
else
tmp = ((9.0 * (x * (y / z))) - (4.0 * (a * t))) / c_m;
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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, -7.8e+121], N[(N[(N[(b / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[z, 9.2e+48], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * t), $MachinePrecision] * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(9.0 * N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+121}:\\
\;\;\;\;\frac{\frac{b}{z} + t \cdot \left(a \cdot -4\right)}{c\_m}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+48}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(4 \cdot t\right) \cdot \left(z \cdot a\right)\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot \frac{y}{z}\right) - 4 \cdot \left(a \cdot t\right)}{c\_m}\\
\end{array}
\end{array}
if z < -7.79999999999999967e121Initial program 42.1%
associate-+l-42.1%
*-commutative42.1%
associate-*r*42.7%
*-commutative42.7%
associate-+l-42.7%
associate-*l*42.7%
associate-*l*46.9%
*-commutative46.9%
Simplified46.9%
Taylor expanded in x around 0 75.8%
cancel-sign-sub-inv75.8%
metadata-eval75.8%
+-commutative75.8%
*-commutative75.8%
fma-define75.8%
associate-/l*80.4%
fma-define80.4%
times-frac90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in x around 0 73.5%
associate-/r*73.5%
+-commutative73.5%
metadata-eval73.5%
associate-*r/82.7%
cancel-sign-sub-inv82.7%
associate-/l/82.7%
*-rgt-identity82.7%
times-frac87.2%
*-commutative87.2%
associate-*l/87.2%
*-lft-identity87.2%
associate-*r/78.0%
associate-*r/78.0%
div-sub78.0%
cancel-sign-sub-inv78.0%
metadata-eval78.0%
associate-*r*78.0%
*-commutative78.0%
*-commutative78.0%
Simplified78.0%
if -7.79999999999999967e121 < z < 9.2000000000000001e48Initial program 90.6%
associate-+l-90.6%
*-commutative90.6%
associate-*r*90.0%
*-commutative90.0%
associate-+l-90.0%
associate-*l*90.0%
associate-*l*86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in z around 0 90.6%
*-commutative90.6%
associate-*r*90.6%
associate-*l*90.6%
associate-*l*90.0%
*-commutative90.0%
Simplified90.0%
if 9.2000000000000001e48 < z Initial program 58.5%
associate-+l-58.5%
*-commutative58.5%
associate-*r*60.7%
*-commutative60.7%
associate-+l-60.7%
associate-*l*60.7%
associate-*l*63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in x around 0 90.9%
Taylor expanded in c around 0 97.8%
Taylor expanded in x around inf 85.5%
associate-*r/87.5%
Simplified87.5%
Final simplification87.6%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 -3.2e+122)
(/ (+ (/ b z) (* t (* a -4.0))) c_m)
(if (<= z 1.85e+52)
(/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* c_m z))
(/ (- (* 9.0 (* x (/ y z))) (* 4.0 (* a t))) c_m)))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
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 <= -3.2e+122) {
tmp = ((b / z) + (t * (a * -4.0))) / c_m;
} else if (z <= 1.85e+52) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
} else {
tmp = ((9.0 * (x * (y / z))) - (4.0 * (a * t))) / c_m;
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (z <= (-3.2d+122)) then
tmp = ((b / z) + (t * (a * (-4.0d0)))) / c_m
else if (z <= 1.85d+52) then
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (c_m * z)
else
tmp = ((9.0d0 * (x * (y / z))) - (4.0d0 * (a * t))) / c_m
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (z <= -3.2e+122) {
tmp = ((b / z) + (t * (a * -4.0))) / c_m;
} else if (z <= 1.85e+52) {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
} else {
tmp = ((9.0 * (x * (y / z))) - (4.0 * (a * t))) / c_m;
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [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 <= -3.2e+122: tmp = ((b / z) + (t * (a * -4.0))) / c_m elif z <= 1.85e+52: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z) else: tmp = ((9.0 * (x * (y / z))) - (4.0 * (a * t))) / c_m return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) 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 <= -3.2e+122) tmp = Float64(Float64(Float64(b / z) + Float64(t * Float64(a * -4.0))) / c_m); elseif (z <= 1.85e+52) tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c_m * z)); else tmp = Float64(Float64(Float64(9.0 * Float64(x * Float64(y / z))) - Float64(4.0 * Float64(a * t))) / c_m); end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
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 <= -3.2e+122)
tmp = ((b / z) + (t * (a * -4.0))) / c_m;
elseif (z <= 1.85e+52)
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (c_m * z);
else
tmp = ((9.0 * (x * (y / z))) - (4.0 * (a * t))) / c_m;
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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, -3.2e+122], N[(N[(N[(b / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[z, 1.85e+52], 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], N[(N[(N[(9.0 * N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+122}:\\
\;\;\;\;\frac{\frac{b}{z} + t \cdot \left(a \cdot -4\right)}{c\_m}\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+52}:\\
\;\;\;\;\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}\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot \frac{y}{z}\right) - 4 \cdot \left(a \cdot t\right)}{c\_m}\\
\end{array}
\end{array}
if z < -3.20000000000000012e122Initial program 42.1%
associate-+l-42.1%
*-commutative42.1%
associate-*r*42.7%
*-commutative42.7%
associate-+l-42.7%
associate-*l*42.7%
associate-*l*46.9%
*-commutative46.9%
Simplified46.9%
Taylor expanded in x around 0 75.8%
cancel-sign-sub-inv75.8%
metadata-eval75.8%
+-commutative75.8%
*-commutative75.8%
fma-define75.8%
associate-/l*80.4%
fma-define80.4%
times-frac90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in x around 0 73.5%
associate-/r*73.5%
+-commutative73.5%
metadata-eval73.5%
associate-*r/82.7%
cancel-sign-sub-inv82.7%
associate-/l/82.7%
*-rgt-identity82.7%
times-frac87.2%
*-commutative87.2%
associate-*l/87.2%
*-lft-identity87.2%
associate-*r/78.0%
associate-*r/78.0%
div-sub78.0%
cancel-sign-sub-inv78.0%
metadata-eval78.0%
associate-*r*78.0%
*-commutative78.0%
*-commutative78.0%
Simplified78.0%
if -3.20000000000000012e122 < z < 1.85e52Initial program 90.6%
if 1.85e52 < z Initial program 58.5%
associate-+l-58.5%
*-commutative58.5%
associate-*r*60.7%
*-commutative60.7%
associate-+l-60.7%
associate-*l*60.7%
associate-*l*63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in x around 0 90.9%
Taylor expanded in c around 0 97.8%
Taylor expanded in x around inf 85.5%
associate-*r/87.5%
Simplified87.5%
Final simplification88.0%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* 4.0 (* a t))))
(*
c_s
(if (<= z -3.5e+28)
(+ (* (/ y z) (/ (* 9.0 x) c_m)) (/ (- (/ b z) t_1) c_m))
(if (<= z 1.05e+17)
(/ (+ b (- (* x (* 9.0 y)) (* (* 4.0 t) (* z a)))) (* c_m z))
(/ (- (+ (* 9.0 (/ (* x y) z)) (/ b z)) t_1) c_m))))))c_m = fabs(c);
c_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 4.0 * (a * t);
double tmp;
if (z <= -3.5e+28) {
tmp = ((y / z) * ((9.0 * x) / c_m)) + (((b / z) - t_1) / c_m);
} else if (z <= 1.05e+17) {
tmp = (b + ((x * (9.0 * y)) - ((4.0 * t) * (z * a)))) / (c_m * z);
} else {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - t_1) / c_m;
}
return c_s * tmp;
}
c_m = abs(c)
c_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: tmp
t_1 = 4.0d0 * (a * t)
if (z <= (-3.5d+28)) then
tmp = ((y / z) * ((9.0d0 * x) / c_m)) + (((b / z) - t_1) / c_m)
else if (z <= 1.05d+17) then
tmp = (b + ((x * (9.0d0 * y)) - ((4.0d0 * t) * (z * a)))) / (c_m * z)
else
tmp = (((9.0d0 * ((x * y) / z)) + (b / z)) - t_1) / c_m
end if
code = c_s * tmp
end function
c_m = Math.abs(c);
c_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = 4.0 * (a * t);
double tmp;
if (z <= -3.5e+28) {
tmp = ((y / z) * ((9.0 * x) / c_m)) + (((b / z) - t_1) / c_m);
} else if (z <= 1.05e+17) {
tmp = (b + ((x * (9.0 * y)) - ((4.0 * t) * (z * a)))) / (c_m * z);
} else {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - t_1) / c_m;
}
return c_s * tmp;
}
c_m = math.fabs(c) c_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = 4.0 * (a * t) tmp = 0 if z <= -3.5e+28: tmp = ((y / z) * ((9.0 * x) / c_m)) + (((b / z) - t_1) / c_m) elif z <= 1.05e+17: tmp = (b + ((x * (9.0 * y)) - ((4.0 * t) * (z * a)))) / (c_m * z) else: tmp = (((9.0 * ((x * y) / z)) + (b / z)) - t_1) / c_m return c_s * tmp
c_m = abs(c) c_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(4.0 * Float64(a * t)) tmp = 0.0 if (z <= -3.5e+28) tmp = Float64(Float64(Float64(y / z) * Float64(Float64(9.0 * x) / c_m)) + Float64(Float64(Float64(b / z) - t_1) / c_m)); elseif (z <= 1.05e+17) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(4.0 * t) * Float64(z * a)))) / Float64(c_m * z)); else tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z)) - t_1) / c_m); end return Float64(c_s * tmp) end
c_m = abs(c);
c_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = 4.0 * (a * t);
tmp = 0.0;
if (z <= -3.5e+28)
tmp = ((y / z) * ((9.0 * x) / c_m)) + (((b / z) - t_1) / c_m);
elseif (z <= 1.05e+17)
tmp = (b + ((x * (9.0 * y)) - ((4.0 * t) * (z * a)))) / (c_m * z);
else
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - t_1) / c_m;
end
tmp_2 = c_s * tmp;
end
c_m = N[Abs[c], $MachinePrecision]
c_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[z, -3.5e+28], N[(N[(N[(y / z), $MachinePrecision] * N[(N[(9.0 * x), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b / z), $MachinePrecision] - t$95$1), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+17], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * t), $MachinePrecision] * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] / c$95$m), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
c_m = \left|c\right|
\\
c_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(a \cdot t\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+28}:\\
\;\;\;\;\frac{y}{z} \cdot \frac{9 \cdot x}{c\_m} + \frac{\frac{b}{z} - t\_1}{c\_m}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+17}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(4 \cdot t\right) \cdot \left(z \cdot a\right)\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - t\_1}{c\_m}\\
\end{array}
\end{array}
\end{array}
if z < -3.5e28Initial program 51.6%
associate-+l-51.6%
*-commutative51.6%
associate-*r*50.4%
*-commutative50.4%
associate-+l-50.4%
associate-*l*50.5%
associate-*l*56.4%
*-commutative56.4%
Simplified56.4%
Taylor expanded in x around 0 77.3%
associate--l+77.3%
associate-*r/77.3%
associate-*l*77.3%
*-commutative77.3%
*-commutative77.3%
times-frac84.0%
*-commutative84.0%
*-commutative84.0%
associate-/r*87.3%
associate-*r/87.3%
sub-div87.3%
Applied egg-rr87.3%
if -3.5e28 < z < 1.05e17Initial program 93.6%
associate-+l-93.6%
*-commutative93.6%
associate-*r*93.6%
*-commutative93.6%
associate-+l-93.6%
associate-*l*93.6%
associate-*l*88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in z around 0 93.6%
*-commutative93.6%
associate-*r*93.6%
associate-*l*93.6%
associate-*l*93.6%
*-commutative93.6%
Simplified93.6%
if 1.05e17 < z Initial program 60.7%
associate-+l-60.7%
*-commutative60.7%
associate-*r*62.7%
*-commutative62.7%
associate-+l-62.7%
associate-*l*62.7%
associate-*l*64.7%
*-commutative64.7%
Simplified64.7%
Taylor expanded in x around 0 87.9%
Taylor expanded in c around 0 96.1%
Final simplification92.6%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 (<= a -3.2e-162) (not (<= a 1.85e+58)))
(/ (- (* 9.0 (* x (/ y 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);
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 ((a <= -3.2e-162) || !(a <= 1.85e+58)) {
tmp = ((9.0 * (x * (y / 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.
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 ((a <= (-3.2d-162)) .or. (.not. (a <= 1.85d+58))) then
tmp = ((9.0d0 * (x * (y / 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;
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 ((a <= -3.2e-162) || !(a <= 1.85e+58)) {
tmp = ((9.0 * (x * (y / 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]) [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 (a <= -3.2e-162) or not (a <= 1.85e+58): tmp = ((9.0 * (x * (y / 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]) 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 ((a <= -3.2e-162) || !(a <= 1.85e+58)) tmp = Float64(Float64(Float64(9.0 * Float64(x * Float64(y / 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])){:}
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 ((a <= -3.2e-162) || ~((a <= 1.85e+58)))
tmp = ((9.0 * (x * (y / 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.
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[a, -3.2e-162], N[Not[LessEqual[a, 1.85e+58]], $MachinePrecision]], N[(N[(N[(9.0 * N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $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])\\\\
[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}\;a \leq -3.2 \cdot 10^{-162} \lor \neg \left(a \leq 1.85 \cdot 10^{+58}\right):\\
\;\;\;\;\frac{9 \cdot \left(x \cdot \frac{y}{z}\right) - 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 a < -3.19999999999999975e-162 or 1.8500000000000001e58 < a Initial program 72.3%
associate-+l-72.3%
*-commutative72.3%
associate-*r*71.5%
*-commutative71.5%
associate-+l-71.5%
associate-*l*71.5%
associate-*l*68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in x around 0 66.2%
Taylor expanded in c around 0 77.0%
Taylor expanded in x around inf 67.4%
associate-*r/70.7%
Simplified70.7%
if -3.19999999999999975e-162 < a < 1.8500000000000001e58Initial program 83.4%
associate-+l-83.4%
*-commutative83.4%
associate-*r*84.5%
*-commutative84.5%
associate-+l-84.5%
associate-*l*84.5%
associate-*l*85.2%
*-commutative85.2%
Simplified85.2%
Taylor expanded in x around inf 76.9%
associate-*r*76.9%
Simplified76.9%
Final simplification73.4%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 (<= a -6.5e-101) (not (<= a 4e+169)))
(* -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);
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 ((a <= -6.5e-101) || !(a <= 4e+169)) {
tmp = -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.
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 ((a <= (-6.5d-101)) .or. (.not. (a <= 4d+169))) then
tmp = (-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;
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 ((a <= -6.5e-101) || !(a <= 4e+169)) {
tmp = -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]) [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 (a <= -6.5e-101) or not (a <= 4e+169): tmp = -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]) 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 ((a <= -6.5e-101) || !(a <= 4e+169)) tmp = Float64(-4.0 * Float64(a * Float64(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])){:}
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 ((a <= -6.5e-101) || ~((a <= 4e+169)))
tmp = -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.
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[a, -6.5e-101], N[Not[LessEqual[a, 4e+169]], $MachinePrecision]], N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $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])\\\\
[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}\;a \leq -6.5 \cdot 10^{-101} \lor \neg \left(a \leq 4 \cdot 10^{+169}\right):\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if a < -6.4999999999999996e-101 or 3.99999999999999974e169 < a Initial program 76.5%
associate-+l-76.5%
*-commutative76.5%
associate-*r*74.7%
*-commutative74.7%
associate-+l-74.7%
associate-*l*74.7%
associate-*l*70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in z around inf 49.2%
*-commutative49.2%
associate-/l*56.2%
Simplified56.2%
if -6.4999999999999996e-101 < a < 3.99999999999999974e169Initial program 77.6%
associate-+l-77.6%
*-commutative77.6%
associate-*r*79.1%
*-commutative79.1%
associate-+l-79.1%
associate-*l*79.2%
associate-*l*80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in x around inf 70.0%
associate-*r*70.0%
Simplified70.0%
Final simplification64.2%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -4.2e-72) (not (<= z 1.55e+93)))
(/ (+ (/ b z) (* t (* a -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);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -4.2e-72) || !(z <= 1.55e+93)) {
tmp = ((b / z) + (t * (a * -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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((z <= (-4.2d-72)) .or. (.not. (z <= 1.55d+93))) then
tmp = ((b / z) + (t * (a * (-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;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -4.2e-72) || !(z <= 1.55e+93)) {
tmp = ((b / z) + (t * (a * -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]) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -4.2e-72) or not (z <= 1.55e+93): tmp = ((b / z) + (t * (a * -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]) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -4.2e-72) || !(z <= 1.55e+93)) tmp = Float64(Float64(Float64(b / z) + Float64(t * Float64(a * -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])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -4.2e-72) || ~((z <= 1.55e+93)))
tmp = ((b / z) + (t * (a * -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.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -4.2e-72], N[Not[LessEqual[z, 1.55e+93]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] + N[(t * N[(a * -4.0), $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])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-72} \lor \neg \left(z \leq 1.55 \cdot 10^{+93}\right):\\
\;\;\;\;\frac{\frac{b}{z} + t \cdot \left(a \cdot -4\right)}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -4.2e-72 or 1.5500000000000001e93 < z Initial program 60.8%
associate-+l-60.8%
*-commutative60.8%
associate-*r*61.1%
*-commutative61.1%
associate-+l-61.1%
associate-*l*61.1%
associate-*l*64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in x around 0 83.8%
cancel-sign-sub-inv83.8%
metadata-eval83.8%
+-commutative83.8%
*-commutative83.8%
fma-define83.8%
associate-/l*82.4%
fma-define82.4%
times-frac85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in x around 0 73.0%
associate-/r*71.5%
+-commutative71.5%
metadata-eval71.5%
associate-*r/71.6%
cancel-sign-sub-inv71.6%
associate-/l/73.1%
*-rgt-identity73.1%
times-frac74.6%
*-commutative74.6%
associate-*l/74.6%
*-lft-identity74.6%
associate-*r/74.5%
associate-*r/74.5%
div-sub75.3%
cancel-sign-sub-inv75.3%
metadata-eval75.3%
associate-*r*75.3%
*-commutative75.3%
*-commutative75.3%
Simplified75.3%
if -4.2e-72 < z < 1.5500000000000001e93Initial program 92.3%
associate-+l-92.3%
*-commutative92.3%
associate-*r*92.2%
*-commutative92.2%
associate-+l-92.2%
associate-*l*92.2%
associate-*l*86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in x around inf 79.5%
associate-*r*79.5%
Simplified79.5%
Final simplification77.5%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 (<= a -3.4e-162) (not (<= a 1.16e+58)))
(* (* a t) (/ -4.0 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);
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 ((a <= -3.4e-162) || !(a <= 1.16e+58)) {
tmp = (a * t) * (-4.0 / c_m);
} else {
tmp = 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.
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 ((a <= (-3.4d-162)) .or. (.not. (a <= 1.16d+58))) then
tmp = (a * t) * ((-4.0d0) / c_m)
else
tmp = 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;
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 ((a <= -3.4e-162) || !(a <= 1.16e+58)) {
tmp = (a * t) * (-4.0 / c_m);
} else {
tmp = 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]) [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 (a <= -3.4e-162) or not (a <= 1.16e+58): tmp = (a * t) * (-4.0 / c_m) else: tmp = 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]) 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 ((a <= -3.4e-162) || !(a <= 1.16e+58)) tmp = Float64(Float64(a * t) * Float64(-4.0 / c_m)); else tmp = Float64(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])){:}
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 ((a <= -3.4e-162) || ~((a <= 1.16e+58)))
tmp = (a * t) * (-4.0 / c_m);
else
tmp = 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.
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[a, -3.4e-162], N[Not[LessEqual[a, 1.16e+58]], $MachinePrecision]], N[(N[(a * t), $MachinePrecision] * N[(-4.0 / c$95$m), $MachinePrecision]), $MachinePrecision], N[(b * N[(1.0 / 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])\\\\
[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}\;a \leq -3.4 \cdot 10^{-162} \lor \neg \left(a \leq 1.16 \cdot 10^{+58}\right):\\
\;\;\;\;\left(a \cdot t\right) \cdot \frac{-4}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{1}{c\_m \cdot z}\\
\end{array}
\end{array}
if a < -3.4e-162 or 1.1600000000000001e58 < a Initial program 72.1%
associate-+l-72.1%
*-commutative72.1%
associate-*r*71.3%
*-commutative71.3%
associate-+l-71.3%
associate-*l*71.3%
associate-*l*68.6%
*-commutative68.6%
Simplified68.6%
Taylor expanded in x around 0 65.9%
cancel-sign-sub-inv65.9%
metadata-eval65.9%
+-commutative65.9%
*-commutative65.9%
fma-define65.9%
associate-/l*70.0%
fma-define70.0%
times-frac74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in a around inf 47.6%
associate-*r/47.6%
*-commutative47.6%
associate-*r/47.6%
Simplified47.6%
if -3.4e-162 < a < 1.1600000000000001e58Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*84.6%
*-commutative84.6%
associate-+l-84.6%
associate-*l*84.7%
associate-*l*85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in b around inf 49.6%
*-commutative49.6%
Simplified49.6%
div-inv50.3%
Applied egg-rr50.3%
Final simplification48.8%
c_m = (fabs.f64 c)
c_s = (copysign.f64 1 c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
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 (<= a -2.6e-163) (not (<= a 9.2e+62)))
(* -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);
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 ((a <= -2.6e-163) || !(a <= 9.2e+62)) {
tmp = -4.0 * (a * (t / c_m));
} else {
tmp = 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.
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 ((a <= (-2.6d-163)) .or. (.not. (a <= 9.2d+62))) then
tmp = (-4.0d0) * (a * (t / c_m))
else
tmp = 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;
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 ((a <= -2.6e-163) || !(a <= 9.2e+62)) {
tmp = -4.0 * (a * (t / c_m));
} else {
tmp = 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]) [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 (a <= -2.6e-163) or not (a <= 9.2e+62): tmp = -4.0 * (a * (t / c_m)) else: tmp = 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]) 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 ((a <= -2.6e-163) || !(a <= 9.2e+62)) tmp = Float64(-4.0 * Float64(a * Float64(t / c_m))); else tmp = Float64(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])){:}
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 ((a <= -2.6e-163) || ~((a <= 9.2e+62)))
tmp = -4.0 * (a * (t / c_m));
else
tmp = 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.
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[a, -2.6e-163], N[Not[LessEqual[a, 9.2e+62]], $MachinePrecision]], N[(-4.0 * N[(a * N[(t / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(1.0 / 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])\\\\
[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}\;a \leq -2.6 \cdot 10^{-163} \lor \neg \left(a \leq 9.2 \cdot 10^{+62}\right):\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{1}{c\_m \cdot z}\\
\end{array}
\end{array}
if a < -2.60000000000000002e-163 or 9.19999999999999936e62 < a Initial program 72.4%
associate-+l-72.4%
*-commutative72.4%
associate-*r*71.7%
*-commutative71.7%
associate-+l-71.7%
associate-*l*71.7%
associate-*l*69.0%
*-commutative69.0%
Simplified69.0%
Taylor expanded in z around inf 47.0%
*-commutative47.0%
associate-/l*51.5%
Simplified51.5%
if -2.60000000000000002e-163 < a < 9.19999999999999936e62Initial program 83.2%
associate-+l-83.2%
*-commutative83.2%
associate-*r*84.4%
*-commutative84.4%
associate-+l-84.4%
associate-*l*84.4%
associate-*l*85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in b around inf 49.6%
*-commutative49.6%
Simplified49.6%
div-inv50.3%
Applied egg-rr50.3%
Final simplification51.0%
c_m = (fabs.f64 c) c_s = (copysign.f64 1 c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. 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 (/ 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);
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 * (1.0 / (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.
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 * (1.0d0 / (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;
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 * (1.0 / (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]) [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 * (1.0 / (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]) 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(1.0 / 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])){:}
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 * (1.0 / (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.
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[(1.0 / 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])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \left(b \cdot \frac{1}{c\_m \cdot z}\right)
\end{array}
Initial program 77.2%
associate-+l-77.2%
*-commutative77.2%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
associate-*l*77.3%
associate-*l*76.1%
*-commutative76.1%
Simplified76.1%
Taylor expanded in b around inf 34.5%
*-commutative34.5%
Simplified34.5%
div-inv35.2%
Applied egg-rr35.2%
Final simplification35.2%
c_m = (fabs.f64 c) c_s = (copysign.f64 1 c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. 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);
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.
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;
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]) [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]) 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])){:}
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.
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])\\\\
[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 77.2%
associate-+l-77.2%
*-commutative77.2%
associate-*r*77.3%
*-commutative77.3%
associate-+l-77.3%
associate-*l*77.3%
associate-*l*76.1%
*-commutative76.1%
Simplified76.1%
Taylor expanded in b around inf 34.5%
*-commutative34.5%
Simplified34.5%
Final simplification34.5%
(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 2024050
(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)))