r****y 发帖数: 1437 | 1 Even on a same machine, different compilers of same language
can give you different results beyond machine precision. There is also no
point to compare fortran and matlab results beyond machine precision.
And pi in matlab is not same as the pi you specified in your code.
As I said before, your code sucks, not fortran or matlab.
的
8888
.
差
题 | c*******e 发帖数: 8624 | 2 matlab always uses double precision in computing, so I would like to
believe matlab, hehe.
【在 r****y 的大作中提到】 : Even on a same machine, different compilers of same language : can give you different results beyond machine precision. There is also no : point to compare fortran and matlab results beyond machine precision. : And pi in matlab is not same as the pi you specified in your code. : As I said before, your code sucks, not fortran or matlab. : : 的 : 8888 : . : 差
| t*****e 发帖数: 13 | 3
的
8888
.
差
题
your Pi value is not accrate enough. Change it to
mypi=4.q0*atan(1.q0)
and see if it makes any difference. | g******s 发帖数: 733 | 4 thank a lot! I just found it too.
【在 t*****e 的大作中提到】 : : 的 : 8888 : . : 差 : 题 : your Pi value is not accrate enough. Change it to : mypi=4.q0*atan(1.q0) : and see if it makes any difference.
| g******s 发帖数: 733 | |
|