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: Ioannis V. <no...@ho...> - 2003-01-11 21:10:41
|
In MINGW the long double is broken. Also in MINGW (and GCC in general) us= e -ffloat-store.=0D =0D =0D Ioannis Vranos=0D =0D * Programming pages: http://www.noicys.freeurl.com=0D * Alternative URL: http://run.to/noicys =0D -------Original Message-------=0D =0D From: Lu=EDs" "Br=E1s=0D Date: =D0=DD=EC=F0=F4=E7, 9 =C9=E1=ED=EF=F5=DC=F1=E9=EF=F2 2003 4:57:41 =F0= =EC=0D To: dev...@li...=0D Subject: [Dev-C++] Numerical Difference betewen Dev-Cpp and Microsoft C++ NET=0D =0D Hi there?=0D =0D I?ve just finished developing an mathematical=0D optimization program =0D in C++ for my Thesis. My base compiler that was=0D installed in my university was Microsoft Visual =0D C++.Net. Now I?m trying to compile with Dev-Cpp in my =0D computer at home . The results were the same, until=0D my example 23, failed to converge in Dev-Cpp. When =0D dealing with math every decimal counts. And this is=0D the problem. The results are the following:=0D =0D ----------------------------------=0D Iteration function=0D error=0D next step=0D =0D --------NET-----------------------------DEV----------=0D =0D 0 6.08269457903887380000 6.08269457903887380000 =0D 14.38658488183035000000 14.38658488183034500000=0D 1.00000000000000000000 1.00000000000000000000=0D =0D 1 6.08269457903887380000 6.08269457903887380000=0D 14.38658488183035000000 14.38658488183034500000=0D 0.15334071686133940000 0.15334071686133718000=0D =0D 2 5.64283384487765800000 5.64283384487766430000=0D 11.71651970320963600000 11.71651970320965800000=0D 0.23998975404550715000 0.23998975404523476000=0D =0D 3 5.29623368056405490000 5.29623368056461440000=0D 9.25439173550483750000 9.25439173550664760000=0D 0.13589203600495686000 Error.=0D =0D As you can in iteration 3 the program fails. I know =0D that is difficult to find the problem just by looking =0D at numbers!! The difference is always in the last =0D decimal places (>12). =0D =0D I use templates in all class?s and it?s being =0D initialize with double. My compilation options are =0D default. My computer is a Pentium 3. I think its =0D probably the double that has different =0D decimal places? I?ve changed to (long double) but the =0D function pow in math doesn?t accept anything =0D different from double. Even converting to double =0D the results are the same.=0D =0D Thanks in advance for any help.=0D =0D P.S. Sorry for my bad English=0D =0D =0D =3D=3D=3D=3D=3D=0D +=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=0D Lu=EDs Filipe Delgado Br=E1s=0D lf...@ya...=0D http://www.fotopt.net/autor.asp?autor=3D2637=0D +=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=0D =0D __________________________________________________=0D Do you Yahoo!?=0D Yahoo! Mail Plus - Powerful. Affordable. Sign up now.=0D http://mailplus.yahoo.com=0D =0D =0D -------------------------------------------------------=0D This SF.NET email is sponsored by:=0D SourceForge Enterprise Edition + IBM + LinuxWorld =3D Something 2 See!=0D http://www.vasoftware.com=0D _______________________________________________=0D Dev-cpp-users mailing list=0D Dev...@li...=0D TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm=0D https://lists.sourceforge.net/lists/listinfo/dev-cpp-users=20 |