Continued fraction/Arithmetic/G(matrix ng, continued fraction n1, continued fraction n2): Difference between revisions

Content added Content deleted
Line 2,393: Line 2,393:
private Index ix;
private Index ix;
private Index iy;
private Index iy;
private bool overflow;
private bool xoverflow;
private bool yoverflow;


//
//
Line 2,410: Line 2,411:
ix = 0;
ix = 0;
iy = 0;
iy = 0;
overflow = false;
xoverflow = false;
yoverflow = false;
}
}


Line 2,479: Line 2,481:
{
{
Nullable!Term term;
Nullable!Term term;
if (!overflow)
if (!xoverflow)
term = x[ix];
term = x[ix];
ix += 1;
ix += 1;
Line 2,497: Line 2,499:
ng = new NG8 (ng.a12, ng.a1, ng.a12, ng.a1,
ng = new NG8 (ng.a12, ng.a1, ng.a12, ng.a1,
ng.b12, ng.b1, ng.b12, ng.b1);
ng.b12, ng.b1, ng.b12, ng.b1);
overflow = true;
xoverflow = true;
}
}
}
}
Line 2,508: Line 2,510:
{
{
Nullable!Term term;
Nullable!Term term;
if (!overflow)
if (!yoverflow)
term = y[iy];
term = y[iy];
iy += 1;
iy += 1;
Line 2,524: Line 2,526:
ng = new NG8 (ng.a12, ng.a12, ng.a2, ng.a2,
ng = new NG8 (ng.a12, ng.a12, ng.a2, ng.a2,
ng.b12, ng.b12, ng.b2, ng.b2);
ng.b12, ng.b12, ng.b2, ng.b2);
overflow = true;
yoverflow = true;
}
}
}
}