Changeset 283bf28 in tol
- Timestamp:
- May 6, 2009, 4:35:43 PM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- c040c02
- Parents:
- 9a4c371
- File:
-
- 1 edited
-
tol/bmath/bfunct/realfun.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/bmath/bfunct/realfun.cpp
r9a4c371 r283bf28 90 90 91 91 //-------------------------------------------------------------------- 92 BDat BRRFunction::NewtonSolve(BDat x0, BDat y 0, BDat tol, BInt maxIter)92 BDat BRRFunction::NewtonSolve(BDat x0, BDat y, BDat tol, BInt maxIter) 93 93 94 94 /*! Returns the value x that f(x) = y with the Newton method begining … … 101 101 BInt n = 0; 102 102 BDat x = x0; 103 BDat y = y0;104 Std(BText("\nNewtonSolve [")+n+"] x0="+x0+" y0="+y0+"\n");103 BDat y0 = (*this)[x]; 104 //Std(BText("\nNewtonSolve [")+n+"] x0="+x0+" y0="+y0+"\n"); 105 105 bool ok; 106 106 do … … 112 112 x0 = x; 113 113 ok = x0.IsKnown() && y0.IsKnown() && 114 (Abs(y 0)>0.0) &(dist>tol) && (n<maxIter);114 (Abs(y-y0)>0.0) & (dist>tol) && (n<maxIter); 115 115 if(ok) 116 116 { 117 117 y0 = (*this)[x0]; 118 118 } 119 Std(BText("\nNewtonSolve [")+n+"] x0="+x0+" y0="+y0+"\n");119 //Std(BText("\nNewtonSolve [")+n+"] x0="+x0+" y0="+y0+"\n"); 120 120 } 121 121 while(ok);
Note: See TracChangeset
for help on using the changeset viewer.
