运算的代码如下:[Fortran] 纯文本查看 复制代码 integer, parameter::dp=selected_real_kind(p=15,r=307)
real(kind=dp) ye(4),ze(4)
real(kind=dp) a
ye=(/-0.03_dp,-0.03_dp,-0.03_dp,-0.0265_dp/)
ze=(/-0.03_dp,-0.03_dp,-0.03_dp,-0.0265_dp/)
a=ye(3)*ze(2)+ye(2)*ze(4)+ye(4)*ze(3)-ye(3)*ze(4)-ye(2)*ze(3)-ye(4)*ze(2)b=ye(1)*ze(4)+ye(4)*ze(2)+ye(2)*ze(1)-ye(1)*ze(2)-ye(4)*ze(1)-ye(2)*ze(4)
得出的结果是:
a=-1.084202172485504E-019
b=0.000000000000000E+000
为什么不都是0呢?
|