1 Sample usage of libcalc.a
2 -------------------------
4 This directory contains a few examples of how to use libcalc.a.
6 For more details on how to use libcalc.a, see the file LIBRARY.
14 Generate random bits using the Blum-Blum-Shub generator that
15 is used by the random() and srandom() builtin functions.
17 This prog uses the 10th compiled in Blum modulus.
19 This routine makes use of some of the lib_util.c routines.
23 test_random [bitlen [seed_string]]
25 bitlen number of random bits to generate (default: 128 bits)
26 seed_string seed using this ASCII string (default: use default seed)
32 Generate many (100000) sets random bits using the Blum-Blum-Shub
33 generator that is used by the random() and srandom() builtin functions.
35 Output is one set per line. Unlike test_random, the seed is not
36 printed. There is no leading 0x on numbers and there is no prefix
37 strings. The only thing printed (normally) is ASCII hex chars and
40 Unlike test_random, this prog will execute for a while. It is
41 useful to watch the process size in order to determine of there
44 This prog uses the 1st compiled in Blum modulus.
46 This routine makes use of some of the lib_util.c routines.
50 many_random [bitlen [seed_string]]
52 bitlen number of random bits per line set (default: 128 bits)
53 seed_string seed using this ASCII string (default: use default seed)
55 ## Copyright (C) 1999-2007 Landon Curt Noll
57 ## Calc is open software; you can redistribute it and/or modify it under
58 ## the terms of the version 2.1 of the GNU Lesser General Public License
59 ## as published by the Free Software Foundation.
61 ## Calc is distributed in the hope that it will be useful, but WITHOUT
62 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
63 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
64 ## Public License for more details.
66 ## A copy of version 2.1 of the GNU Lesser General Public License is
67 ## distributed with calc under the filename COPYING-LGPL. You should have
68 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
69 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
71 ## @(#) $Revision: 30.1 $
72 ## @(#) $Id: sample.README,v 30.1 2007/03/16 11:09:46 chongo Exp $
73 ## @(#) $Source: /usr/local/src/bin/calc/RCS/sample.README,v $
75 ## Under source code control: 1997/04/19 23:15:42
76 ## File existed as early as: 1997
78 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
79 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/