promlem about Jacobi() to solve enginevector


bh sun
06-12-2008, 09:16 AM
Dear friends,

today, I have tested the fuction Jacobi() in C++ (compiled with MS visual c++ 6.0), which gives obviously wrong results. while the same function in fortran(77/90) can get right resuls. would you please find out the reasons.

davekw7x
06-12-2008, 11:14 AM
...tested the fuction Jacobi() in C++ (compiled with MS visual c++ 6.0), which gives obviously wrong results.

What version of C++ Numerical Recipes program are you using? Version 2? Version 3? What?


For What It's Worth: When I use Visual C++ Version 6.0 to compile a test program with matrices like the ones used for f90 and f77 xjacobi programs, I get equivalent results with code from Numerical Recipes C++ distribution versions 2 and 3.

Can you post your C++ test program? Show us the "right results" that you got from the other program and the "wrong results" from Visual C++.

Regards,

Dave