GRASS GIS 8 Programmer's Manual 8.4.1(2025)-45ca3179ab
Loading...
Searching...
No Matches
unfl.c
Go to the documentation of this file.
1/* unfl.c CCMATH mathematics library source code.
2 *
3 * Copyright (C) 2000 Daniel A. Atkinson All rights reserved.
4 * This code may be redistributed under the terms of the GNU library
5 * public license (LGPL). ( See the lgpl.license file for details.)
6 * ------------------------------------------------------------------------
7 */
8static unsigned int a = 69069U, c = 244045795U;
9static unsigned int s, h, sbuf[256];
10double unfl(void)
11{
12 int i;
13
14 i = (int)(s >> 24);
15 s = sbuf[i];
16 h = a * h + c;
17 sbuf[i] = h;
18 return s * 2.328306436538696e-10;
19}
20
21void setunfl(unsigned int k)
22{
23 int j;
24
25 for (h = k, j = 0; j <= 256; ++j) {
26 h = a * h + c;
27 if (j < 256)
28 sbuf[j] = h;
29 else
30 s = h;
31 }
32}
double unfl(void)
Definition unfl.c:10
void setunfl(unsigned int k)
Definition unfl.c:21