fortran - Fortran 将 NaN 设置为零
问题描述
有没有办法在 Fortran90 中将 NaN(不是数字)设置为零
program testnan
implicit none
real :: x,y
x = -1
y = sqrt(x)
if(y.lt.0)then
y = 0
end if
print*, x, y
end program testnan
我尝试了一些测试,但找不到解决方案。
解决方案
推荐阅读
- vue.js - 属性或方法...未在实例上定义,但在渲染期间引用
- java - 为什么我无法运行 hadoop jar 文件,每次运行时都说找不到类异常 itemclick.itemclick.ItemClick?
- c++ - 使用 fstream 库并在屏幕上打印文件有问题吗?
- python - 在python中访问另一个类中一个类的私有变量
- c# - 身份验证角色不起作用.net core mvc
- android - 如何删除以编程方式添加新联系人时添加的 Android 联系人应用程序中的重复条目?
- vim - 如何在不破坏表格的情况下重新格式化 asciidoc
- cluster-computing - 通过 Dask 向 PBS 提交自定义作业脚本?
- postgresql - 在 PostgreSQL 中更新和插入与 Upsert
- rust - 如何获得持久的`Vec
.last()` 指针?