reduced epsilons in hyperpoint

This commit is contained in:
Zeno Rogue 2022-02-26 09:51:07 +01:00
parent 015006546e
commit 5a67e7c040
1 changed files with 4 additions and 4 deletions

View File

@ -505,7 +505,7 @@ EX hyperpoint normalize(hyperpoint H) {
/** like normalize but makes (ultra)ideal points material */ /** like normalize but makes (ultra)ideal points material */
EX hyperpoint ultra_normalize(hyperpoint H) { EX hyperpoint ultra_normalize(hyperpoint H) {
if(material(H) <= 0) { if(material(H) <= 0) {
H[LDIM] = hypot_d(LDIM, H) + 1e-6; H[LDIM] = hypot_d(LDIM, H) + 1e-10;
} }
return normalize(H); return normalize(H);
} }
@ -760,7 +760,7 @@ EX hyperpoint parabolic13(hyperpoint h) {
EX transmatrix spintoc(const hyperpoint& H, int t, int f) { EX transmatrix spintoc(const hyperpoint& H, int t, int f) {
transmatrix T = Id; transmatrix T = Id;
ld R = hypot(H[f], H[t]); ld R = hypot(H[f], H[t]);
if(R >= 1e-12) { if(R >= 1e-15) {
T[t][t] = +H[t]/R; T[t][f] = +H[f]/R; T[t][t] = +H[t]/R; T[t][f] = +H[f]/R;
T[f][t] = -H[f]/R; T[f][f] = +H[t]/R; T[f][t] = -H[f]/R; T[f][f] = +H[t]/R;
} }
@ -774,7 +774,7 @@ EX transmatrix spintoc(const hyperpoint& H, int t, int f) {
EX transmatrix rspintoc(const hyperpoint& H, int t, int f) { EX transmatrix rspintoc(const hyperpoint& H, int t, int f) {
transmatrix T = Id; transmatrix T = Id;
ld R = hypot(H[f], H[t]); ld R = hypot(H[f], H[t]);
if(R >= 1e-12) { if(R >= 1e-15) {
T[t][t] = +H[t]/R; T[t][f] = -H[f]/R; T[t][t] = +H[t]/R; T[t][f] = -H[f]/R;
T[f][t] = +H[f]/R; T[f][f] = +H[t]/R; T[f][t] = +H[f]/R; T[f][f] = +H[t]/R;
} }
@ -853,7 +853,7 @@ EX transmatrix ggpushxto0(const hyperpoint& H, ld co) {
return mscale(PIU(ggpushxto0(d.second, co)), d.first * co); return mscale(PIU(ggpushxto0(d.second, co)), d.first * co);
} }
transmatrix res = Id; transmatrix res = Id;
if(sqhypot_d(GDIM, H) < 1e-12) return res; if(sqhypot_d(GDIM, H) < 1e-16) return res;
ld fac = -curvature()/(H[LDIM]+1); ld fac = -curvature()/(H[LDIM]+1);
for(int i=0; i<GDIM; i++) for(int i=0; i<GDIM; i++)
for(int j=0; j<GDIM; j++) for(int j=0; j<GDIM; j++)