Ignore:
Timestamp:
Apr 25, 2007 12:58:42 AM (13 years ago)
Author:
pbelotti
Message:

fixed serious bug with x(2k+1)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Couenne/Couenne/src/util/rootQ.c

    r292 r498  
    4646  else {
    4747
    48     register CouNumber l = - 1.0 + 0.5 / k,
    49                     u = - 0.5,
    50                     Ql = Q (k, l), Qu = Q (k, u), Qm,
    51                     midpoint;
     48    register CouNumber l  = - 1.0 + 0.5 / k,
     49                       u = - 0.5,
     50                       Ql = Q (k, l), Qu = Q (k, u), Qm,
     51                       midpoint;
    5252    do {
    5353
    54       midpoint = 0.5 * (l+u);/* (- Ql * u + Qu * l) / (Qu - Ql); */
     54      midpoint = 0.5 * (l+u); /* (- Ql * u + Qu * l) / (Qu - Ql); */
    5555      Qm = Q (k, midpoint);
    5656
     
    7272  CouNumber x, q;
    7373
    74   for (k=30; --k;) {
     74  for (k=6; --k;) {
    7575
    7676    printf ("root, %3d -> %.15f\n", 2*k+1, rootQ (k));
Note: See TracChangeset for help on using the changeset viewer.