MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / fast_expansion_sum_zeroelim

Function fast_expansion_sum_zeroelim

tools/Predicates/predicates.c:1021–1093  ·  view source on GitHub ↗
(elen, e, flen, f, h)

Source from the content-addressed store, hash-verified

1019/*****************************************************************************/
1020
1021int fast_expansion_sum_zeroelim(elen, e, flen, f, h) /* h cannot be e or f. */
1022int elen;
1023REAL *e;
1024int flen;
1025REAL *f;
1026REAL *h;
1027{
1028 REAL Q;
1029 INEXACT REAL Qnew;
1030 INEXACT REAL hh;
1031 INEXACT REAL bvirt;
1032 REAL avirt, bround, around;
1033 int eindex, findex, hindex;
1034 REAL enow, fnow;
1035
1036 enow = e[0];
1037 fnow = f[0];
1038 eindex = findex = 0;
1039 if ((fnow > enow) == (fnow > -enow)) {
1040 Q = enow;
1041 enow = e[++eindex];
1042 } else {
1043 Q = fnow;
1044 fnow = f[++findex];
1045 }
1046 hindex = 0;
1047 if ((eindex < elen) && (findex < flen)) {
1048 if ((fnow > enow) == (fnow > -enow)) {
1049 Fast_Two_Sum(enow, Q, Qnew, hh);
1050 enow = e[++eindex];
1051 } else {
1052 Fast_Two_Sum(fnow, Q, Qnew, hh);
1053 fnow = f[++findex];
1054 }
1055 Q = Qnew;
1056 if (hh != 0.0) {
1057 h[hindex++] = hh;
1058 }
1059 while ((eindex < elen) && (findex < flen)) {
1060 if ((fnow > enow) == (fnow > -enow)) {
1061 Two_Sum(Q, enow, Qnew, hh);
1062 enow = e[++eindex];
1063 } else {
1064 Two_Sum(Q, fnow, Qnew, hh);
1065 fnow = f[++findex];
1066 }
1067 Q = Qnew;
1068 if (hh != 0.0) {
1069 h[hindex++] = hh;
1070 }
1071 }
1072 }
1073 while (eindex < elen) {
1074 Two_Sum(Q, enow, Qnew, hh);
1075 enow = e[++eindex];
1076 Q = Qnew;
1077 if (hh != 0.0) {
1078 h[hindex++] = hh;

Callers 12

orient2dexactFunction · 0.85
orient2dslowFunction · 0.85
orient2dadaptFunction · 0.85
orient3dexactFunction · 0.85
orient3dslowFunction · 0.85
orient3dadaptFunction · 0.85
incircleexactFunction · 0.85
incircleslowFunction · 0.85
incircleadaptFunction · 0.85
insphereexactFunction · 0.85
insphereslowFunction · 0.85
insphereadaptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected