~ubuntu-branches/ubuntu/karmic/gnustep-base/karmic

« back to all changes in this revision

Viewing changes to Testing/randoms.m

  • Committer: Bazaar Package Importer
  • Author(s): Eric Heintzmann
  • Date: 2005-04-17 00:14:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050417001438-enf0y07c9tku85z1
Tags: 1.10.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
 
#include <base/Random.h>
3
 
#include <base/RNGBerkeley.h>
4
 
#include <base/RNGAdditiveCongruential.h>
 
2
#include <GNUstepBase/Random.h>
 
3
#include <GNUstepBase/RNGBerkeley.h>
 
4
#include <GNUstepBase/RNGAdditiveCongruential.h>
5
5
 
6
6
int main()
7
7
{
18
18
    printf("%f\n", [r randomDouble]);
19
19
 
20
20
  rng = [[RNGBerkeley alloc] init];
21
 
  printf("%s chi^2 = %f\n", 
 
21
  printf("%s chi^2 = %f\n",
22
22
         [rng name], [Random chiSquareOfRandomGenerator:rng]);
23
23
  [r release];
24
24
 
27
27
  for (i = 0; i < 50; i++)
28
28
    printf("%ld\n", [r nextRandom]);
29
29
*/
30
 
  printf("%s chi^2 = %f\n", 
 
30
  printf("%s chi^2 = %f\n",
31
31
         [rng name], [Random chiSquareOfRandomGenerator:rng]);
32
32
  [rng release];
33
33