Batch Spreadsheet for C Programmers -
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Gnumeric contains 520 functions
SS internal or user-defined function example, irand.c:
/* 1 pseudo-random integer, 0<=irand(i)<=i-1
*/
double nf_irand(const Node *n, const Cell *c)
{
int i = eval_tree( Right(n), c);
return (int) (i*(rand()/(RAND_MAX+1.0)));
}