Skip to content

Commit e3e0faa

Browse files
committed
RZ good zeros to t=1M + anti-non BH convergence failsafe
1 parent 6ea71eb commit e3e0faa

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

src/Theories/CTs/RZ.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ class rzSim extends theoryClass<theory> {
288288
bhRewindNorm: number;
289289
bhRewindDeriv: number;
290290

291+
bhProcessCounter: number = 0;
292+
291293
getBuyingConditions(): conditionFunction[] {
292294
const activeStrat = [
293295
() => {
@@ -437,6 +439,10 @@ class rzSim extends theoryClass<theory> {
437439

438440
bhProcess(zResult: ComplexValue | null = null, tmpZ: ComplexValue | null = null) {
439441
this.offGrid = true;
442+
if (this.strat != "RZdBHRewind") this.bhProcessCounter++;
443+
444+
// This is a method to prevent the non-convergence of the algorithm
445+
const bhLockPreventionCoeff = this.bhProcessCounter < 1000 ? 1 : Math.E ** (-0.002*(this.bhProcessCounter - 1000));
440446

441447
if (zResult === null){
442448
zResult = zeta(this.t_var, this.ticks, this.offGrid, lookups.zetaLookup);
@@ -451,11 +457,11 @@ class rzSim extends theoryClass<theory> {
451457
if(this.bhSearchingRewind && this.t_var > 14.5 && bhdt > 0)
452458
{
453459
let srdt = -Math.min(0.125 / bhdt, 0.125);
454-
this.t_var += srdt;
460+
this.t_var += srdt * bhLockPreventionCoeff;
455461
}
456462
else
457463
{
458-
this.t_var += bhdt;
464+
this.t_var += bhdt * bhLockPreventionCoeff;
459465
this.bhSearchingRewind = false;
460466
if(Math.abs(bhdt) < 1e-9)
461467
{

src/Theories/CTs/helpers/RZgoodzeros.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@
5151
148190.29,
5252
175030.58,
5353
210283.59,
54-
321842.6
54+
321842.6,
55+
454350.9,
56+
757720.12,
57+
833464.81,
58+
964594.73
5559
],
5660
"longZeros": [
5761
7623.42,
@@ -120,7 +124,7 @@
120124
"toRho": 2300, "from": 50000, "to": 150000
121125
},
122126
{
123-
"toRho": 2500, "from": 90000, "to": 999999999
127+
"toRho": 2500, "from": 90000, "to": 400000
124128
},
125129
{
126130
"toRho": 999999, "from": 200000, "to": 999999999
@@ -155,7 +159,7 @@
155159
"toRho": 2300, "from": 50000, "to": 150000
156160
},
157161
{
158-
"toRho": 2500, "from": 90000, "to": 999999999
162+
"toRho": 2500, "from": 90000, "to": 400000
159163
},
160164
{
161165
"toRho": 999999, "from": 200000, "to": 999999999

0 commit comments

Comments
 (0)