* src/maths/ni/nipzmeth.c: Corrected an overeager deletion.
This commit is contained in:
parent
0fb8f339b8
commit
b824ff0bf4
|
|
@ -1,3 +1,7 @@
|
|||
2000-05-04 Arno W. Peters <A.W.Peters@ieee.org>
|
||||
|
||||
* src/maths/ni/nipzmeth.c: Corrected an overeager deletion.
|
||||
|
||||
2000-05-03 Arno W. Peters <A.W.Peters@ieee.org>
|
||||
|
||||
* source tree: removed most of `#ifdef notdef' and made converted
|
||||
|
|
|
|||
|
|
@ -26,43 +26,7 @@ int NIpzK_mag;
|
|||
int
|
||||
NIpzSym(PZtrial **set, PZtrial *new)
|
||||
{
|
||||
double a, b, c, x0, x1;
|
||||
double dx0, dx1;
|
||||
int a_mag, b_mag, c_mag;
|
||||
|
||||
dx0 = set[1]->s.real - set[0]->s.real;
|
||||
dx1 = set[2]->s.real - set[1]->s.real;
|
||||
|
||||
zaddeq(&a, &a_mag, set[1]->f_def.real, set[1]->mag_def,
|
||||
-set[0]->f_def.real, set[0]->mag_def);
|
||||
a /= dx0;
|
||||
zaddeq(&b, &b_mag, set[2]->f_def.real, set[2]->mag_def,
|
||||
-set[1]->f_def.real, set[1]->mag_def);
|
||||
b /= dx1;
|
||||
zaddeq(&c, &c_mag, b, b_mag, -a, a_mag);
|
||||
|
||||
/* XXX What if c == 0.0 ? */
|
||||
|
||||
x0 = (set[0]->s.real + set[1]->s.real) / 2.0;
|
||||
x1 = (set[1]->s.real + set[2]->s.real) / 2.0;
|
||||
|
||||
c /= (x1 - x0);
|
||||
|
||||
new->s.real = - a / c;
|
||||
c_mag -= a_mag;
|
||||
|
||||
new->s.imag = 0.0;
|
||||
|
||||
while (c_mag > 0) {
|
||||
new->s.real /= 2.0;
|
||||
c_mag -= 1;
|
||||
}
|
||||
while (c_mag < 0) {
|
||||
new->s.real *= 2.0;
|
||||
c_mag += 1;
|
||||
}
|
||||
new->s.real += set[0]->s.real;
|
||||
#endif
|
||||
return NIpzSym2(set, new);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Reference in New Issue