From 5a67e7c040a76c666977f1336226549531da1b9b Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 26 Feb 2022 09:51:07 +0100 Subject: [PATCH] reduced epsilons in hyperpoint --- hyperpoint.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hyperpoint.cpp b/hyperpoint.cpp index 729dc622..0a550e80 100644 --- a/hyperpoint.cpp +++ b/hyperpoint.cpp @@ -505,7 +505,7 @@ EX hyperpoint normalize(hyperpoint H) { /** like normalize but makes (ultra)ideal points material */ EX hyperpoint ultra_normalize(hyperpoint H) { if(material(H) <= 0) { - H[LDIM] = hypot_d(LDIM, H) + 1e-6; + H[LDIM] = hypot_d(LDIM, H) + 1e-10; } return normalize(H); } @@ -760,7 +760,7 @@ EX hyperpoint parabolic13(hyperpoint h) { EX transmatrix spintoc(const hyperpoint& H, int t, int f) { transmatrix T = Id; 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[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) { transmatrix T = Id; 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[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); } 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); for(int i=0; i