本帖最后由 lumlngz 于 2023-10-16 17:47 编辑
把公式赋值给一个值之后输出发现是无限大(错误的),但是直接输出公式是对的,这是为什么呀,希望老师解答一下感谢感谢。下面是结果
[Fortran] 纯文本查看 复制代码 bea(j)=hmrho(j)*0.5d0+frho(j)*radius*vo2/2.0d0
kvalue(j)=-hmrho(j)+vo2*brho(j)
write(6,'(4f15.6)')radius,bea(j),
& -hmrho(j)+vo2*brho(j),kvalue(j)
0.002000 0.682298 -2.358063 NaN
0.003000 0.797618 -3.050536 NaN
0.004000 0.874094 -3.642442 NaN
0.005000 0.924833 -4.160282 NaN
0.006000 0.956874 -4.618419 NaN
0.007000 0.974549 -5.025797 NaN
0.008000 0.980760 -5.388506 NaN
0.009000 0.977573 -5.710954 NaN
0.010000 0.966524 -5.996488 NaN
0.011000 0.948791 -6.247742 NaN
0.012000 0.925306 -6.466849 NaN
0.013000 0.896820 -6.655583 NaN
|