📄 ran1f_c.mht
字号:
From: <由 Microsoft Internet Explorer 5 保存>
Subject:
Date: Wed, 27 Sep 2006 22:48:40 +0800
MIME-Version: 1.0
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.oxbad.com/DSP/maindoc/arithmetic_source/c/RAN1F.C
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"MSHTML 6.00.2900.2963" name=3DGENERATOR></HEAD>
<BODY><PRE>/* ran1f.c - 1/f random number generator */
double ranh(); /* random hold periodic =
generator */
double ran1f(B, u, q, iseed) /* usage: y =3D ran1f(B, u, =
q, &iseed); */
int B, *q; /* \(q, u\) are =
\(B\)-dimensional */
double *u;
long *iseed; /* passed by address */
{
double y;
int b;
for(y=3D0, b=3D0; b<B; b++)
y +=3D ranh(1<<b, u+b, q+b, iseed); /* period =
=3D (1<<b) =3D 2\(\sp{b}\) */
return y / B;
}
</PRE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -