Redian新闻
>
Random number generation in FORTRAN
avatar
Random number generation in FORTRAN# Computation - 科学计算
g*d
1
对FORTRAN不熟,请教各位:
我想用别人写的一个程序,里面有用genunf,gennor gengam来generate random
numbers from uniform, normal and gamma distribution.但是我得到“unresolved
external symbol"的错误,这是为什么? FORTRAN里没有这些function吗?
我以前用过IMSL STAT/LIBRARY里的subroutines (RNUNF, RNNOR, RNGAM),可以。但我
尽量不想改现成的程序。
谢谢。
avatar
O*e
2
In Fortran 77, there is no standard way to call a random number generator.
Depending on the application, it may call its own generator, or a generator
provided by some library, and these could have any name.
Fortran 9x specifies how a random number generator for uniform distribution
between 0 and 1 is to be called, but does not specify the algorithm that is
used for the generator:
call random_number(...)
call random_seed(...)
"Unresolved external symbol" means that the linker (which links

【在 g********d 的大作中提到】
: 对FORTRAN不熟,请教各位:
: 我想用别人写的一个程序,里面有用genunf,gennor gengam来generate random
: numbers from uniform, normal and gamma distribution.但是我得到“unresolved
: external symbol"的错误,这是为什么? FORTRAN里没有这些function吗?
: 我以前用过IMSL STAT/LIBRARY里的subroutines (RNUNF, RNNOR, RNGAM),可以。但我
: 尽量不想改现成的程序。
: 谢谢。

avatar
g*d
3
Thank you so much for your anwser.
It seems that I will have to replace the functions with the subroutines in
IMSL libraries.

generator
distribution
is

【在 O******e 的大作中提到】
: In Fortran 77, there is no standard way to call a random number generator.
: Depending on the application, it may call its own generator, or a generator
: provided by some library, and these could have any name.
: Fortran 9x specifies how a random number generator for uniform distribution
: between 0 and 1 is to be called, but does not specify the algorithm that is
: used for the generator:
: call random_number(...)
: call random_seed(...)
: "Unresolved external symbol" means that the linker (which links

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。