Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@

pcg32-demo
pcg32-global-demo
pcg32x2-demo
pcg32x2-demo
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ at the sample code -- hopefully it should be fairly self explanatory.
There is no library to build. Just use the code. You can however build the
three demo programs.

The code is written in C89-style C with no significant platform dependencies.
The code is written in C99-style C with no significant platform dependencies.
On a Unix-style system (e.g., Linux, Mac OS X), or any system with `make`,
you should be able to just type type

Expand Down Expand Up @@ -52,4 +52,4 @@ To produce different output, run
./pcg32-demo -r

You can also pass an integer count to specify how may rounds of output you
would like.
would like.
11 changes: 6 additions & 5 deletions pcg32x2-demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@
* This file was mechanically generated from tests/check-pcg32.c
*/

#include <stdio.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#include "pcg_basic.h"

Expand Down Expand Up @@ -152,7 +153,7 @@ int main(int argc, char** argv)
for (i = 0; i < 6; ++i) {
if (i > 0 && i % 3 == 0)
printf("\n\t");
printf(" 0x%016llx", pcg32x2_random_r(&rng));
printf(" 0x%016" PRIx64, pcg32x2_random_r(&rng));
}
printf("\n");

Expand Down