#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
Go to the source code of this file.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 8 of file gen_floats.c.
12 fprintf(stderr,
"Usage: %s nb_floats\n", argv[0]);
17 int n = atoi(argv[1]);
19 int frand = open(
"/dev/urandom", O_RDONLY);
20 read(frand, &seed,
sizeof(
unsigned int));
24 for (i=0; i < n; i++) {
25 float f = (float) rand();
26 fwrite(&
f,
sizeof(
float), 1, stdout);
#define EXIT_SUCCESS
NetBSD 5.0 mis-defines NULL.
#define EXIT_FAILURE
Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere with proper operation of xarg...
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
References close, EXIT_FAILURE, EXIT_SUCCESS, f(), and fprintf().