133 #define USE_PREDICATES_INIT 136 #ifdef USE_PREDICATES_INIT 147 #define Absolute(a) ((a) >= 0.0 ? (a) : -(a)) 163 #define Fast_Two_Sum_Tail(a, b, x, y) \ 167 #define Fast_Two_Sum(a, b, x, y) \ 168 x = (REAL) (a + b); \ 169 Fast_Two_Sum_Tail(a, b, x, y) 171 #define Fast_Two_Diff_Tail(a, b, x, y) \ 175 #define Fast_Two_Diff(a, b, x, y) \ 176 x = (REAL) (a - b); \ 177 Fast_Two_Diff_Tail(a, b, x, y) 179 #define Two_Sum_Tail(a, b, x, y) \ 180 bvirt = (REAL) (x - a); \ 182 bround = b - bvirt; \ 183 around = a - avirt; \ 186 #define Two_Sum(a, b, x, y) \ 187 x = (REAL) (a + b); \ 188 Two_Sum_Tail(a, b, x, y) 190 #define Two_Diff_Tail(a, b, x, y) \ 191 bvirt = (REAL) (a - x); \ 193 bround = bvirt - b; \ 194 around = a - avirt; \ 197 #define Two_Diff(a, b, x, y) \ 198 x = (REAL) (a - b); \ 199 Two_Diff_Tail(a, b, x, y) 201 #define Split(a, ahi, alo) \ 202 c = (REAL) (splitter * a); \ 203 abig = (REAL) (c - a); \ 207 #define Two_Product_Tail(a, b, x, y) \ 208 Split(a, ahi, alo); \ 209 Split(b, bhi, blo); \ 210 err1 = x - (ahi * bhi); \ 211 err2 = err1 - (alo * bhi); \ 212 err3 = err2 - (ahi * blo); \ 213 y = (alo * blo) - err3 215 #define Two_Product(a, b, x, y) \ 216 x = (REAL) (a * b); \ 217 Two_Product_Tail(a, b, x, y) 222 #define Two_Product_Presplit(a, b, bhi, blo, x, y) \ 223 x = (REAL) (a * b); \ 224 Split(a, ahi, alo); \ 225 err1 = x - (ahi * bhi); \ 226 err2 = err1 - (alo * bhi); \ 227 err3 = err2 - (ahi * blo); \ 228 y = (alo * blo) - err3 233 #define Two_Product_2Presplit(a, ahi, alo, b, bhi, blo, x, y) \ 234 x = (REAL) (a * b); \ 235 err1 = x - (ahi * bhi); \ 236 err2 = err1 - (alo * bhi); \ 237 err3 = err2 - (ahi * blo); \ 238 y = (alo * blo) - err3 242 #define Square_Tail(a, x, y) \ 243 Split(a, ahi, alo); \ 244 err1 = x - (ahi * ahi); \ 245 err3 = err1 - ((ahi + ahi) * alo); \ 246 y = (alo * alo) - err3 248 #define Square(a, x, y) \ 249 x = (REAL) (a * a); \ 255 #define Two_One_Sum(a1, a0, b, x2, x1, x0) \ 256 Two_Sum(a0, b , _i, x0); \ 257 Two_Sum(a1, _i, x2, x1) 259 #define Two_One_Diff(a1, a0, b, x2, x1, x0) \ 260 Two_Diff(a0, b , _i, x0); \ 261 Two_Sum( a1, _i, x2, x1) 263 #define Two_Two_Sum(a1, a0, b1, b0, x3, x2, x1, x0) \ 264 Two_One_Sum(a1, a0, b0, _j, _0, x0); \ 265 Two_One_Sum(_j, _0, b1, x3, x2, x1) 267 #define Two_Two_Diff(a1, a0, b1, b0, x3, x2, x1, x0) \ 268 Two_One_Diff(a1, a0, b0, _j, _0, x0); \ 269 Two_One_Diff(_j, _0, b1, x3, x2, x1) 271 #define Four_One_Sum(a3, a2, a1, a0, b, x4, x3, x2, x1, x0) \ 272 Two_One_Sum(a1, a0, b , _j, x1, x0); \ 273 Two_One_Sum(a3, a2, _j, x4, x3, x2) 275 #define Four_Two_Sum(a3, a2, a1, a0, b1, b0, x5, x4, x3, x2, x1, x0) \ 276 Four_One_Sum(a3, a2, a1, a0, b0, _k, _2, _1, _0, x0); \ 277 Four_One_Sum(_k, _2, _1, _0, b1, x5, x4, x3, x2, x1) 279 #define Four_Four_Sum(a3, a2, a1, a0, b4, b3, b1, b0, x7, x6, x5, x4, x3, x2, \ 281 Four_Two_Sum(a3, a2, a1, a0, b1, b0, _l, _2, _1, _0, x1, x0); \ 282 Four_Two_Sum(_l, _2, _1, _0, b4, b3, x7, x6, x5, x4, x3, x2) 284 #define Eight_One_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b, x8, x7, x6, x5, x4, \ 286 Four_One_Sum(a3, a2, a1, a0, b , _j, x3, x2, x1, x0); \ 287 Four_One_Sum(a7, a6, a5, a4, _j, x8, x7, x6, x5, x4) 289 #define Eight_Two_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b1, b0, x9, x8, x7, \ 290 x6, x5, x4, x3, x2, x1, x0) \ 291 Eight_One_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b0, _k, _6, _5, _4, _3, _2, \ 293 Eight_One_Sum(_k, _6, _5, _4, _3, _2, _1, _0, b1, x9, x8, x7, x6, x5, x4, \ 296 #define Eight_Four_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b4, b3, b1, b0, x11, \ 297 x10, x9, x8, x7, x6, x5, x4, x3, x2, x1, x0) \ 298 Eight_Two_Sum(a7, a6, a5, a4, a3, a2, a1, a0, b1, b0, _l, _6, _5, _4, _3, \ 299 _2, _1, _0, x1, x0); \ 300 Eight_Two_Sum(_l, _6, _5, _4, _3, _2, _1, _0, b4, b3, x11, x10, x9, x8, \ 301 x7, x6, x5, x4, x3, x2) 305 #define Two_One_Product(a1, a0, b, x3, x2, x1, x0) \ 306 Split(b, bhi, blo); \ 307 Two_Product_Presplit(a0, b, bhi, blo, _i, x0); \ 308 Two_Product_Presplit(a1, b, bhi, blo, _j, _0); \ 309 Two_Sum(_i, _0, _k, x1); \ 310 Fast_Two_Sum(_j, _k, x3, x2) 312 #define Four_One_Product(a3, a2, a1, a0, b, x7, x6, x5, x4, x3, x2, x1, x0) \ 313 Split(b, bhi, blo); \ 314 Two_Product_Presplit(a0, b, bhi, blo, _i, x0); \ 315 Two_Product_Presplit(a1, b, bhi, blo, _j, _0); \ 316 Two_Sum(_i, _0, _k, x1); \ 317 Fast_Two_Sum(_j, _k, _i, x2); \ 318 Two_Product_Presplit(a2, b, bhi, blo, _j, _0); \ 319 Two_Sum(_i, _0, _k, x3); \ 320 Fast_Two_Sum(_j, _k, _i, x4); \ 321 Two_Product_Presplit(a3, b, bhi, blo, _j, _0); \ 322 Two_Sum(_i, _0, _k, x5); \ 323 Fast_Two_Sum(_j, _k, x7, x6) 325 #define Two_Two_Product(a1, a0, b1, b0, x7, x6, x5, x4, x3, x2, x1, x0) \ 326 Split(a0, a0hi, a0lo); \ 327 Split(b0, bhi, blo); \ 328 Two_Product_2Presplit(a0, a0hi, a0lo, b0, bhi, blo, _i, x0); \ 329 Split(a1, a1hi, a1lo); \ 330 Two_Product_2Presplit(a1, a1hi, a1lo, b0, bhi, blo, _j, _0); \ 331 Two_Sum(_i, _0, _k, _1); \ 332 Fast_Two_Sum(_j, _k, _l, _2); \ 333 Split(b1, bhi, blo); \ 334 Two_Product_2Presplit(a0, a0hi, a0lo, b1, bhi, blo, _i, _0); \ 335 Two_Sum(_1, _0, _k, x1); \ 336 Two_Sum(_2, _k, _j, _1); \ 337 Two_Sum(_l, _j, _m, _2); \ 338 Two_Product_2Presplit(a1, a1hi, a1lo, b1, bhi, blo, _j, _0); \ 339 Two_Sum(_i, _0, _n, _0); \ 340 Two_Sum(_1, _0, _i, x2); \ 341 Two_Sum(_2, _i, _k, _1); \ 342 Two_Sum(_m, _k, _l, _2); \ 343 Two_Sum(_j, _n, _k, _0); \ 344 Two_Sum(_1, _0, _j, x3); \ 345 Two_Sum(_2, _j, _i, _1); \ 346 Two_Sum(_l, _i, _m, _2); \ 347 Two_Sum(_1, _k, _i, x4); \ 348 Two_Sum(_2, _i, _k, x5); \ 349 Two_Sum(_m, _k, x7, x6) 355 #define Two_Square(a1, a0, x5, x4, x3, x2, x1, x0) \ 356 Square(a0, _j, x0); \ 358 Two_Product(a1, _0, _k, _1); \ 359 Two_One_Sum(_k, _1, _j, _l, _2, x1); \ 360 Square(a1, _j, _1); \ 361 Two_Two_Sum(_j, _1, _l, _2, x5, x4, x3, x2) 363 #ifndef USE_PREDICATES_INIT 663 REAL avirt, bround, around;
664 int eindex, findex, hindex;
670 if ((fnow > enow) == (fnow > -enow)) {
678 if ((eindex < elen-1) && (findex < flen-1)) {
679 if ((fnow > enow) == (fnow > -enow)) {
690 while ((eindex < elen-1) && (findex < flen-1)) {
691 if ((fnow > enow) == (fnow > -enow)) {
704 while (eindex < elen-1) {
712 while (findex < flen-1) {
720 if ((Q != 0.0) || (hindex == 0)) {
751 REAL avirt, bround, around;
754 REAL ahi, alo, bhi, blo;
755 REAL err1, err2, err3;
763 for (eindex = 1; eindex < elen; eindex++) {
775 if ((Q != 0.0) || (hindex == 0)) {
795 for (eindex = 1; eindex < elen; eindex++) {
830 REAL acxtail, acytail, bcxtail, bcytail;
832 REAL detlefttail, detrighttail;
834 REAL B[4], C1[8], C2[12], D[16];
836 int C1length, C2length, Dlength;
843 REAL avirt, bround, around;
846 REAL ahi, alo, bhi, blo;
847 REAL err1, err2, err3;
851 acx = (
REAL) (pa[0] - pc[0]);
852 bcx = (
REAL) (pb[0] - pc[0]);
853 acy = (
REAL) (pa[1] - pc[1]);
854 bcy = (
REAL) (pb[1] - pc[1]);
859 Two_Two_Diff(detleft, detlefttail, detright, detrighttail,
860 B3, B[2], B[1], B[0]);
864 errbound = ccwerrboundB * detsum;
865 if ((det >= errbound) || (-det >= errbound)) {
874 if ((acxtail == 0.0) && (acytail == 0.0)
875 && (bcxtail == 0.0) && (bcytail == 0.0)) {
879 errbound = ccwerrboundC * detsum + resulterrbound *
Absolute(det);
880 det += (acx * bcytail + bcy * acxtail)
881 - (acy * bcxtail + bcx * acytail);
882 if ((det >= errbound) || (-det >= errbound)) {
904 return(D[Dlength - 1]);
909 REAL detleft, detright, det;
910 REAL detsum, errbound;
915 detleft = (pa[0] - pc[0]) * (pb[1] - pc[1]);
916 detright = (pa[1] - pc[1]) * (pb[0] - pc[0]);
917 det = detleft - detright;
920 if (detright <= 0.0) {
924 detsum = detleft + detright;
926 }
else if (detleft < 0.0) {
927 if (detright >= 0.0) {
931 detsum = -detleft - detright;
938 errbound = ccwerrboundA * detsum;
939 if ((det >= errbound) || (-det >= errbound)) {
981 INEXACT REAL adx, bdx, cdx, ady, bdy, cdy, adz, bdz, cdz;
984 INEXACT REAL bdxcdy1, cdxbdy1, cdxady1, adxcdy1, adxbdy1, bdxady1;
985 REAL bdxcdy0, cdxbdy0, cdxady0, adxcdy0, adxbdy0, bdxady0;
986 REAL bc[4], ca[4], ab[4];
988 REAL adet[8], bdet[8], cdet[8];
989 int alen, blen, clen;
992 REAL *finnow, *finother, *finswap;
993 REAL fin1[192], fin2[192];
996 REAL adxtail, bdxtail, cdxtail;
997 REAL adytail, bdytail, cdytail;
998 REAL adztail, bdztail, cdztail;
1002 REAL at_b[4], at_c[4], bt_c[4], bt_a[4], ct_a[4], ct_b[4];
1003 int at_blen, at_clen, bt_clen, bt_alen, ct_alen, ct_blen;
1006 REAL bdxt_cdy0, cdxt_bdy0, cdxt_ady0;
1007 REAL adxt_cdy0, adxt_bdy0, bdxt_ady0;
1010 REAL bdyt_cdx0, cdyt_bdx0, cdyt_adx0;
1011 REAL adyt_cdx0, adyt_bdx0, bdyt_adx0;
1012 REAL bct[8], cat[8], abt[8];
1013 int bctlen, catlen, abtlen;
1016 REAL bdxt_cdyt0, cdxt_bdyt0, cdxt_adyt0;
1017 REAL adxt_cdyt0, adxt_bdyt0, bdxt_adyt0;
1018 REAL u[4], v[12], w[16];
1020 int vlength, wlength;
1024 REAL avirt, bround, around;
1027 REAL ahi, alo, bhi, blo;
1028 REAL err1, err2, err3;
1032 adx = (
REAL) (pa[0] - pd[0]);
1033 bdx = (
REAL) (pb[0] - pd[0]);
1034 cdx = (
REAL) (pc[0] - pd[0]);
1035 ady = (
REAL) (pa[1] - pd[1]);
1036 bdy = (
REAL) (pb[1] - pd[1]);
1037 cdy = (
REAL) (pc[1] - pd[1]);
1038 adz = (
REAL) (pa[2] - pd[2]);
1039 bdz = (
REAL) (pb[2] - pd[2]);
1040 cdz = (
REAL) (pc[2] - pd[2]);
1044 Two_Two_Diff(bdxcdy1, bdxcdy0, cdxbdy1, cdxbdy0, bc3, bc[2], bc[1], bc[0]);
1050 Two_Two_Diff(cdxady1, cdxady0, adxcdy1, adxcdy0, ca3, ca[2], ca[1], ca[0]);
1056 Two_Two_Diff(adxbdy1, adxbdy0, bdxady1, bdxady0, ab3, ab[2], ab[1], ab[0]);
1064 errbound = o3derrboundB * permanent;
1065 if ((det >= errbound) || (-det >= errbound)) {
1079 if ((adxtail == 0.0) && (bdxtail == 0.0) && (cdxtail == 0.0)
1080 && (adytail == 0.0) && (bdytail == 0.0) && (cdytail == 0.0)
1081 && (adztail == 0.0) && (bdztail == 0.0) && (cdztail == 0.0)) {
1085 errbound = o3derrboundC * permanent + resulterrbound *
Absolute(det);
1086 det += (adz * ((bdx * cdytail + cdy * bdxtail)
1087 - (bdy * cdxtail + cdx * bdytail))
1088 + adztail * (bdx * cdy - bdy * cdx))
1089 + (bdz * ((cdx * adytail + ady * cdxtail)
1090 - (cdy * adxtail + adx * cdytail))
1091 + bdztail * (cdx * ady - cdy * adx))
1092 + (cdz * ((adx * bdytail + bdy * adxtail)
1093 - (ady * bdxtail + bdx * adytail))
1094 + cdztail * (adx * bdy - ady * bdx));
1095 if ((det >= errbound) || (-det >= errbound)) {
1102 if (adxtail == 0.0) {
1103 if (adytail == 0.0) {
1111 at_b[1] = at_blarge;
1114 at_c[1] = at_clarge;
1118 if (adytail == 0.0) {
1120 at_b[1] = at_blarge;
1124 at_c[1] = at_clarge;
1129 Two_Two_Diff(adxt_bdy1, adxt_bdy0, adyt_bdx1, adyt_bdx0,
1130 at_blarge, at_b[2], at_b[1], at_b[0]);
1131 at_b[3] = at_blarge;
1135 Two_Two_Diff(adyt_cdx1, adyt_cdx0, adxt_cdy1, adxt_cdy0,
1136 at_clarge, at_c[2], at_c[1], at_c[0]);
1137 at_c[3] = at_clarge;
1141 if (bdxtail == 0.0) {
1142 if (bdytail == 0.0) {
1150 bt_c[1] = bt_clarge;
1153 bt_a[1] = bt_alarge;
1157 if (bdytail == 0.0) {
1159 bt_c[1] = bt_clarge;
1163 bt_a[1] = bt_alarge;
1168 Two_Two_Diff(bdxt_cdy1, bdxt_cdy0, bdyt_cdx1, bdyt_cdx0,
1169 bt_clarge, bt_c[2], bt_c[1], bt_c[0]);
1170 bt_c[3] = bt_clarge;
1174 Two_Two_Diff(bdyt_adx1, bdyt_adx0, bdxt_ady1, bdxt_ady0,
1175 bt_alarge, bt_a[2], bt_a[1], bt_a[0]);
1176 bt_a[3] = bt_alarge;
1180 if (cdxtail == 0.0) {
1181 if (cdytail == 0.0) {
1189 ct_a[1] = ct_alarge;
1192 ct_b[1] = ct_blarge;
1196 if (cdytail == 0.0) {
1198 ct_a[1] = ct_alarge;
1202 ct_b[1] = ct_blarge;
1207 Two_Two_Diff(cdxt_ady1, cdxt_ady0, cdyt_adx1, cdyt_adx0,
1208 ct_alarge, ct_a[2], ct_a[1], ct_a[0]);
1209 ct_a[3] = ct_alarge;
1213 Two_Two_Diff(cdyt_bdx1, cdyt_bdx0, cdxt_bdy1, cdxt_bdy0,
1214 ct_blarge, ct_b[2], ct_b[1], ct_b[0]);
1215 ct_b[3] = ct_blarge;
1224 finswap = finnow; finnow = finother; finother = finswap;
1230 finswap = finnow; finnow = finother; finother = finswap;
1236 finswap = finnow; finnow = finother; finother = finswap;
1238 if (adztail != 0.0) {
1242 finswap = finnow; finnow = finother; finother = finswap;
1244 if (bdztail != 0.0) {
1248 finswap = finnow; finnow = finother; finother = finswap;
1250 if (cdztail != 0.0) {
1254 finswap = finnow; finnow = finother; finother = finswap;
1257 if (adxtail != 0.0) {
1258 if (bdytail != 0.0) {
1259 Two_Product(adxtail, bdytail, adxt_bdyt1, adxt_bdyt0);
1264 finswap = finnow; finnow = finother; finother = finswap;
1265 if (cdztail != 0.0) {
1266 Two_One_Product(adxt_bdyt1, adxt_bdyt0, cdztail, u3, u[2], u[1], u[0]);
1270 finswap = finnow; finnow = finother; finother = finswap;
1273 if (cdytail != 0.0) {
1275 Two_Product(negate, cdytail, adxt_cdyt1, adxt_cdyt0);
1280 finswap = finnow; finnow = finother; finother = finswap;
1281 if (bdztail != 0.0) {
1282 Two_One_Product(adxt_cdyt1, adxt_cdyt0, bdztail, u3, u[2], u[1], u[0]);
1286 finswap = finnow; finnow = finother; finother = finswap;
1290 if (bdxtail != 0.0) {
1291 if (cdytail != 0.0) {
1292 Two_Product(bdxtail, cdytail, bdxt_cdyt1, bdxt_cdyt0);
1297 finswap = finnow; finnow = finother; finother = finswap;
1298 if (adztail != 0.0) {
1299 Two_One_Product(bdxt_cdyt1, bdxt_cdyt0, adztail, u3, u[2], u[1], u[0]);
1303 finswap = finnow; finnow = finother; finother = finswap;
1306 if (adytail != 0.0) {
1308 Two_Product(negate, adytail, bdxt_adyt1, bdxt_adyt0);
1313 finswap = finnow; finnow = finother; finother = finswap;
1314 if (cdztail != 0.0) {
1315 Two_One_Product(bdxt_adyt1, bdxt_adyt0, cdztail, u3, u[2], u[1], u[0]);
1319 finswap = finnow; finnow = finother; finother = finswap;
1323 if (cdxtail != 0.0) {
1324 if (adytail != 0.0) {
1325 Two_Product(cdxtail, adytail, cdxt_adyt1, cdxt_adyt0);
1330 finswap = finnow; finnow = finother; finother = finswap;
1331 if (bdztail != 0.0) {
1332 Two_One_Product(cdxt_adyt1, cdxt_adyt0, bdztail, u3, u[2], u[1], u[0]);
1336 finswap = finnow; finnow = finother; finother = finswap;
1339 if (bdytail != 0.0) {
1341 Two_Product(negate, bdytail, cdxt_bdyt1, cdxt_bdyt0);
1346 finswap = finnow; finnow = finother; finother = finswap;
1347 if (adztail != 0.0) {
1348 Two_One_Product(cdxt_bdyt1, cdxt_bdyt0, adztail, u3, u[2], u[1], u[0]);
1352 finswap = finnow; finnow = finother; finother = finswap;
1357 if (adztail != 0.0) {
1361 finswap = finnow; finnow = finother; finother = finswap;
1363 if (bdztail != 0.0) {
1367 finswap = finnow; finnow = finother; finother = finswap;
1369 if (cdztail != 0.0) {
1373 finswap = finnow; finnow = finother; finother = finswap;
1376 return finnow[finlength - 1];
1381 REAL adx, bdx, cdx, ady, bdy, cdy, adz, bdz, cdz;
1382 REAL bdxcdy, cdxbdy, cdxady, adxcdy, adxbdy, bdxady;
1384 REAL permanent, errbound;
1389 adx = pa[0] - pd[0];
1390 bdx = pb[0] - pd[0];
1391 cdx = pc[0] - pd[0];
1392 ady = pa[1] - pd[1];
1393 bdy = pb[1] - pd[1];
1394 cdy = pc[1] - pd[1];
1395 adz = pa[2] - pd[2];
1396 bdz = pb[2] - pd[2];
1397 cdz = pc[2] - pd[2];
1408 det = adz * (bdxcdy - cdxbdy)
1409 + bdz * (cdxady - adxcdy)
1410 + cdz * (adxbdy - bdxady);
1415 errbound = o3derrboundA * permanent;
1416 if ((det > errbound) || (-det > errbound)) {
1458 INEXACT REAL bdxcdy1, cdxbdy1, cdxady1, adxcdy1, adxbdy1, bdxady1;
1459 REAL bdxcdy0, cdxbdy0, cdxady0, adxcdy0, adxbdy0, bdxady0;
1460 REAL bc[4], ca[4], ab[4];
1462 REAL axbc[8], axxbc[16], aybc[8], ayybc[16], adet[32];
1463 int axbclen, axxbclen, aybclen, ayybclen, alen;
1464 REAL bxca[8], bxxca[16], byca[8], byyca[16], bdet[32];
1465 int bxcalen, bxxcalen, bycalen, byycalen, blen;
1466 REAL cxab[8], cxxab[16], cyab[8], cyyab[16], cdet[32];
1467 int cxablen, cxxablen, cyablen, cyyablen, clen;
1470 REAL fin1[1152], fin2[1152];
1471 REAL *finnow, *finother, *finswap;
1474 REAL adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail;
1475 INEXACT REAL adxadx1, adyady1, bdxbdx1, bdybdy1, cdxcdx1, cdycdy1;
1476 REAL adxadx0, adyady0, bdxbdx0, bdybdy0, cdxcdx0, cdycdy0;
1477 REAL aa[4], bb[4], cc[4];
1483 REAL temp8[8], temp16a[16], temp16b[16], temp16c[16];
1484 REAL temp32a[32], temp32b[32], temp48[48], temp64[64];
1485 int temp8len, temp16alen, temp16blen, temp16clen;
1486 int temp32alen, temp32blen, temp48len, temp64len;
1487 REAL axtbb[8], axtcc[8], aytbb[8], aytcc[8];
1488 int axtbblen, axtcclen, aytbblen, aytcclen;
1489 REAL bxtaa[8], bxtcc[8], bytaa[8], bytcc[8];
1490 int bxtaalen, bxtcclen, bytaalen, bytcclen;
1491 REAL cxtaa[8], cxtbb[8], cytaa[8], cytbb[8];
1492 int cxtaalen, cxtbblen, cytaalen, cytbblen;
1493 REAL axtbc[8], aytbc[8], bxtca[8], bytca[8], cxtab[8], cytab[8];
1494 int axtbclen = 0, aytbclen = 0;
1495 int bxtcalen = 0, bytcalen = 0;
1496 int cxtablen = 0, cytablen = 0;
1497 REAL axtbct[16], aytbct[16], bxtcat[16], bytcat[16], cxtabt[16], cytabt[16];
1498 int axtbctlen, aytbctlen, bxtcatlen, bytcatlen, cxtabtlen, cytabtlen;
1499 REAL axtbctt[8], aytbctt[8], bxtcatt[8];
1500 REAL bytcatt[8], cxtabtt[8], cytabtt[8];
1501 int axtbcttlen, aytbcttlen, bxtcattlen, bytcattlen, cxtabttlen, cytabttlen;
1502 REAL abt[8], bct[8], cat[8];
1503 int abtlen, bctlen, catlen;
1504 REAL abtt[4], bctt[4], catt[4];
1505 int abttlen, bcttlen, cattlen;
1510 REAL avirt, bround, around;
1513 REAL ahi, alo, bhi, blo;
1514 REAL err1, err2, err3;
1518 adx = (
REAL) (pa[0] - pd[0]);
1519 bdx = (
REAL) (pb[0] - pd[0]);
1520 cdx = (
REAL) (pc[0] - pd[0]);
1521 ady = (
REAL) (pa[1] - pd[1]);
1522 bdy = (
REAL) (pb[1] - pd[1]);
1523 cdy = (
REAL) (pc[1] - pd[1]);
1527 Two_Two_Diff(bdxcdy1, bdxcdy0, cdxbdy1, cdxbdy0, bc3, bc[2], bc[1], bc[0]);
1537 Two_Two_Diff(cdxady1, cdxady0, adxcdy1, adxcdy0, ca3, ca[2], ca[1], ca[0]);
1547 Two_Two_Diff(adxbdy1, adxbdy0, bdxady1, bdxady0, ab3, ab[2], ab[1], ab[0]);
1559 errbound = iccerrboundB * permanent;
1560 if ((det >= errbound) || (-det >= errbound)) {
1570 if ((adxtail == 0.0) && (bdxtail == 0.0) && (cdxtail == 0.0)
1571 && (adytail == 0.0) && (bdytail == 0.0) && (cdytail == 0.0)) {
1575 errbound = iccerrboundC * permanent + resulterrbound *
Absolute(det);
1576 det += ((adx * adx + ady * ady) * ((bdx * cdytail + cdy * bdxtail)
1577 - (bdy * cdxtail + cdx * bdytail))
1578 + 2.0 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx))
1579 + ((bdx * bdx + bdy * bdy) * ((cdx * adytail + ady * cdxtail)
1580 - (cdy * adxtail + adx * cdytail))
1581 + 2.0 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx))
1582 + ((cdx * cdx + cdy * cdy) * ((adx * bdytail + bdy * adxtail)
1583 - (ady * bdxtail + bdx * adytail))
1584 + 2.0 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx));
1585 if ((det >= errbound) || (-det >= errbound)) {
1592 if ((bdxtail != 0.0) || (bdytail != 0.0)
1593 || (cdxtail != 0.0) || (cdytail != 0.0)) {
1594 Square(adx, adxadx1, adxadx0);
1595 Square(ady, adyady1, adyady0);
1596 Two_Two_Sum(adxadx1, adxadx0, adyady1, adyady0, aa3, aa[2], aa[1], aa[0]);
1599 if ((cdxtail != 0.0) || (cdytail != 0.0)
1600 || (adxtail != 0.0) || (adytail != 0.0)) {
1601 Square(bdx, bdxbdx1, bdxbdx0);
1602 Square(bdy, bdybdy1, bdybdy0);
1603 Two_Two_Sum(bdxbdx1, bdxbdx0, bdybdy1, bdybdy0, bb3, bb[2], bb[1], bb[0]);
1606 if ((adxtail != 0.0) || (adytail != 0.0)
1607 || (bdxtail != 0.0) || (bdytail != 0.0)) {
1608 Square(cdx, cdxcdx1, cdxcdx0);
1609 Square(cdy, cdycdy1, cdycdy0);
1610 Two_Two_Sum(cdxcdx1, cdxcdx0, cdycdy1, cdycdy0, cc3, cc[2], cc[1], cc[0]);
1614 if (adxtail != 0.0) {
1626 temp16blen, temp16b, temp32a);
1628 temp32alen, temp32a, temp48);
1631 finswap = finnow; finnow = finother; finother = finswap;
1633 if (adytail != 0.0) {
1645 temp16blen, temp16b, temp32a);
1647 temp32alen, temp32a, temp48);
1650 finswap = finnow; finnow = finother; finother = finswap;
1652 if (bdxtail != 0.0) {
1664 temp16blen, temp16b, temp32a);
1666 temp32alen, temp32a, temp48);
1669 finswap = finnow; finnow = finother; finother = finswap;
1671 if (bdytail != 0.0) {
1683 temp16blen, temp16b, temp32a);
1685 temp32alen, temp32a, temp48);
1688 finswap = finnow; finnow = finother; finother = finswap;
1690 if (cdxtail != 0.0) {
1702 temp16blen, temp16b, temp32a);
1704 temp32alen, temp32a, temp48);
1707 finswap = finnow; finnow = finother; finother = finswap;
1709 if (cdytail != 0.0) {
1721 temp16blen, temp16b, temp32a);
1723 temp32alen, temp32a, temp48);
1726 finswap = finnow; finnow = finother; finother = finswap;
1729 if ((adxtail != 0.0) || (adytail != 0.0)) {
1730 if ((bdxtail != 0.0) || (bdytail != 0.0)
1731 || (cdxtail != 0.0) || (cdytail != 0.0)) {
1734 Two_Two_Sum(ti1, ti0, tj1, tj0, u3, u[2], u[1], u[0]);
1740 Two_Two_Sum(ti1, ti0, tj1, tj0, v3, v[2], v[1], v[0]);
1746 Two_Two_Diff(ti1, ti0, tj1, tj0, bctt3, bctt[2], bctt[1], bctt[0]);
1756 if (adxtail != 0.0) {
1762 temp32alen, temp32a, temp48);
1765 finswap = finnow; finnow = finother; finother = finswap;
1766 if (bdytail != 0.0) {
1772 finswap = finnow; finnow = finother; finother = finswap;
1774 if (cdytail != 0.0) {
1780 finswap = finnow; finnow = finother; finother = finswap;
1791 temp16blen, temp16b, temp32b);
1793 temp32blen, temp32b, temp64);
1796 finswap = finnow; finnow = finother; finother = finswap;
1798 if (adytail != 0.0) {
1804 temp32alen, temp32a, temp48);
1807 finswap = finnow; finnow = finother; finother = finswap;
1818 temp16blen, temp16b, temp32b);
1820 temp32blen, temp32b, temp64);
1823 finswap = finnow; finnow = finother; finother = finswap;
1826 if ((bdxtail != 0.0) || (bdytail != 0.0)) {
1827 if ((cdxtail != 0.0) || (cdytail != 0.0)
1828 || (adxtail != 0.0) || (adytail != 0.0)) {
1831 Two_Two_Sum(ti1, ti0, tj1, tj0, u3, u[2], u[1], u[0]);
1837 Two_Two_Sum(ti1, ti0, tj1, tj0, v3, v[2], v[1], v[0]);
1843 Two_Two_Diff(ti1, ti0, tj1, tj0, catt3, catt[2], catt[1], catt[0]);
1853 if (bdxtail != 0.0) {
1859 temp32alen, temp32a, temp48);
1862 finswap = finnow; finnow = finother; finother = finswap;
1863 if (cdytail != 0.0) {
1869 finswap = finnow; finnow = finother; finother = finswap;
1871 if (adytail != 0.0) {
1877 finswap = finnow; finnow = finother; finother = finswap;
1888 temp16blen, temp16b, temp32b);
1890 temp32blen, temp32b, temp64);
1893 finswap = finnow; finnow = finother; finother = finswap;
1895 if (bdytail != 0.0) {
1901 temp32alen, temp32a, temp48);
1904 finswap = finnow; finnow = finother; finother = finswap;
1915 temp16blen, temp16b, temp32b);
1917 temp32blen, temp32b, temp64);
1920 finswap = finnow; finnow = finother; finother = finswap;
1923 if ((cdxtail != 0.0) || (cdytail != 0.0)) {
1924 if ((adxtail != 0.0) || (adytail != 0.0)
1925 || (bdxtail != 0.0) || (bdytail != 0.0)) {
1928 Two_Two_Sum(ti1, ti0, tj1, tj0, u3, u[2], u[1], u[0]);
1934 Two_Two_Sum(ti1, ti0, tj1, tj0, v3, v[2], v[1], v[0]);
1940 Two_Two_Diff(ti1, ti0, tj1, tj0, abtt3, abtt[2], abtt[1], abtt[0]);
1950 if (cdxtail != 0.0) {
1956 temp32alen, temp32a, temp48);
1959 finswap = finnow; finnow = finother; finother = finswap;
1960 if (adytail != 0.0) {
1966 finswap = finnow; finnow = finother; finother = finswap;
1968 if (bdytail != 0.0) {
1974 finswap = finnow; finnow = finother; finother = finswap;
1985 temp16blen, temp16b, temp32b);
1987 temp32blen, temp32b, temp64);
1990 finswap = finnow; finnow = finother; finother = finswap;
1992 if (cdytail != 0.0) {
1998 temp32alen, temp32a, temp48);
2001 finswap = finnow; finnow = finother; finother = finswap;
2012 temp16blen, temp16b, temp32b);
2014 temp32blen, temp32b, temp64);
2017 finswap = finnow; finnow = finother; finother = finswap;
2021 return finnow[finlength - 1];
2026 REAL adx, bdx, cdx, ady, bdy, cdy;
2027 REAL bdxcdy, cdxbdy, cdxady, adxcdy, adxbdy, bdxady;
2028 REAL alift, blift, clift;
2030 REAL permanent, errbound;
2035 adx = pa[0] - pd[0];
2036 bdx = pb[0] - pd[0];
2037 cdx = pc[0] - pd[0];
2038 ady = pa[1] - pd[1];
2039 bdy = pb[1] - pd[1];
2040 cdy = pc[1] - pd[1];
2044 alift = adx * adx + ady * ady;
2048 blift = bdx * bdx + bdy * bdy;
2052 clift = cdx * cdx + cdy * cdy;
2054 det = alift * (bdxcdy - cdxbdy)
2055 + blift * (cdxady - adxcdy)
2056 + clift * (adxbdy - bdxady);
2061 errbound = iccerrboundA * permanent;
2062 if ((det > errbound) || (-det > errbound)) {
2105 REAL axby0, bxcy0, cxdy0, dxey0, exay0;
2106 REAL bxay0, cxby0, dxcy0, exdy0, axey0;
2107 REAL axcy0, bxdy0, cxey0, dxay0, exby0;
2108 REAL cxay0, dxby0, excy0, axdy0, bxey0;
2109 REAL ab[4], bc[4], cd[4], de[4], ea[4];
2110 REAL ac[4], bd[4], ce[4], da[4], eb[4];
2111 REAL temp8a[8], temp8b[8], temp16[16];
2112 int temp8alen, temp8blen, temp16len;
2113 REAL abc[24], bcd[24], cde[24], dea[24], eab[24];
2114 REAL abd[24], bce[24], cda[24], deb[24], eac[24];
2115 int abclen, bcdlen, cdelen, dealen, eablen;
2116 int abdlen, bcelen, cdalen, deblen, eaclen;
2117 REAL temp48a[48], temp48b[48];
2118 int temp48alen, temp48blen;
2119 REAL abcd[96], bcde[96], cdea[96], deab[96], eabc[96];
2120 int abcdlen, bcdelen, cdealen, deablen, eabclen;
2122 REAL det384x[384], det384y[384], det384z[384];
2123 int xlen, ylen, zlen;
2126 REAL adet[1152], bdet[1152], cdet[1152], ddet[1152], edet[1152];
2127 int alen, blen, clen, dlen, elen;
2128 REAL abdet[2304], cddet[2304], cdedet[3456];
2135 REAL avirt, bround, around;
2138 REAL ahi, alo, bhi, blo;
2139 REAL err1, err2, err3;
2145 Two_Two_Diff(axby1, axby0, bxay1, bxay0, ab[3], ab[2], ab[1], ab[0]);
2149 Two_Two_Diff(bxcy1, bxcy0, cxby1, cxby0, bc[3], bc[2], bc[1], bc[0]);
2153 Two_Two_Diff(cxdy1, cxdy0, dxcy1, dxcy0, cd[3], cd[2], cd[1], cd[0]);
2157 Two_Two_Diff(dxey1, dxey0, exdy1, exdy0, de[3], de[2], de[1], de[0]);
2161 Two_Two_Diff(exay1, exay0, axey1, axey0, ea[3], ea[2], ea[1], ea[0]);
2165 Two_Two_Diff(axcy1, axcy0, cxay1, cxay0, ac[3], ac[2], ac[1], ac[0]);
2169 Two_Two_Diff(bxdy1, bxdy0, dxby1, dxby0, bd[3], bd[2], bd[1], bd[0]);
2173 Two_Two_Diff(cxey1, cxey0, excy1, excy0, ce[3], ce[2], ce[1], ce[0]);
2177 Two_Two_Diff(dxay1, dxay0, axdy1, axdy0, da[3], da[2], da[1], da[0]);
2181 Two_Two_Diff(exby1, exby0, bxey1, bxey0, eb[3], eb[2], eb[1], eb[0]);
2265 for (i = 0; i < temp48blen; i++) {
2266 temp48b[i] = -temp48b[i];
2269 temp48blen, temp48b, bcde);
2281 for (i = 0; i < temp48blen; i++) {
2282 temp48b[i] = -temp48b[i];
2285 temp48blen, temp48b, cdea);
2297 for (i = 0; i < temp48blen; i++) {
2298 temp48b[i] = -temp48b[i];
2301 temp48blen, temp48b, deab);
2313 for (i = 0; i < temp48blen; i++) {
2314 temp48b[i] = -temp48b[i];
2317 temp48blen, temp48b, eabc);
2329 for (i = 0; i < temp48blen; i++) {
2330 temp48b[i] = -temp48b[i];
2333 temp48blen, temp48b, abcd);
2348 return deter[deterlen - 1];
2354 INEXACT REAL aex, bex, cex, dex, aey, bey, cey, dey, aez, bez, cez, dez;
2360 REAL aexbey0, bexaey0, bexcey0, cexbey0;
2361 REAL cexdey0, dexcey0, dexaey0, aexdey0;
2362 REAL aexcey0, cexaey0, bexdey0, dexbey0;
2363 REAL ab[4], bc[4], cd[4], da[4], ac[4], bd[4];
2365 REAL abeps, bceps, cdeps, daeps, aceps, bdeps;
2366 REAL temp8a[8], temp8b[8], temp8c[8], temp16[16], temp24[24], temp48[48];
2367 int temp8alen, temp8blen, temp8clen, temp16len, temp24len, temp48len;
2368 REAL xdet[96], ydet[96], zdet[96], xydet[192];
2369 int xlen, ylen, zlen, xylen;
2370 REAL adet[288], bdet[288], cdet[288], ddet[288];
2371 int alen, blen, clen, dlen;
2372 REAL abdet[576], cddet[576];
2377 REAL aextail, bextail, cextail, dextail;
2378 REAL aeytail, beytail, ceytail, deytail;
2379 REAL aeztail, beztail, ceztail, deztail;
2382 REAL avirt, bround, around;
2385 REAL ahi, alo, bhi, blo;
2386 REAL err1, err2, err3;
2390 aex = (
REAL) (pa[0] - pe[0]);
2391 bex = (
REAL) (pb[0] - pe[0]);
2392 cex = (
REAL) (pc[0] - pe[0]);
2393 dex = (
REAL) (pd[0] - pe[0]);
2394 aey = (
REAL) (pa[1] - pe[1]);
2395 bey = (
REAL) (pb[1] - pe[1]);
2396 cey = (
REAL) (pc[1] - pe[1]);
2397 dey = (
REAL) (pd[1] - pe[1]);
2398 aez = (
REAL) (pa[2] - pe[2]);
2399 bez = (
REAL) (pb[2] - pe[2]);
2400 cez = (
REAL) (pc[2] - pe[2]);
2401 dez = (
REAL) (pd[2] - pe[2]);
2405 Two_Two_Diff(aexbey1, aexbey0, bexaey1, bexaey0, ab3, ab[2], ab[1], ab[0]);
2410 Two_Two_Diff(bexcey1, bexcey0, cexbey1, cexbey0, bc3, bc[2], bc[1], bc[0]);
2415 Two_Two_Diff(cexdey1, cexdey0, dexcey1, dexcey0, cd3, cd[2], cd[1], cd[0]);
2420 Two_Two_Diff(dexaey1, dexaey0, aexdey1, aexdey0, da3, da[2], da[1], da[0]);
2425 Two_Two_Diff(aexcey1, aexcey0, cexaey1, cexaey0, ac3, ac[2], ac[1], ac[0]);
2430 Two_Two_Diff(bexdey1, bexdey0, dexbey1, dexbey0, bd3, bd[2], bd[1], bd[0]);
2437 temp8blen, temp8b, temp16);
2439 temp16len, temp16, temp24);
2453 temp8blen, temp8b, temp16);
2455 temp16len, temp16, temp24);
2469 temp8blen, temp8b, temp16);
2471 temp16len, temp16, temp24);
2485 temp8blen, temp8b, temp16);
2487 temp16len, temp16, temp24);
2502 errbound = isperrboundB * permanent;
2503 if ((det >= errbound) || (-det >= errbound)) {
2519 if ((aextail == 0.0) && (aeytail == 0.0) && (aeztail == 0.0)
2520 && (bextail == 0.0) && (beytail == 0.0) && (beztail == 0.0)
2521 && (cextail == 0.0) && (ceytail == 0.0) && (ceztail == 0.0)
2522 && (dextail == 0.0) && (deytail == 0.0) && (deztail == 0.0)) {
2526 errbound = isperrboundC * permanent + resulterrbound *
Absolute(det);
2527 abeps = (aex * beytail + bey * aextail)
2528 - (aey * bextail + bex * aeytail);
2529 bceps = (bex * ceytail + cey * bextail)
2530 - (bey * cextail + cex * beytail);
2531 cdeps = (cex * deytail + dey * cextail)
2532 - (cey * dextail + dex * ceytail);
2533 daeps = (dex * aeytail + aey * dextail)
2534 - (dey * aextail + aex * deytail);
2535 aceps = (aex * ceytail + cey * aextail)
2536 - (aey * cextail + cex * aeytail);
2537 bdeps = (bex * deytail + dey * bextail)
2538 - (bey * dextail + dex * beytail);
2539 det += (((bex * bex + bey * bey + bez * bez)
2540 * ((cez * daeps + dez * aceps + aez * cdeps)
2541 + (ceztail * da3 + deztail * ac3 + aeztail * cd3))
2542 + (dex * dex + dey * dey + dez * dez)
2543 * ((aez * bceps - bez * aceps + cez * abeps)
2544 + (aeztail * bc3 - beztail * ac3 + ceztail * ab3)))
2545 - ((aex * aex + aey * aey + aez * aez)
2546 * ((bez * cdeps - cez * bdeps + dez * bceps)
2547 + (beztail * cd3 - ceztail * bd3 + deztail * bc3))
2548 + (cex * cex + cey * cey + cez * cez)
2549 * ((dez * abeps + aez * bdeps + bez * daeps)
2550 + (deztail * ab3 + aeztail * bd3 + beztail * da3))))
2551 + 2.0 * (((bex * bextail + bey * beytail + bez * beztail)
2552 * (cez * da3 + dez * ac3 + aez * cd3)
2553 + (dex * dextail + dey * deytail + dez * deztail)
2554 * (aez * bc3 - bez * ac3 + cez * ab3))
2555 - ((aex * aextail + aey * aeytail + aez * aeztail)
2556 * (bez * cd3 - cez * bd3 + dez * bc3)
2557 + (cex * cextail + cey * ceytail + cez * ceztail)
2558 * (dez * ab3 + aez * bd3 + bez * da3)));
2559 if ((det >= errbound) || (-det >= errbound)) {
2568 REAL aex, bex, cex, dex;
2569 REAL aey, bey, cey, dey;
2570 REAL aez, bez, cez, dez;
2571 REAL aexbey, bexaey, bexcey, cexbey, cexdey, dexcey, dexaey, aexdey;
2572 REAL aexcey, cexaey, bexdey, dexbey;
2573 REAL alift, blift, clift, dlift;
2574 REAL ab, bc, cd, da, ac, bd;
2575 REAL abc, bcd, cda, dab;
2576 REAL aezplus, bezplus, cezplus, dezplus;
2577 REAL aexbeyplus, bexaeyplus, bexceyplus, cexbeyplus;
2578 REAL cexdeyplus, dexceyplus, dexaeyplus, aexdeyplus;
2579 REAL aexceyplus, cexaeyplus, bexdeyplus, dexbeyplus;
2581 REAL permanent, errbound;
2586 aex = pa[0] - pe[0];
2587 bex = pb[0] - pe[0];
2588 cex = pc[0] - pe[0];
2589 dex = pd[0] - pe[0];
2590 aey = pa[1] - pe[1];
2591 bey = pb[1] - pe[1];
2592 cey = pc[1] - pe[1];
2593 dey = pd[1] - pe[1];
2594 aez = pa[2] - pe[2];
2595 bez = pb[2] - pe[2];
2596 cez = pc[2] - pe[2];
2597 dez = pd[2] - pe[2];
2601 ab = aexbey - bexaey;
2604 bc = bexcey - cexbey;
2607 cd = cexdey - dexcey;
2610 da = dexaey - aexdey;
2614 ac = aexcey - cexaey;
2617 bd = bexdey - dexbey;
2619 abc = aez * bc - bez * ac + cez * ab;
2620 bcd = bez * cd - cez * bd + dez * bc;
2621 cda = cez * da + dez * ac + aez * cd;
2622 dab = dez * ab + aez * bd + bez * da;
2624 alift = aex * aex + aey * aey + aez * aez;
2625 blift = bex * bex + bey * bey + bez * bez;
2626 clift = cex * cex + cey * cey + cez * cez;
2627 dlift = dex * dex + dey * dey + dez * dez;
2629 det = (dlift * abc - clift * dab) + (blift * cda - alift * bcd);
2647 permanent = ((cexdeyplus + dexceyplus) * bezplus
2648 + (dexbeyplus + bexdeyplus) * cezplus
2649 + (bexceyplus + cexbeyplus) * dezplus)
2651 + ((dexaeyplus + aexdeyplus) * cezplus
2652 + (aexceyplus + cexaeyplus) * dezplus
2653 + (cexdeyplus + dexceyplus) * aezplus)
2655 + ((aexbeyplus + bexaeyplus) * dezplus
2656 + (bexdeyplus + dexbeyplus) * aezplus
2657 + (dexaeyplus + aexdeyplus) * bezplus)
2659 + ((bexceyplus + cexbeyplus) * aezplus
2660 + (cexaeyplus + aexceyplus) * bezplus
2661 + (aexbeyplus + bexaeyplus) * cezplus)
2663 errbound = isperrboundA * permanent;
2664 if ((det > errbound) || (-det > errbound)) {
static double o3derrboundA
#define Two_One_Product(a1, a0, b, x3, x2, x1, x0)
REAL incircle(REAL *pa, REAL *pb, REAL *pc, REAL *pd)
static int fast_expansion_sum_zeroelim(int elen, REAL *e, int flen, REAL *f, REAL *h)
REAL insphere(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe)
static int scale_expansion_zeroelim(int elen, REAL *e, REAL b, REAL *h)
#define Two_Sum(a, b, x, y)
static double iccerrboundA
static double resulterrbound
static REAL orient2dadapt(REAL *pa, REAL *pb, REAL *pc, REAL detsum)
static double isperrboundB
#define Split(a, ahi, alo)
static double o3derrboundB
REAL orient2d(REAL *pa, REAL *pb, REAL *pc)
#define Two_Product(a, b, x, y)
#define Two_Product_Presplit(a, b, bhi, blo, x, y)
#define Two_Two_Diff(a1, a0, b1, b0, x3, x2, x1, x0)
#define Two_Two_Sum(a1, a0, b1, b0, x3, x2, x1, x0)
static double o3derrboundC
static REAL insphereadapt(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe, REAL permanent)
static REAL orient3dadapt(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL permanent)
static REAL incircleadapt(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL permanent)
static double isperrboundC
static double ccwerrboundA
static REAL estimate(int elen, REAL *e)
REAL orient3d(REAL *pa, REAL *pb, REAL *pc, REAL *pd)
#define Two_Diff_Tail(a, b, x, y)
static REAL insphereexact(REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe)
static double isperrboundA
static double iccerrboundB
#define Fast_Two_Sum(a, b, x, y)
static double ccwerrboundB
static double ccwerrboundC
static double iccerrboundC