Re: [Dev-C++] Numerical Difference betewen Dev-Cpp and Microsoft C++.NET
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Matthews <dem...@uw...> - 2003-01-09 13:36:36
|
Actually, there's a few small changes in the decimals besides iteration 3. And your's is the best english I've heard in a while :) At 06:55 PM 08/01/2003 -0800, Lu=EDs" "Br=E1s wrote: >Hi there=85 > >I=92ve just finished developing an mathematical >optimization program=20 >in C++ for my Thesis. My base compiler that was >installed in my university was Microsoft Visual=20 >C++.Net. Now I=92m trying to compile with Dev-Cpp in my=20 >computer at home . The results were the same, until >my example 23, failed to converge in Dev-Cpp. When=20 >dealing with math every decimal counts. And this is >the problem. The results are the following: > >---------------------------------- >Iteration function > error > next step > >--------NET-----------------------------DEV---------- > >0 6.08269457903887380000 6.08269457903887380000=20 > 14.38658488183035000000 14.38658488183034500000 > 1.00000000000000000000 1.00000000000000000000 > >1 6.08269457903887380000 6.08269457903887380000 > 14.38658488183035000000 14.38658488183034500000 > 0.15334071686133940000 0.15334071686133718000 > >2 5.64283384487765800000 5.64283384487766430000 > 11.71651970320963600000 11.71651970320965800000 > 0.23998975404550715000 0.23998975404523476000 > >3 5.29623368056405490000 5.29623368056461440000 > 9.25439173550483750000 9.25439173550664760000 > 0.13589203600495686000 Error. > >As you can in iteration 3 the program fails. I know=20 >that is difficult to find the problem just by looking=20 >at numbers!! The difference is always in the last=20 >decimal places (>12).=20 > >I use templates in all class=92s and it=92s being=20 >initialize with double. My compilation options are=20 >default. My computer is a Pentium 3. I think its=20 >probably the double that has different=20 >decimal places? I=92ve changed to (long double) but the=20 >function pow in math doesn=92t accept anything=20 >different from double. Even converting to double=20 >the results are the same. > >Thanks in advance for any help. > >P.S. Sorry for my bad English > > >=3D=3D=3D=3D=3D >+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+= =3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D >Lu=EDs Filipe Delgado Br=E1s >lf...@ya... >http://www.fotopt.net/autor.asp?autor=3D2637 >+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+= =3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D > >__________________________________________________ >Do you Yahoo!? >Yahoo! Mail Plus - Powerful. Affordable. Sign up now. >http://mailplus.yahoo.com > > >------------------------------------------------------- >This SF.NET email is sponsored by: >SourceForge Enterprise Edition + IBM + LinuxWorld =3D Something 2 See! >http://www.vasoftware.com >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |