Fortran昏暗(x,y),到底是什么?

时间:2022-09-28 00:50:42

In Fortran dim(x,y) returns the difference x-y if the result is positive; otherwise returns zero. What was it intended to be used for? What is the meaning behind the name dim?

在Fortran dim(x,y)中,如果结果为正,则返回差x-y;否则返回零。它打算用于什么?名字昏暗背后的含义是什么?

2 个解决方案

#1


Presumably it comes from dimension, i.e., the length, width, height of something. Since none of these values can be negative it's calculated as the positive difference.

据推测它来自尺寸,即长度,宽度,高度。由于这些值都不是负数,因此计算为正差。

#2


Since it is (in some older literature on Fortran) defined as DIM(A,B):=A-MIN(A,B), I'd say that the name is just an abbreviation for "difference from minimum".

既然它(在一些关于Fortran的旧文献中)定义为DIM(A,B):= A-MIN(A,B),我会说这个名字只是“与最小差异”的缩写。

#1


Presumably it comes from dimension, i.e., the length, width, height of something. Since none of these values can be negative it's calculated as the positive difference.

据推测它来自尺寸,即长度,宽度,高度。由于这些值都不是负数,因此计算为正差。

#2


Since it is (in some older literature on Fortran) defined as DIM(A,B):=A-MIN(A,B), I'd say that the name is just an abbreviation for "difference from minimum".

既然它(在一些关于Fortran的旧文献中)定义为DIM(A,B):= A-MIN(A,B),我会说这个名字只是“与最小差异”的缩写。