
(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 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= c_m 1.32e-12)
(/ (- b (- (* (* z 4.0) (* t a)) (* x (* 9.0 y)))) (* c_m z))
(fma
-4.0
(/ (* t a) c_m)
(fma 9.0 (* x (/ (/ y c_m) z)) (/ (/ b c_m) z))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 1.32e-12) {
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z);
} else {
tmp = fma(-4.0, ((t * a) / c_m), fma(9.0, (x * ((y / c_m) / z)), ((b / c_m) / z)));
}
return c_s * tmp;
}
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (c_m <= 1.32e-12) tmp = Float64(Float64(b - Float64(Float64(Float64(z * 4.0) * Float64(t * a)) - Float64(x * Float64(9.0 * y)))) / Float64(c_m * z)); else tmp = fma(-4.0, Float64(Float64(t * a) / c_m), fma(9.0, Float64(x * Float64(Float64(y / c_m) / z)), Float64(Float64(b / c_m) / z))); end return Float64(c_s * tmp) end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 1.32e-12], N[(N[(b - N[(N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision] + N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 1.32 \cdot 10^{-12}:\\
\;\;\;\;\frac{b - \left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - x \cdot \left(9 \cdot y\right)\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{t \cdot a}{c\_m}, \mathsf{fma}\left(9, x \cdot \frac{\frac{y}{c\_m}}{z}, \frac{\frac{b}{c\_m}}{z}\right)\right)\\
\end{array}
\end{array}
if c < 1.32e-12Initial program 82.9%
associate-+l-82.9%
*-commutative82.9%
associate-*r*85.5%
*-commutative85.5%
associate-+l-85.5%
associate-*l*85.0%
associate-*l*86.1%
*-commutative86.1%
Simplified86.1%
if 1.32e-12 < c Initial program 71.2%
associate-+l-71.2%
*-commutative71.2%
associate-*r*73.9%
*-commutative73.9%
associate-+l-73.9%
associate-*l*73.8%
associate-*l*68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in x around 0 73.3%
cancel-sign-sub-inv73.3%
metadata-eval73.3%
+-commutative73.3%
fma-define73.3%
fma-define73.3%
associate-/l*74.8%
associate-/r*74.5%
associate-/r*78.2%
Simplified78.2%
Final simplification83.8%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (/ (+ b (- (* y (* x 9.0)) (* a (* (* z 4.0) t)))) (* c_m z))))
(*
c_s
(if (<= t_1 -1e-148)
t_1
(if (<= t_1 5e-201)
(/ (- (/ b z) (* (* t a) 4.0)) c_m)
(if (<= t_1 INFINITY)
(/ (- b (- (* (* z 4.0) (* t a)) (* x (* 9.0 y)))) (* c_m z))
(* a (/ (* t -4.0) c_m))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
double tmp;
if (t_1 <= -1e-148) {
tmp = t_1;
} else if (t_1 <= 5e-201) {
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z);
} else {
tmp = a * ((t * -4.0) / c_m);
}
return c_s * tmp;
}
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
double tmp;
if (t_1 <= -1e-148) {
tmp = t_1;
} else if (t_1 <= 5e-201) {
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z);
} else {
tmp = a * ((t * -4.0) / c_m);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z) tmp = 0 if t_1 <= -1e-148: tmp = t_1 elif t_1 <= 5e-201: tmp = ((b / z) - ((t * a) * 4.0)) / c_m elif t_1 <= math.inf: tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z) else: tmp = a * ((t * -4.0) / c_m) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(Float64(z * 4.0) * t)))) / Float64(c_m * z)) tmp = 0.0 if (t_1 <= -1e-148) tmp = t_1; elseif (t_1 <= 5e-201) tmp = Float64(Float64(Float64(b / z) - Float64(Float64(t * a) * 4.0)) / c_m); elseif (t_1 <= Inf) tmp = Float64(Float64(b - Float64(Float64(Float64(z * 4.0) * Float64(t * a)) - Float64(x * Float64(9.0 * y)))) / Float64(c_m * z)); else tmp = Float64(a * Float64(Float64(t * -4.0) / c_m)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
tmp = 0.0;
if (t_1 <= -1e-148)
tmp = t_1;
elseif (t_1 <= 5e-201)
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
elseif (t_1 <= Inf)
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z);
else
tmp = a * ((t * -4.0) / c_m);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -1e-148], t$95$1, If[LessEqual[t$95$1, 5e-201], N[(N[(N[(b / z), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b - N[(N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(\left(z \cdot 4\right) \cdot t\right)\right)}{c\_m \cdot z}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-148}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-201}:\\
\;\;\;\;\frac{\frac{b}{z} - \left(t \cdot a\right) \cdot 4}{c\_m}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{b - \left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - x \cdot \left(9 \cdot y\right)\right)}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c\_m}\\
\end{array}
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -9.99999999999999936e-149Initial program 90.1%
if -9.99999999999999936e-149 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 4.9999999999999999e-201Initial program 49.5%
associate-+l-49.5%
*-commutative49.5%
associate-*r*49.2%
*-commutative49.2%
associate-+l-49.2%
associate-*l*49.2%
associate-*l*49.5%
*-commutative49.5%
Simplified49.5%
associate-+l-49.5%
div-sub49.5%
associate-*r*49.5%
*-commutative49.5%
associate-*l*49.5%
*-commutative49.5%
associate-*l*49.5%
Applied egg-rr49.5%
Taylor expanded in c around 0 99.6%
Taylor expanded in x around 0 87.0%
if 4.9999999999999999e-201 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0Initial program 88.2%
associate-+l-88.2%
*-commutative88.2%
associate-*r*91.6%
*-commutative91.6%
associate-+l-91.6%
associate-*l*91.6%
associate-*l*89.0%
*-commutative89.0%
Simplified89.0%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*7.8%
*-commutative7.8%
associate-+l-7.8%
associate-*l*7.8%
associate-*l*7.8%
*-commutative7.8%
Simplified7.8%
Taylor expanded in z around inf 24.9%
*-commutative24.9%
associate-/l*58.3%
associate-*r*58.3%
associate-*l/58.3%
Simplified58.3%
Final simplification87.5%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c_m)))) (t_2 (* 9.0 (* x (/ y (* c_m z))))))
(*
c_s
(if (<= x -3.8e+132)
t_2
(if (<= x -5.6e+64)
(/ (/ b z) c_m)
(if (<= x -5e+49)
t_2
(if (<= x -3200000000.0)
t_1
(if (<= x -1.62e-21)
(* (/ b c_m) (/ 1.0 z))
(if (<= x -3e-243)
t_1
(if (<= x 2.9e-302)
(/ (/ b c_m) z)
(if (<= x 3e-13) t_1 t_2)))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (t * (a / c_m));
double t_2 = 9.0 * (x * (y / (c_m * z)));
double tmp;
if (x <= -3.8e+132) {
tmp = t_2;
} else if (x <= -5.6e+64) {
tmp = (b / z) / c_m;
} else if (x <= -5e+49) {
tmp = t_2;
} else if (x <= -3200000000.0) {
tmp = t_1;
} else if (x <= -1.62e-21) {
tmp = (b / c_m) * (1.0 / z);
} else if (x <= -3e-243) {
tmp = t_1;
} else if (x <= 2.9e-302) {
tmp = (b / c_m) / z;
} else if (x <= 3e-13) {
tmp = t_1;
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c_m))
t_2 = 9.0d0 * (x * (y / (c_m * z)))
if (x <= (-3.8d+132)) then
tmp = t_2
else if (x <= (-5.6d+64)) then
tmp = (b / z) / c_m
else if (x <= (-5d+49)) then
tmp = t_2
else if (x <= (-3200000000.0d0)) then
tmp = t_1
else if (x <= (-1.62d-21)) then
tmp = (b / c_m) * (1.0d0 / z)
else if (x <= (-3d-243)) then
tmp = t_1
else if (x <= 2.9d-302) then
tmp = (b / c_m) / z
else if (x <= 3d-13) then
tmp = t_1
else
tmp = t_2
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (t * (a / c_m));
double t_2 = 9.0 * (x * (y / (c_m * z)));
double tmp;
if (x <= -3.8e+132) {
tmp = t_2;
} else if (x <= -5.6e+64) {
tmp = (b / z) / c_m;
} else if (x <= -5e+49) {
tmp = t_2;
} else if (x <= -3200000000.0) {
tmp = t_1;
} else if (x <= -1.62e-21) {
tmp = (b / c_m) * (1.0 / z);
} else if (x <= -3e-243) {
tmp = t_1;
} else if (x <= 2.9e-302) {
tmp = (b / c_m) / z;
} else if (x <= 3e-13) {
tmp = t_1;
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = -4.0 * (t * (a / c_m)) t_2 = 9.0 * (x * (y / (c_m * z))) tmp = 0 if x <= -3.8e+132: tmp = t_2 elif x <= -5.6e+64: tmp = (b / z) / c_m elif x <= -5e+49: tmp = t_2 elif x <= -3200000000.0: tmp = t_1 elif x <= -1.62e-21: tmp = (b / c_m) * (1.0 / z) elif x <= -3e-243: tmp = t_1 elif x <= 2.9e-302: tmp = (b / c_m) / z elif x <= 3e-13: tmp = t_1 else: tmp = t_2 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(-4.0 * Float64(t * Float64(a / c_m))) t_2 = Float64(9.0 * Float64(x * Float64(y / Float64(c_m * z)))) tmp = 0.0 if (x <= -3.8e+132) tmp = t_2; elseif (x <= -5.6e+64) tmp = Float64(Float64(b / z) / c_m); elseif (x <= -5e+49) tmp = t_2; elseif (x <= -3200000000.0) tmp = t_1; elseif (x <= -1.62e-21) tmp = Float64(Float64(b / c_m) * Float64(1.0 / z)); elseif (x <= -3e-243) tmp = t_1; elseif (x <= 2.9e-302) tmp = Float64(Float64(b / c_m) / z); elseif (x <= 3e-13) tmp = t_1; else tmp = t_2; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = -4.0 * (t * (a / c_m));
t_2 = 9.0 * (x * (y / (c_m * z)));
tmp = 0.0;
if (x <= -3.8e+132)
tmp = t_2;
elseif (x <= -5.6e+64)
tmp = (b / z) / c_m;
elseif (x <= -5e+49)
tmp = t_2;
elseif (x <= -3200000000.0)
tmp = t_1;
elseif (x <= -1.62e-21)
tmp = (b / c_m) * (1.0 / z);
elseif (x <= -3e-243)
tmp = t_1;
elseif (x <= 2.9e-302)
tmp = (b / c_m) / z;
elseif (x <= 3e-13)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[x, -3.8e+132], t$95$2, If[LessEqual[x, -5.6e+64], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[x, -5e+49], t$95$2, If[LessEqual[x, -3200000000.0], t$95$1, If[LessEqual[x, -1.62e-21], N[(N[(b / c$95$m), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3e-243], t$95$1, If[LessEqual[x, 2.9e-302], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 3e-13], t$95$1, t$95$2]]]]]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
t_2 := 9 \cdot \left(x \cdot \frac{y}{c\_m \cdot z}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{+132}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -5.6 \cdot 10^{+64}:\\
\;\;\;\;\frac{\frac{b}{z}}{c\_m}\\
\mathbf{elif}\;x \leq -5 \cdot 10^{+49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -3200000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.62 \cdot 10^{-21}:\\
\;\;\;\;\frac{b}{c\_m} \cdot \frac{1}{z}\\
\mathbf{elif}\;x \leq -3 \cdot 10^{-243}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-302}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if x < -3.80000000000000006e132 or -5.60000000000000047e64 < x < -5.0000000000000004e49 or 2.99999999999999984e-13 < x Initial program 81.0%
associate-+l-81.0%
*-commutative81.0%
associate-*r*81.9%
*-commutative81.9%
associate-+l-81.9%
associate-*l*81.8%
associate-*l*80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in z around 0 79.0%
Taylor expanded in x around inf 53.2%
associate-/l*58.3%
Simplified58.3%
if -3.80000000000000006e132 < x < -5.60000000000000047e64Initial program 99.5%
associate-+l-99.5%
*-commutative99.5%
associate-*r*99.5%
*-commutative99.5%
associate-+l-99.5%
associate-*l*99.5%
associate-*l*99.5%
*-commutative99.5%
Simplified99.5%
associate-+l-99.5%
div-sub99.7%
associate-*r*99.7%
*-commutative99.7%
associate-*l*99.7%
*-commutative99.7%
associate-*l*99.7%
Applied egg-rr99.7%
Taylor expanded in c around 0 89.7%
Taylor expanded in x around 0 57.3%
Taylor expanded in b around inf 59.1%
associate-/l/56.5%
Simplified56.5%
if -5.0000000000000004e49 < x < -3.2e9 or -1.62000000000000003e-21 < x < -3.0000000000000001e-243 or 2.89999999999999994e-302 < x < 2.99999999999999984e-13Initial program 75.8%
associate-+l-75.8%
*-commutative75.8%
associate-*r*80.5%
*-commutative80.5%
associate-+l-80.5%
associate-*l*79.6%
associate-*l*79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in z around 0 80.6%
Taylor expanded in a around inf 53.2%
*-commutative53.2%
associate-/l*55.6%
Simplified55.6%
if -3.2e9 < x < -1.62000000000000003e-21Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around inf 100.0%
associate-/r*100.0%
Simplified100.0%
div-inv100.0%
Applied egg-rr100.0%
if -3.0000000000000001e-243 < x < 2.89999999999999994e-302Initial program 84.8%
associate-+l-84.8%
*-commutative84.8%
associate-*r*85.1%
*-commutative85.1%
associate-+l-85.1%
associate-*l*85.1%
associate-*l*85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in b around inf 55.5%
associate-/r*55.7%
Simplified55.7%
Final simplification57.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c_m)))) (t_2 (* 9.0 (* x (/ (/ y c_m) z)))))
(*
c_s
(if (<= x -2.3e+134)
t_2
(if (<= x -1e+65)
(/ (/ b z) c_m)
(if (<= x -6.5e+49)
(* 9.0 (* x (/ y (* c_m z))))
(if (<= x -3000000000.0)
t_1
(if (<= x -2.1e-21)
(* (/ b c_m) (/ 1.0 z))
(if (<= x -1.2e-244)
t_1
(if (<= x 2.9e-302)
(/ (/ b c_m) z)
(if (<= x 1.16e-17) t_1 t_2)))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (t * (a / c_m));
double t_2 = 9.0 * (x * ((y / c_m) / z));
double tmp;
if (x <= -2.3e+134) {
tmp = t_2;
} else if (x <= -1e+65) {
tmp = (b / z) / c_m;
} else if (x <= -6.5e+49) {
tmp = 9.0 * (x * (y / (c_m * z)));
} else if (x <= -3000000000.0) {
tmp = t_1;
} else if (x <= -2.1e-21) {
tmp = (b / c_m) * (1.0 / z);
} else if (x <= -1.2e-244) {
tmp = t_1;
} else if (x <= 2.9e-302) {
tmp = (b / c_m) / z;
} else if (x <= 1.16e-17) {
tmp = t_1;
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c_m))
t_2 = 9.0d0 * (x * ((y / c_m) / z))
if (x <= (-2.3d+134)) then
tmp = t_2
else if (x <= (-1d+65)) then
tmp = (b / z) / c_m
else if (x <= (-6.5d+49)) then
tmp = 9.0d0 * (x * (y / (c_m * z)))
else if (x <= (-3000000000.0d0)) then
tmp = t_1
else if (x <= (-2.1d-21)) then
tmp = (b / c_m) * (1.0d0 / z)
else if (x <= (-1.2d-244)) then
tmp = t_1
else if (x <= 2.9d-302) then
tmp = (b / c_m) / z
else if (x <= 1.16d-17) then
tmp = t_1
else
tmp = t_2
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (t * (a / c_m));
double t_2 = 9.0 * (x * ((y / c_m) / z));
double tmp;
if (x <= -2.3e+134) {
tmp = t_2;
} else if (x <= -1e+65) {
tmp = (b / z) / c_m;
} else if (x <= -6.5e+49) {
tmp = 9.0 * (x * (y / (c_m * z)));
} else if (x <= -3000000000.0) {
tmp = t_1;
} else if (x <= -2.1e-21) {
tmp = (b / c_m) * (1.0 / z);
} else if (x <= -1.2e-244) {
tmp = t_1;
} else if (x <= 2.9e-302) {
tmp = (b / c_m) / z;
} else if (x <= 1.16e-17) {
tmp = t_1;
} else {
tmp = t_2;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = -4.0 * (t * (a / c_m)) t_2 = 9.0 * (x * ((y / c_m) / z)) tmp = 0 if x <= -2.3e+134: tmp = t_2 elif x <= -1e+65: tmp = (b / z) / c_m elif x <= -6.5e+49: tmp = 9.0 * (x * (y / (c_m * z))) elif x <= -3000000000.0: tmp = t_1 elif x <= -2.1e-21: tmp = (b / c_m) * (1.0 / z) elif x <= -1.2e-244: tmp = t_1 elif x <= 2.9e-302: tmp = (b / c_m) / z elif x <= 1.16e-17: tmp = t_1 else: tmp = t_2 return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(-4.0 * Float64(t * Float64(a / c_m))) t_2 = Float64(9.0 * Float64(x * Float64(Float64(y / c_m) / z))) tmp = 0.0 if (x <= -2.3e+134) tmp = t_2; elseif (x <= -1e+65) tmp = Float64(Float64(b / z) / c_m); elseif (x <= -6.5e+49) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(c_m * z)))); elseif (x <= -3000000000.0) tmp = t_1; elseif (x <= -2.1e-21) tmp = Float64(Float64(b / c_m) * Float64(1.0 / z)); elseif (x <= -1.2e-244) tmp = t_1; elseif (x <= 2.9e-302) tmp = Float64(Float64(b / c_m) / z); elseif (x <= 1.16e-17) tmp = t_1; else tmp = t_2; end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = -4.0 * (t * (a / c_m));
t_2 = 9.0 * (x * ((y / c_m) / z));
tmp = 0.0;
if (x <= -2.3e+134)
tmp = t_2;
elseif (x <= -1e+65)
tmp = (b / z) / c_m;
elseif (x <= -6.5e+49)
tmp = 9.0 * (x * (y / (c_m * z)));
elseif (x <= -3000000000.0)
tmp = t_1;
elseif (x <= -2.1e-21)
tmp = (b / c_m) * (1.0 / z);
elseif (x <= -1.2e-244)
tmp = t_1;
elseif (x <= 2.9e-302)
tmp = (b / c_m) / z;
elseif (x <= 1.16e-17)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[x, -2.3e+134], t$95$2, If[LessEqual[x, -1e+65], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[x, -6.5e+49], N[(9.0 * N[(x * N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3000000000.0], t$95$1, If[LessEqual[x, -2.1e-21], N[(N[(b / c$95$m), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.2e-244], t$95$1, If[LessEqual[x, 2.9e-302], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 1.16e-17], t$95$1, t$95$2]]]]]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
t_2 := 9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+134}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -1 \cdot 10^{+65}:\\
\;\;\;\;\frac{\frac{b}{z}}{c\_m}\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{+49}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{c\_m \cdot z}\right)\\
\mathbf{elif}\;x \leq -3000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-21}:\\
\;\;\;\;\frac{b}{c\_m} \cdot \frac{1}{z}\\
\mathbf{elif}\;x \leq -1.2 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-302}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;x \leq 1.16 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if x < -2.2999999999999998e134 or 1.16e-17 < x Initial program 81.2%
associate-+l-81.2%
*-commutative81.2%
associate-*r*82.1%
*-commutative82.1%
associate-+l-82.1%
associate-*l*82.0%
associate-*l*80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in x around inf 52.4%
associate-/l*56.8%
associate-/r*60.4%
Simplified60.4%
if -2.2999999999999998e134 < x < -9.9999999999999999e64Initial program 91.0%
associate-+l-91.0%
*-commutative91.0%
associate-*r*91.0%
*-commutative91.0%
associate-+l-91.0%
associate-*l*91.0%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
associate-+l-91.0%
div-sub91.1%
associate-*r*91.1%
*-commutative91.1%
associate-*l*91.1%
*-commutative91.1%
associate-*l*91.1%
Applied egg-rr91.1%
Taylor expanded in c around 0 82.0%
Taylor expanded in x around 0 52.2%
Taylor expanded in b around inf 53.9%
associate-/l/51.5%
Simplified51.5%
if -9.9999999999999999e64 < x < -6.5000000000000005e49Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in z around 0 75.0%
Taylor expanded in x around inf 74.6%
associate-/l*75.0%
Simplified75.0%
if -6.5000000000000005e49 < x < -3e9 or -2.10000000000000013e-21 < x < -1.20000000000000008e-244 or 2.89999999999999994e-302 < x < 1.16e-17Initial program 75.6%
associate-+l-75.6%
*-commutative75.6%
associate-*r*80.3%
*-commutative80.3%
associate-+l-80.3%
associate-*l*79.5%
associate-*l*79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in z around 0 80.5%
Taylor expanded in a around inf 53.6%
*-commutative53.6%
associate-/l*56.0%
Simplified56.0%
if -3e9 < x < -2.10000000000000013e-21Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around inf 100.0%
associate-/r*100.0%
Simplified100.0%
div-inv100.0%
Applied egg-rr100.0%
if -1.20000000000000008e-244 < x < 2.89999999999999994e-302Initial program 84.8%
associate-+l-84.8%
*-commutative84.8%
associate-*r*85.1%
*-commutative85.1%
associate-+l-85.1%
associate-*l*85.1%
associate-*l*85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in b around inf 55.5%
associate-/r*55.7%
Simplified55.7%
Final simplification58.1%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c_m)))))
(*
c_s
(if (<= x -3.8e+132)
(* 9.0 (* y (/ (/ x c_m) z)))
(if (<= x -7.5e+64)
(/ (/ b z) c_m)
(if (<= x -3.6e+49)
(* 9.0 (* x (/ y (* c_m z))))
(if (<= x -2900000000.0)
t_1
(if (<= x -3.4e-24)
(* (/ b c_m) (/ 1.0 z))
(if (<= x -3.4e-242)
t_1
(if (<= x 3e-302)
(/ (/ b c_m) z)
(if (<= x 3.65e-13)
t_1
(* 9.0 (* x (/ (/ y c_m) z))))))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (t * (a / c_m));
double tmp;
if (x <= -3.8e+132) {
tmp = 9.0 * (y * ((x / c_m) / z));
} else if (x <= -7.5e+64) {
tmp = (b / z) / c_m;
} else if (x <= -3.6e+49) {
tmp = 9.0 * (x * (y / (c_m * z)));
} else if (x <= -2900000000.0) {
tmp = t_1;
} else if (x <= -3.4e-24) {
tmp = (b / c_m) * (1.0 / z);
} else if (x <= -3.4e-242) {
tmp = t_1;
} else if (x <= 3e-302) {
tmp = (b / c_m) / z;
} else if (x <= 3.65e-13) {
tmp = t_1;
} else {
tmp = 9.0 * (x * ((y / c_m) / z));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c_m))
if (x <= (-3.8d+132)) then
tmp = 9.0d0 * (y * ((x / c_m) / z))
else if (x <= (-7.5d+64)) then
tmp = (b / z) / c_m
else if (x <= (-3.6d+49)) then
tmp = 9.0d0 * (x * (y / (c_m * z)))
else if (x <= (-2900000000.0d0)) then
tmp = t_1
else if (x <= (-3.4d-24)) then
tmp = (b / c_m) * (1.0d0 / z)
else if (x <= (-3.4d-242)) then
tmp = t_1
else if (x <= 3d-302) then
tmp = (b / c_m) / z
else if (x <= 3.65d-13) then
tmp = t_1
else
tmp = 9.0d0 * (x * ((y / c_m) / z))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (t * (a / c_m));
double tmp;
if (x <= -3.8e+132) {
tmp = 9.0 * (y * ((x / c_m) / z));
} else if (x <= -7.5e+64) {
tmp = (b / z) / c_m;
} else if (x <= -3.6e+49) {
tmp = 9.0 * (x * (y / (c_m * z)));
} else if (x <= -2900000000.0) {
tmp = t_1;
} else if (x <= -3.4e-24) {
tmp = (b / c_m) * (1.0 / z);
} else if (x <= -3.4e-242) {
tmp = t_1;
} else if (x <= 3e-302) {
tmp = (b / c_m) / z;
} else if (x <= 3.65e-13) {
tmp = t_1;
} else {
tmp = 9.0 * (x * ((y / c_m) / z));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = -4.0 * (t * (a / c_m)) tmp = 0 if x <= -3.8e+132: tmp = 9.0 * (y * ((x / c_m) / z)) elif x <= -7.5e+64: tmp = (b / z) / c_m elif x <= -3.6e+49: tmp = 9.0 * (x * (y / (c_m * z))) elif x <= -2900000000.0: tmp = t_1 elif x <= -3.4e-24: tmp = (b / c_m) * (1.0 / z) elif x <= -3.4e-242: tmp = t_1 elif x <= 3e-302: tmp = (b / c_m) / z elif x <= 3.65e-13: tmp = t_1 else: tmp = 9.0 * (x * ((y / c_m) / z)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(-4.0 * Float64(t * Float64(a / c_m))) tmp = 0.0 if (x <= -3.8e+132) tmp = Float64(9.0 * Float64(y * Float64(Float64(x / c_m) / z))); elseif (x <= -7.5e+64) tmp = Float64(Float64(b / z) / c_m); elseif (x <= -3.6e+49) tmp = Float64(9.0 * Float64(x * Float64(y / Float64(c_m * z)))); elseif (x <= -2900000000.0) tmp = t_1; elseif (x <= -3.4e-24) tmp = Float64(Float64(b / c_m) * Float64(1.0 / z)); elseif (x <= -3.4e-242) tmp = t_1; elseif (x <= 3e-302) tmp = Float64(Float64(b / c_m) / z); elseif (x <= 3.65e-13) tmp = t_1; else tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c_m) / z))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = -4.0 * (t * (a / c_m));
tmp = 0.0;
if (x <= -3.8e+132)
tmp = 9.0 * (y * ((x / c_m) / z));
elseif (x <= -7.5e+64)
tmp = (b / z) / c_m;
elseif (x <= -3.6e+49)
tmp = 9.0 * (x * (y / (c_m * z)));
elseif (x <= -2900000000.0)
tmp = t_1;
elseif (x <= -3.4e-24)
tmp = (b / c_m) * (1.0 / z);
elseif (x <= -3.4e-242)
tmp = t_1;
elseif (x <= 3e-302)
tmp = (b / c_m) / z;
elseif (x <= 3.65e-13)
tmp = t_1;
else
tmp = 9.0 * (x * ((y / c_m) / z));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[x, -3.8e+132], N[(9.0 * N[(y * N[(N[(x / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.5e+64], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[x, -3.6e+49], N[(9.0 * N[(x * N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2900000000.0], t$95$1, If[LessEqual[x, -3.4e-24], N[(N[(b / c$95$m), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.4e-242], t$95$1, If[LessEqual[x, 3e-302], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 3.65e-13], t$95$1, N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{+132}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{\frac{x}{c\_m}}{z}\right)\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{+64}:\\
\;\;\;\;\frac{\frac{b}{z}}{c\_m}\\
\mathbf{elif}\;x \leq -3.6 \cdot 10^{+49}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{y}{c\_m \cdot z}\right)\\
\mathbf{elif}\;x \leq -2900000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.4 \cdot 10^{-24}:\\
\;\;\;\;\frac{b}{c\_m} \cdot \frac{1}{z}\\
\mathbf{elif}\;x \leq -3.4 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-302}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{elif}\;x \leq 3.65 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\end{array}
\end{array}
\end{array}
if x < -3.80000000000000006e132Initial program 77.4%
associate-+l-77.4%
*-commutative77.4%
associate-*r*77.4%
*-commutative77.4%
associate-+l-77.4%
associate-*l*77.3%
associate-*l*77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in z around 0 71.2%
Taylor expanded in x around inf 69.6%
*-commutative69.6%
associate-/l*68.7%
associate-/r*77.2%
Simplified77.2%
if -3.80000000000000006e132 < x < -7.5000000000000005e64Initial program 99.5%
associate-+l-99.5%
*-commutative99.5%
associate-*r*99.5%
*-commutative99.5%
associate-+l-99.5%
associate-*l*99.5%
associate-*l*99.5%
*-commutative99.5%
Simplified99.5%
associate-+l-99.5%
div-sub99.7%
associate-*r*99.7%
*-commutative99.7%
associate-*l*99.7%
*-commutative99.7%
associate-*l*99.7%
Applied egg-rr99.7%
Taylor expanded in c around 0 89.7%
Taylor expanded in x around 0 57.3%
Taylor expanded in b around inf 59.1%
associate-/l/56.5%
Simplified56.5%
if -7.5000000000000005e64 < x < -3.59999999999999996e49Initial program 100.0%
associate-+l-100.0%
*-commutative100.0%
associate-*r*100.0%
*-commutative100.0%
associate-+l-100.0%
associate-*l*100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in z around 0 75.0%
Taylor expanded in x around inf 74.6%
associate-/l*75.0%
Simplified75.0%
if -3.59999999999999996e49 < x < -2.9e9 or -3.39999999999999992e-24 < x < -3.4000000000000001e-242 or 2.99999999999999989e-302 < x < 3.6500000000000001e-13Initial program 76.4%
associate-+l-76.4%
*-commutative76.4%
associate-*r*81.1%
*-commutative81.1%
associate-+l-81.1%
associate-*l*80.3%
associate-*l*80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in z around 0 81.3%
Taylor expanded in a around inf 53.6%
*-commutative53.6%
associate-/l*55.2%
Simplified55.2%
if -2.9e9 < x < -3.39999999999999992e-24Initial program 52.3%
associate-+l-52.3%
*-commutative52.3%
associate-*r*52.3%
*-commutative52.3%
associate-+l-52.3%
associate-*l*52.3%
associate-*l*52.3%
*-commutative52.3%
Simplified52.3%
Taylor expanded in b around inf 50.6%
associate-/r*50.6%
Simplified50.6%
div-inv50.6%
Applied egg-rr50.6%
if -3.4000000000000001e-242 < x < 2.99999999999999989e-302Initial program 84.8%
associate-+l-84.8%
*-commutative84.8%
associate-*r*85.1%
*-commutative85.1%
associate-+l-85.1%
associate-*l*85.1%
associate-*l*85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in b around inf 55.5%
associate-/r*55.7%
Simplified55.7%
if 3.6500000000000001e-13 < x Initial program 81.6%
associate-+l-81.6%
*-commutative81.6%
associate-*r*83.0%
*-commutative83.0%
associate-+l-83.0%
associate-*l*82.9%
associate-*l*80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in x around inf 44.5%
associate-/l*49.6%
associate-/r*53.5%
Simplified53.5%
Final simplification58.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(let* ((t_1 (* -4.0 (* t (/ a c_m)))))
(*
c_s
(if (<= y -1.75e-155)
(* 9.0 (/ (* x (/ y c_m)) z))
(if (<= y -1.25e-300)
t_1
(if (<= y 5.4e-231)
(/ b (* c_m z))
(if (<= y 2.6e-149)
t_1
(if (<= y 2.35e-121)
(/ (/ b z) c_m)
(if (<= y 6.2e-20)
t_1
(if (<= y 4.3e+88)
(/ (/ b c_m) z)
(* 9.0 (* x (/ (/ y c_m) z)))))))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (t * (a / c_m));
double tmp;
if (y <= -1.75e-155) {
tmp = 9.0 * ((x * (y / c_m)) / z);
} else if (y <= -1.25e-300) {
tmp = t_1;
} else if (y <= 5.4e-231) {
tmp = b / (c_m * z);
} else if (y <= 2.6e-149) {
tmp = t_1;
} else if (y <= 2.35e-121) {
tmp = (b / z) / c_m;
} else if (y <= 6.2e-20) {
tmp = t_1;
} else if (y <= 4.3e+88) {
tmp = (b / c_m) / z;
} else {
tmp = 9.0 * (x * ((y / c_m) / z));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (t * (a / c_m))
if (y <= (-1.75d-155)) then
tmp = 9.0d0 * ((x * (y / c_m)) / z)
else if (y <= (-1.25d-300)) then
tmp = t_1
else if (y <= 5.4d-231) then
tmp = b / (c_m * z)
else if (y <= 2.6d-149) then
tmp = t_1
else if (y <= 2.35d-121) then
tmp = (b / z) / c_m
else if (y <= 6.2d-20) then
tmp = t_1
else if (y <= 4.3d+88) then
tmp = (b / c_m) / z
else
tmp = 9.0d0 * (x * ((y / c_m) / z))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double t_1 = -4.0 * (t * (a / c_m));
double tmp;
if (y <= -1.75e-155) {
tmp = 9.0 * ((x * (y / c_m)) / z);
} else if (y <= -1.25e-300) {
tmp = t_1;
} else if (y <= 5.4e-231) {
tmp = b / (c_m * z);
} else if (y <= 2.6e-149) {
tmp = t_1;
} else if (y <= 2.35e-121) {
tmp = (b / z) / c_m;
} else if (y <= 6.2e-20) {
tmp = t_1;
} else if (y <= 4.3e+88) {
tmp = (b / c_m) / z;
} else {
tmp = 9.0 * (x * ((y / c_m) / z));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): t_1 = -4.0 * (t * (a / c_m)) tmp = 0 if y <= -1.75e-155: tmp = 9.0 * ((x * (y / c_m)) / z) elif y <= -1.25e-300: tmp = t_1 elif y <= 5.4e-231: tmp = b / (c_m * z) elif y <= 2.6e-149: tmp = t_1 elif y <= 2.35e-121: tmp = (b / z) / c_m elif y <= 6.2e-20: tmp = t_1 elif y <= 4.3e+88: tmp = (b / c_m) / z else: tmp = 9.0 * (x * ((y / c_m) / z)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) t_1 = Float64(-4.0 * Float64(t * Float64(a / c_m))) tmp = 0.0 if (y <= -1.75e-155) tmp = Float64(9.0 * Float64(Float64(x * Float64(y / c_m)) / z)); elseif (y <= -1.25e-300) tmp = t_1; elseif (y <= 5.4e-231) tmp = Float64(b / Float64(c_m * z)); elseif (y <= 2.6e-149) tmp = t_1; elseif (y <= 2.35e-121) tmp = Float64(Float64(b / z) / c_m); elseif (y <= 6.2e-20) tmp = t_1; elseif (y <= 4.3e+88) tmp = Float64(Float64(b / c_m) / z); else tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c_m) / z))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
t_1 = -4.0 * (t * (a / c_m));
tmp = 0.0;
if (y <= -1.75e-155)
tmp = 9.0 * ((x * (y / c_m)) / z);
elseif (y <= -1.25e-300)
tmp = t_1;
elseif (y <= 5.4e-231)
tmp = b / (c_m * z);
elseif (y <= 2.6e-149)
tmp = t_1;
elseif (y <= 2.35e-121)
tmp = (b / z) / c_m;
elseif (y <= 6.2e-20)
tmp = t_1;
elseif (y <= 4.3e+88)
tmp = (b / c_m) / z;
else
tmp = 9.0 * (x * ((y / c_m) / z));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[y, -1.75e-155], N[(9.0 * N[(N[(x * N[(y / c$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.25e-300], t$95$1, If[LessEqual[y, 5.4e-231], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e-149], t$95$1, If[LessEqual[y, 2.35e-121], N[(N[(b / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[y, 6.2e-20], t$95$1, If[LessEqual[y, 4.3e+88], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{-155}:\\
\;\;\;\;9 \cdot \frac{x \cdot \frac{y}{c\_m}}{z}\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{-300}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{-231}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.35 \cdot 10^{-121}:\\
\;\;\;\;\frac{\frac{b}{z}}{c\_m}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+88}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\end{array}
\end{array}
\end{array}
if y < -1.75000000000000008e-155Initial program 80.9%
associate-+l-80.9%
*-commutative80.9%
associate-*r*81.0%
*-commutative81.0%
associate-+l-81.0%
associate-*l*79.9%
associate-*l*81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in x around inf 34.2%
associate-/r*36.2%
associate-/l*42.1%
Simplified42.1%
if -1.75000000000000008e-155 < y < -1.24999999999999999e-300 or 5.40000000000000046e-231 < y < 2.59999999999999999e-149 or 2.3500000000000001e-121 < y < 6.19999999999999999e-20Initial program 81.9%
associate-+l-81.9%
*-commutative81.9%
associate-*r*86.7%
*-commutative86.7%
associate-+l-86.7%
associate-*l*86.7%
associate-*l*85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in z around 0 83.6%
Taylor expanded in a around inf 48.7%
*-commutative48.7%
associate-/l*48.9%
Simplified48.9%
if -1.24999999999999999e-300 < y < 5.40000000000000046e-231Initial program 81.5%
associate-+l-81.5%
*-commutative81.5%
associate-*r*90.6%
*-commutative90.6%
associate-+l-90.6%
associate-*l*90.6%
associate-*l*86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in b around inf 53.2%
*-commutative53.2%
Simplified53.2%
if 2.59999999999999999e-149 < y < 2.3500000000000001e-121Initial program 89.5%
associate-+l-89.5%
*-commutative89.5%
associate-*r*89.5%
*-commutative89.5%
associate-+l-89.5%
associate-*l*89.5%
associate-*l*89.3%
*-commutative89.3%
Simplified89.3%
associate-+l-89.3%
div-sub89.3%
associate-*r*89.3%
*-commutative89.3%
associate-*l*89.1%
*-commutative89.1%
associate-*l*89.1%
Applied egg-rr89.1%
Taylor expanded in c around 0 100.0%
Taylor expanded in x around 0 89.0%
Taylor expanded in b around inf 56.5%
associate-/l/67.0%
Simplified67.0%
if 6.19999999999999999e-20 < y < 4.29999999999999974e88Initial program 62.6%
associate-+l-62.6%
*-commutative62.6%
associate-*r*73.2%
*-commutative73.2%
associate-+l-73.2%
associate-*l*73.0%
associate-*l*73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in b around inf 25.1%
associate-/r*20.2%
Simplified20.2%
if 4.29999999999999974e88 < y Initial program 77.7%
associate-+l-77.7%
*-commutative77.7%
associate-*r*77.7%
*-commutative77.7%
associate-+l-77.7%
associate-*l*77.6%
associate-*l*75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in x around inf 51.8%
associate-/l*60.9%
associate-/r*68.3%
Simplified68.3%
Final simplification49.2%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -5.2e+151) (not (<= z 1.6e+175)))
(/ (- (/ b z) (* (* t a) 4.0)) c_m)
(/ (- b (- (* (* z 4.0) (* t a)) (* x (* 9.0 y)))) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -5.2e+151) || !(z <= 1.6e+175)) {
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
} else {
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((z <= (-5.2d+151)) .or. (.not. (z <= 1.6d+175))) then
tmp = ((b / z) - ((t * a) * 4.0d0)) / c_m
else
tmp = (b - (((z * 4.0d0) * (t * a)) - (x * (9.0d0 * y)))) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -5.2e+151) || !(z <= 1.6e+175)) {
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
} else {
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -5.2e+151) or not (z <= 1.6e+175): tmp = ((b / z) - ((t * a) * 4.0)) / c_m else: tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -5.2e+151) || !(z <= 1.6e+175)) tmp = Float64(Float64(Float64(b / z) - Float64(Float64(t * a) * 4.0)) / c_m); else tmp = Float64(Float64(b - Float64(Float64(Float64(z * 4.0) * Float64(t * a)) - Float64(x * Float64(9.0 * y)))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -5.2e+151) || ~((z <= 1.6e+175)))
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
else
tmp = (b - (((z * 4.0) * (t * a)) - (x * (9.0 * y)))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -5.2e+151], N[Not[LessEqual[z, 1.6e+175]], $MachinePrecision]], N[(N[(N[(b / z), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b - N[(N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+151} \lor \neg \left(z \leq 1.6 \cdot 10^{+175}\right):\\
\;\;\;\;\frac{\frac{b}{z} - \left(t \cdot a\right) \cdot 4}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b - \left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right) - x \cdot \left(9 \cdot y\right)\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -5.20000000000000026e151 or 1.60000000000000011e175 < z Initial program 41.0%
associate-+l-41.0%
*-commutative41.0%
associate-*r*45.3%
*-commutative45.3%
associate-+l-45.3%
associate-*l*45.3%
associate-*l*47.6%
*-commutative47.6%
Simplified47.6%
associate-+l-47.6%
div-sub47.6%
associate-*r*47.6%
*-commutative47.6%
associate-*l*47.6%
*-commutative47.6%
associate-*l*47.6%
Applied egg-rr47.6%
Taylor expanded in c around 0 83.2%
Taylor expanded in x around 0 73.8%
if -5.20000000000000026e151 < z < 1.60000000000000011e175Initial program 88.0%
associate-+l-88.0%
*-commutative88.0%
associate-*r*90.2%
*-commutative90.2%
associate-+l-90.2%
associate-*l*89.7%
associate-*l*88.5%
*-commutative88.5%
Simplified88.5%
Final simplification85.8%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= z -5e+75) (not (<= z 1e-27)))
(/ (- (+ (* 9.0 (/ (* x y) z)) (/ b z)) (* (* t a) 4.0)) c_m)
(/ (+ b (- (* y (* x 9.0)) (* a (* (* z 4.0) t)))) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -5e+75) || !(z <= 1e-27)) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - ((t * a) * 4.0)) / c_m;
} else {
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((z <= (-5d+75)) .or. (.not. (z <= 1d-27))) then
tmp = (((9.0d0 * ((x * y) / z)) + (b / z)) - ((t * a) * 4.0d0)) / c_m
else
tmp = (b + ((y * (x * 9.0d0)) - (a * ((z * 4.0d0) * t)))) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((z <= -5e+75) || !(z <= 1e-27)) {
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - ((t * a) * 4.0)) / c_m;
} else {
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (z <= -5e+75) or not (z <= 1e-27): tmp = (((9.0 * ((x * y) / z)) + (b / z)) - ((t * a) * 4.0)) / c_m else: tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((z <= -5e+75) || !(z <= 1e-27)) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(Float64(x * y) / z)) + Float64(b / z)) - Float64(Float64(t * a) * 4.0)) / c_m); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(Float64(z * 4.0) * t)))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((z <= -5e+75) || ~((z <= 1e-27)))
tmp = (((9.0 * ((x * y) / z)) + (b / z)) - ((t * a) * 4.0)) / c_m;
else
tmp = (b + ((y * (x * 9.0)) - (a * ((z * 4.0) * t)))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[z, -5e+75], N[Not[LessEqual[z, 1e-27]], $MachinePrecision]], N[(N[(N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+75} \lor \neg \left(z \leq 10^{-27}\right):\\
\;\;\;\;\frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - \left(t \cdot a\right) \cdot 4}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(\left(z \cdot 4\right) \cdot t\right)\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if z < -5.0000000000000002e75 or 1e-27 < z Initial program 63.5%
associate-+l-63.5%
*-commutative63.5%
associate-*r*66.0%
*-commutative66.0%
associate-+l-66.0%
associate-*l*66.0%
associate-*l*69.7%
*-commutative69.7%
Simplified69.7%
associate-+l-69.7%
div-sub68.7%
associate-*r*68.8%
*-commutative68.8%
associate-*l*68.8%
*-commutative68.8%
associate-*l*68.8%
Applied egg-rr68.8%
Taylor expanded in c around 0 87.9%
if -5.0000000000000002e75 < z < 1e-27Initial program 91.8%
Final simplification90.1%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= x -1.85e+50)
(/ (+ (* x (* 9.0 y)) b) (* c_m z))
(if (<= x 1.32e-13)
(/ (- (/ b z) (* (* t a) 4.0)) c_m)
(* y (- (/ (/ b c_m) (* y z)) (* -9.0 (/ (/ x c_m) z))))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (x <= -1.85e+50) {
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
} else if (x <= 1.32e-13) {
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
} else {
tmp = y * (((b / c_m) / (y * z)) - (-9.0 * ((x / c_m) / z)));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (x <= (-1.85d+50)) then
tmp = ((x * (9.0d0 * y)) + b) / (c_m * z)
else if (x <= 1.32d-13) then
tmp = ((b / z) - ((t * a) * 4.0d0)) / c_m
else
tmp = y * (((b / c_m) / (y * z)) - ((-9.0d0) * ((x / c_m) / z)))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (x <= -1.85e+50) {
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
} else if (x <= 1.32e-13) {
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
} else {
tmp = y * (((b / c_m) / (y * z)) - (-9.0 * ((x / c_m) / z)));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if x <= -1.85e+50: tmp = ((x * (9.0 * y)) + b) / (c_m * z) elif x <= 1.32e-13: tmp = ((b / z) - ((t * a) * 4.0)) / c_m else: tmp = y * (((b / c_m) / (y * z)) - (-9.0 * ((x / c_m) / z))) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (x <= -1.85e+50) tmp = Float64(Float64(Float64(x * Float64(9.0 * y)) + b) / Float64(c_m * z)); elseif (x <= 1.32e-13) tmp = Float64(Float64(Float64(b / z) - Float64(Float64(t * a) * 4.0)) / c_m); else tmp = Float64(y * Float64(Float64(Float64(b / c_m) / Float64(y * z)) - Float64(-9.0 * Float64(Float64(x / c_m) / z)))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (x <= -1.85e+50)
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
elseif (x <= 1.32e-13)
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
else
tmp = y * (((b / c_m) / (y * z)) - (-9.0 * ((x / c_m) / z)));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[x, -1.85e+50], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.32e-13], N[(N[(N[(b / z), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(y * N[(N[(N[(b / c$95$m), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(-9.0 * N[(N[(x / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{+50}:\\
\;\;\;\;\frac{x \cdot \left(9 \cdot y\right) + b}{c\_m \cdot z}\\
\mathbf{elif}\;x \leq 1.32 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{b}{z} - \left(t \cdot a\right) \cdot 4}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{\frac{b}{c\_m}}{y \cdot z} - -9 \cdot \frac{\frac{x}{c\_m}}{z}\right)\\
\end{array}
\end{array}
if x < -1.85e50Initial program 83.9%
associate-+l-83.9%
*-commutative83.9%
associate-*r*83.9%
*-commutative83.9%
associate-+l-83.9%
associate-*l*83.8%
associate-*l*83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in x around inf 78.3%
associate-*r*78.4%
*-commutative78.4%
associate-*r*78.3%
Simplified78.3%
if -1.85e50 < x < 1.3199999999999999e-13Initial program 76.9%
associate-+l-76.9%
*-commutative76.9%
associate-*r*81.1%
*-commutative81.1%
associate-+l-81.1%
associate-*l*80.3%
associate-*l*80.5%
*-commutative80.5%
Simplified80.5%
associate-+l-80.5%
div-sub76.8%
associate-*r*76.8%
*-commutative76.8%
associate-*l*76.7%
*-commutative76.7%
associate-*l*76.7%
Applied egg-rr76.7%
Taylor expanded in c around 0 87.8%
Taylor expanded in x around 0 81.4%
if 1.3199999999999999e-13 < x Initial program 81.6%
associate-+l-81.6%
*-commutative81.6%
associate-*r*83.0%
*-commutative83.0%
associate-+l-83.0%
associate-*l*82.9%
associate-*l*80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in x around inf 69.3%
associate-*r*69.3%
Simplified69.3%
Taylor expanded in y around -inf 59.7%
mul-1-neg59.7%
distribute-rgt-neg-in59.7%
mul-1-neg59.7%
unsub-neg59.7%
associate-/r*62.1%
associate-/r*63.6%
Simplified63.6%
Final simplification75.7%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= x -7.5e+49)
(/ (+ (* x (* 9.0 y)) b) (* c_m z))
(if (<= x 3.05e-15)
(/ (- (/ b z) (* (* t a) 4.0)) c_m)
(* (/ y c_m) (/ (- (/ b y) (* x -9.0)) z))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (x <= -7.5e+49) {
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
} else if (x <= 3.05e-15) {
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
} else {
tmp = (y / c_m) * (((b / y) - (x * -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.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (x <= (-7.5d+49)) then
tmp = ((x * (9.0d0 * y)) + b) / (c_m * z)
else if (x <= 3.05d-15) then
tmp = ((b / z) - ((t * a) * 4.0d0)) / c_m
else
tmp = (y / c_m) * (((b / y) - (x * (-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;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (x <= -7.5e+49) {
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
} else if (x <= 3.05e-15) {
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
} else {
tmp = (y / c_m) * (((b / y) - (x * -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]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if x <= -7.5e+49: tmp = ((x * (9.0 * y)) + b) / (c_m * z) elif x <= 3.05e-15: tmp = ((b / z) - ((t * a) * 4.0)) / c_m else: tmp = (y / c_m) * (((b / y) - (x * -9.0)) / z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (x <= -7.5e+49) tmp = Float64(Float64(Float64(x * Float64(9.0 * y)) + b) / Float64(c_m * z)); elseif (x <= 3.05e-15) tmp = Float64(Float64(Float64(b / z) - Float64(Float64(t * a) * 4.0)) / c_m); else tmp = Float64(Float64(y / c_m) * Float64(Float64(Float64(b / y) - Float64(x * -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])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (x <= -7.5e+49)
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
elseif (x <= 3.05e-15)
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
else
tmp = (y / c_m) * (((b / y) - (x * -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.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[x, -7.5e+49], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.05e-15], N[(N[(N[(b / z), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(y / c$95$m), $MachinePrecision] * N[(N[(N[(b / y), $MachinePrecision] - N[(x * -9.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+49}:\\
\;\;\;\;\frac{x \cdot \left(9 \cdot y\right) + b}{c\_m \cdot z}\\
\mathbf{elif}\;x \leq 3.05 \cdot 10^{-15}:\\
\;\;\;\;\frac{\frac{b}{z} - \left(t \cdot a\right) \cdot 4}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{c\_m} \cdot \frac{\frac{b}{y} - x \cdot -9}{z}\\
\end{array}
\end{array}
if x < -7.4999999999999995e49Initial program 83.9%
associate-+l-83.9%
*-commutative83.9%
associate-*r*83.9%
*-commutative83.9%
associate-+l-83.9%
associate-*l*83.8%
associate-*l*83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in x around inf 78.3%
associate-*r*78.4%
*-commutative78.4%
associate-*r*78.3%
Simplified78.3%
if -7.4999999999999995e49 < x < 3.04999999999999986e-15Initial program 76.9%
associate-+l-76.9%
*-commutative76.9%
associate-*r*81.1%
*-commutative81.1%
associate-+l-81.1%
associate-*l*80.3%
associate-*l*80.5%
*-commutative80.5%
Simplified80.5%
associate-+l-80.5%
div-sub76.8%
associate-*r*76.8%
*-commutative76.8%
associate-*l*76.7%
*-commutative76.7%
associate-*l*76.7%
Applied egg-rr76.7%
Taylor expanded in c around 0 87.8%
Taylor expanded in x around 0 81.4%
if 3.04999999999999986e-15 < x Initial program 81.6%
associate-+l-81.6%
*-commutative81.6%
associate-*r*83.0%
*-commutative83.0%
associate-+l-83.0%
associate-*l*82.9%
associate-*l*80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in x around inf 69.3%
associate-*r*69.3%
Simplified69.3%
Taylor expanded in y around inf 59.7%
Taylor expanded in c around 0 58.9%
Taylor expanded in z around -inf 60.1%
mul-1-neg60.1%
times-frac61.0%
distribute-rgt-neg-in61.0%
distribute-neg-frac261.0%
mul-1-neg61.0%
unsub-neg61.0%
*-commutative61.0%
Simplified61.0%
Final simplification74.9%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= t -9.5e+186) (not (<= t 3.5e-47)))
(* -4.0 (* t (/ a c_m)))
(/ (+ (* x (* 9.0 y)) b) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((t <= -9.5e+186) || !(t <= 3.5e-47)) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((t <= (-9.5d+186)) .or. (.not. (t <= 3.5d-47))) then
tmp = (-4.0d0) * (t * (a / c_m))
else
tmp = ((x * (9.0d0 * y)) + b) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((t <= -9.5e+186) || !(t <= 3.5e-47)) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (t <= -9.5e+186) or not (t <= 3.5e-47): tmp = -4.0 * (t * (a / c_m)) else: tmp = ((x * (9.0 * y)) + b) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((t <= -9.5e+186) || !(t <= 3.5e-47)) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); else tmp = Float64(Float64(Float64(x * Float64(9.0 * y)) + b) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((t <= -9.5e+186) || ~((t <= 3.5e-47)))
tmp = -4.0 * (t * (a / c_m));
else
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[t, -9.5e+186], N[Not[LessEqual[t, 3.5e-47]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+186} \lor \neg \left(t \leq 3.5 \cdot 10^{-47}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(9 \cdot y\right) + b}{c\_m \cdot z}\\
\end{array}
\end{array}
if t < -9.49999999999999999e186 or 3.4999999999999998e-47 < t Initial program 77.1%
associate-+l-77.1%
*-commutative77.1%
associate-*r*83.4%
*-commutative83.4%
associate-+l-83.4%
associate-*l*82.4%
associate-*l*80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in z around 0 75.4%
Taylor expanded in a around inf 49.2%
*-commutative49.2%
associate-/l*56.2%
Simplified56.2%
if -9.49999999999999999e186 < t < 3.4999999999999998e-47Initial program 81.3%
associate-+l-81.3%
*-commutative81.3%
associate-*r*81.2%
*-commutative81.2%
associate-+l-81.2%
associate-*l*81.2%
associate-*l*81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in x around inf 67.9%
associate-*r*68.0%
*-commutative68.0%
associate-*r*67.9%
Simplified67.9%
Final simplification63.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (or (<= t -9.5e+186) (not (<= t 3.5e-47)))
(* -4.0 (* t (/ a c_m)))
(/ (+ b (* y (* x 9.0))) (* c_m z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((t <= -9.5e+186) || !(t <= 3.5e-47)) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if ((t <= (-9.5d+186)) .or. (.not. (t <= 3.5d-47))) then
tmp = (-4.0d0) * (t * (a / c_m))
else
tmp = (b + (y * (x * 9.0d0))) / (c_m * z)
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if ((t <= -9.5e+186) || !(t <= 3.5e-47)) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = (b + (y * (x * 9.0))) / (c_m * z);
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if (t <= -9.5e+186) or not (t <= 3.5e-47): tmp = -4.0 * (t * (a / c_m)) else: tmp = (b + (y * (x * 9.0))) / (c_m * z) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if ((t <= -9.5e+186) || !(t <= 3.5e-47)) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); else tmp = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(c_m * z)); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if ((t <= -9.5e+186) || ~((t <= 3.5e-47)))
tmp = -4.0 * (t * (a / c_m));
else
tmp = (b + (y * (x * 9.0))) / (c_m * z);
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[Or[LessEqual[t, -9.5e+186], N[Not[LessEqual[t, 3.5e-47]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+186} \lor \neg \left(t \leq 3.5 \cdot 10^{-47}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{c\_m \cdot z}\\
\end{array}
\end{array}
if t < -9.49999999999999999e186 or 3.4999999999999998e-47 < t Initial program 77.1%
associate-+l-77.1%
*-commutative77.1%
associate-*r*83.4%
*-commutative83.4%
associate-+l-83.4%
associate-*l*82.4%
associate-*l*80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in z around 0 75.4%
Taylor expanded in a around inf 49.2%
*-commutative49.2%
associate-/l*56.2%
Simplified56.2%
if -9.49999999999999999e186 < t < 3.4999999999999998e-47Initial program 81.3%
associate-+l-81.3%
*-commutative81.3%
associate-*r*81.2%
*-commutative81.2%
associate-+l-81.2%
associate-*l*81.2%
associate-*l*81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in x around inf 67.9%
associate-*r*68.0%
Simplified68.0%
Final simplification63.0%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= x -2.2e+50)
(/ (+ (* x (* 9.0 y)) b) (* c_m z))
(if (<= x 3.65e-13)
(/ (- (/ b z) (* (* t a) 4.0)) c_m)
(* 9.0 (* x (/ (/ y c_m) z)))))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (x <= -2.2e+50) {
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
} else if (x <= 3.65e-13) {
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
} else {
tmp = 9.0 * (x * ((y / c_m) / z));
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (x <= (-2.2d+50)) then
tmp = ((x * (9.0d0 * y)) + b) / (c_m * z)
else if (x <= 3.65d-13) then
tmp = ((b / z) - ((t * a) * 4.0d0)) / c_m
else
tmp = 9.0d0 * (x * ((y / c_m) / z))
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (x <= -2.2e+50) {
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
} else if (x <= 3.65e-13) {
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
} else {
tmp = 9.0 * (x * ((y / c_m) / z));
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if x <= -2.2e+50: tmp = ((x * (9.0 * y)) + b) / (c_m * z) elif x <= 3.65e-13: tmp = ((b / z) - ((t * a) * 4.0)) / c_m else: tmp = 9.0 * (x * ((y / c_m) / z)) return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (x <= -2.2e+50) tmp = Float64(Float64(Float64(x * Float64(9.0 * y)) + b) / Float64(c_m * z)); elseif (x <= 3.65e-13) tmp = Float64(Float64(Float64(b / z) - Float64(Float64(t * a) * 4.0)) / c_m); else tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c_m) / z))); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (x <= -2.2e+50)
tmp = ((x * (9.0 * y)) + b) / (c_m * z);
elseif (x <= 3.65e-13)
tmp = ((b / z) - ((t * a) * 4.0)) / c_m;
else
tmp = 9.0 * (x * ((y / c_m) / z));
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[x, -2.2e+50], N[(N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.65e-13], N[(N[(N[(b / z), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision], N[(9.0 * N[(x * N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+50}:\\
\;\;\;\;\frac{x \cdot \left(9 \cdot y\right) + b}{c\_m \cdot z}\\
\mathbf{elif}\;x \leq 3.65 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{b}{z} - \left(t \cdot a\right) \cdot 4}{c\_m}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c\_m}}{z}\right)\\
\end{array}
\end{array}
if x < -2.20000000000000017e50Initial program 83.9%
associate-+l-83.9%
*-commutative83.9%
associate-*r*83.9%
*-commutative83.9%
associate-+l-83.9%
associate-*l*83.8%
associate-*l*83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in x around inf 78.3%
associate-*r*78.4%
*-commutative78.4%
associate-*r*78.3%
Simplified78.3%
if -2.20000000000000017e50 < x < 3.6500000000000001e-13Initial program 76.9%
associate-+l-76.9%
*-commutative76.9%
associate-*r*81.1%
*-commutative81.1%
associate-+l-81.1%
associate-*l*80.3%
associate-*l*80.5%
*-commutative80.5%
Simplified80.5%
associate-+l-80.5%
div-sub76.8%
associate-*r*76.8%
*-commutative76.8%
associate-*l*76.7%
*-commutative76.7%
associate-*l*76.7%
Applied egg-rr76.7%
Taylor expanded in c around 0 87.8%
Taylor expanded in x around 0 81.4%
if 3.6500000000000001e-13 < x Initial program 81.6%
associate-+l-81.6%
*-commutative81.6%
associate-*r*83.0%
*-commutative83.0%
associate-+l-83.0%
associate-*l*82.9%
associate-*l*80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in x around inf 44.5%
associate-/l*49.6%
associate-/r*53.5%
Simplified53.5%
Final simplification72.8%
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
:precision binary64
(*
c_s
(if (<= b -4.3e+124)
(/ b (* c_m z))
(if (<= b 110000000.0) (* -4.0 (* t (/ a c_m))) (/ (/ b c_m) z)))))c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -4.3e+124) {
tmp = b / (c_m * z);
} else if (b <= 110000000.0) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = (b / c_m) / z;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (b <= (-4.3d+124)) then
tmp = b / (c_m * z)
else if (b <= 110000000.0d0) then
tmp = (-4.0d0) * (t * (a / c_m))
else
tmp = (b / c_m) / z
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (b <= -4.3e+124) {
tmp = b / (c_m * z);
} else if (b <= 110000000.0) {
tmp = -4.0 * (t * (a / c_m));
} else {
tmp = (b / c_m) / z;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if b <= -4.3e+124: tmp = b / (c_m * z) elif b <= 110000000.0: tmp = -4.0 * (t * (a / c_m)) else: tmp = (b / c_m) / z return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (b <= -4.3e+124) tmp = Float64(b / Float64(c_m * z)); elseif (b <= 110000000.0) tmp = Float64(-4.0 * Float64(t * Float64(a / c_m))); else tmp = Float64(Float64(b / c_m) / z); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (b <= -4.3e+124)
tmp = b / (c_m * z);
elseif (b <= 110000000.0)
tmp = -4.0 * (t * (a / c_m));
else
tmp = (b / c_m) / z;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -4.3e+124], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 110000000.0], N[(-4.0 * N[(t * N[(a / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq -4.3 \cdot 10^{+124}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{elif}\;b \leq 110000000:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\end{array}
\end{array}
if b < -4.3e124Initial program 77.6%
associate-+l-77.6%
*-commutative77.6%
associate-*r*82.0%
*-commutative82.0%
associate-+l-82.0%
associate-*l*82.0%
associate-*l*82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in b around inf 64.9%
*-commutative64.9%
Simplified64.9%
if -4.3e124 < b < 1.1e8Initial program 80.6%
associate-+l-80.6%
*-commutative80.6%
associate-*r*84.4%
*-commutative84.4%
associate-+l-84.4%
associate-*l*84.3%
associate-*l*83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in z around 0 81.8%
Taylor expanded in a around inf 45.3%
*-commutative45.3%
associate-/l*47.9%
Simplified47.9%
if 1.1e8 < b Initial program 78.4%
associate-+l-78.4%
*-commutative78.4%
associate-*r*76.8%
*-commutative76.8%
associate-+l-76.8%
associate-*l*75.2%
associate-*l*75.2%
*-commutative75.2%
Simplified75.2%
Taylor expanded in b around inf 52.2%
associate-/r*59.8%
Simplified59.8%
Final simplification53.7%
c\_m = (fabs.f64 c) c\_s = (copysign.f64 #s(literal 1 binary64) c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (if (<= c_m 1e-35) (/ b (* c_m z)) (/ (/ b c_m) z))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 1e-35) {
tmp = b / (c_m * z);
} else {
tmp = (b / c_m) / z;
}
return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
real(8) :: tmp
if (c_m <= 1d-35) then
tmp = b / (c_m * z)
else
tmp = (b / c_m) / z
end if
code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
double tmp;
if (c_m <= 1e-35) {
tmp = b / (c_m * z);
} else {
tmp = (b / c_m) / z;
}
return c_s * tmp;
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): tmp = 0 if c_m <= 1e-35: tmp = b / (c_m * z) else: tmp = (b / c_m) / z return c_s * tmp
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) tmp = 0.0 if (c_m <= 1e-35) tmp = Float64(b / Float64(c_m * z)); else tmp = Float64(Float64(b / c_m) / z); end return Float64(c_s * tmp) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
tmp = 0.0;
if (c_m <= 1e-35)
tmp = b / (c_m * z);
else
tmp = (b / c_m) / z;
end
tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[c$95$m, 1e-35], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;c\_m \leq 10^{-35}:\\
\;\;\;\;\frac{b}{c\_m \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
\end{array}
\end{array}
if c < 1.00000000000000001e-35Initial program 82.7%
associate-+l-82.7%
*-commutative82.7%
associate-*r*85.3%
*-commutative85.3%
associate-+l-85.3%
associate-*l*84.7%
associate-*l*85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in b around inf 38.9%
*-commutative38.9%
Simplified38.9%
if 1.00000000000000001e-35 < c Initial program 72.3%
associate-+l-72.3%
*-commutative72.3%
associate-*r*74.9%
*-commutative74.9%
associate-+l-74.9%
associate-*l*74.8%
associate-*l*70.0%
*-commutative70.0%
Simplified70.0%
Taylor expanded in b around inf 31.2%
associate-/r*34.8%
Simplified34.8%
Final simplification37.7%
c\_m = (fabs.f64 c) c\_s = (copysign.f64 #s(literal 1 binary64) c) NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function. (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (/ b (* c_m z))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
return c_s * (b / (c_m * z));
}
c\_m = abs(c)
c\_s = copysign(1.0d0, c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
real(8) function code(c_s, x, y, z, t, a, b, c_m)
real(8), intent (in) :: c_s
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c_m
code = c_s * (b / (c_m * z))
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
return c_s * (b / (c_m * z));
}
c\_m = math.fabs(c) c\_s = math.copysign(1.0, c) [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m]) def code(c_s, x, y, z, t, a, b, c_m): return c_s * (b / (c_m * z))
c\_m = abs(c) c\_s = copysign(1.0, c) x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m]) function code(c_s, x, y, z, t, a, b, c_m) return Float64(c_s * Float64(b / Float64(c_m * z))) end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp = code(c_s, x, y, z, t, a, b, c_m)
tmp = c_s * (b / (c_m * z));
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \frac{b}{c\_m \cdot z}
\end{array}
Initial program 79.6%
associate-+l-79.6%
*-commutative79.6%
associate-*r*82.2%
*-commutative82.2%
associate-+l-82.2%
associate-*l*81.7%
associate-*l*81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in b around inf 36.6%
*-commutative36.6%
Simplified36.6%
Final simplification36.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024074
(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)))