简体   繁体   English

什么导致浮点异常“1.#IO”

[英]What leads to the floating point exception "1.#IO"

I'm debugging a simulation with many calculations in many Fortran files.我正在调试在许多 Fortran 文件中进行许多计算的模拟。 I am used to seeing some floating point exceptions (-1.#QNB or 1.#QNAN) for errors that involve division by zero or operations that exceed the maximum size for floating point number.我习惯于看到一些浮点异常(-1.#QNB 或 1.#QNAN),这些错误涉及除以零或超出浮点数最大大小的运算。 I'm assuming -1.#IO means invalid operation, but I'm not sure mathematically what would cause this and not QNB or QNAN or QINF.我假设 -1.#IO 表示无效操作,但我不确定数学上是什么会导致这种情况,而不是 QNB 或 QNAN 或 QINF。

What would lead to the exception -1.#IO?什么会导致异常 -1.#IO?

According to the IEEE 754 Standard for Floating Point Operations , the invalid operation is signaled根据浮点运算IEEE 754 标准,会发出无效运算的信号

when a NaN or infinite operand cannot be represented in the destination format and this cannot otherwise be indicated [...] When a numeric operand would convert to an integer outside the range of the destination format, the invalid operation exception shall be signaled if this situation cannot otherwise be indicated.当目标格式无法表示 NaN 或无限操作数并且无法以其他方式表示时 [...]情况不能以其他方式表示。

This page gives a few examples: 此页面提供了一些示例:

  • zero * infinity零 * 无穷大
  • zero / zero零/零
  • infinity / infinity无穷大/无穷大
  • square root of a negative operand负操作数的平方根
  • [and a few more] [还有一些]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM