Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
878 views
in Technique[技术] by (71.8m points)

fortran - FORTRAN 77除以零行为(FORTRAN 77 Divide By Zero Behavior)

I am working on re-engineering an old FORTRAN77 program to Python for a while now.

(我正在一段时间内将旧的FORTRAN77程序重新设计为Python。)

I'm running into an issue, though: when dividing by zero, it appears that the FORTRAN program just continues processing the data without issue.

(不过,我遇到了一个问题:当被零除时,似乎FORTRAN程序只是继续处理数据而没有问题。)

However, predictably it causes an issue in Python.

(但是,可以预料的是,这会在Python中引起问题。)

I'm not able to find a discussion about this on any official channel for F77, and I only have an old version of the source code for the program I am translating that I can't get to compile.

(我无法在F77的任何官方频道上找到有关此问题的讨论,并且我只有正在翻译的程序的旧版本源代码,无法编译。)

TL;DR: How does F77 handle division by zero for the following cases?:

(TL; DR:在以下情况下,F77如何处理被零除?:)

  1. REAL division

    (房地产部)

  2. INT division

    (INT部门)

  3. The numerator is also zero (eg 0./0.)

    (分子也是零(例如0./0。))

  ask by Dakota B translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...