Skip to content

Commit

Permalink
zaphod32_hash.h - rework comment to be more legible
Browse files Browse the repository at this point in the history
  • Loading branch information
demerphq authored and jkeenan committed Dec 30, 2022
1 parent a7b3712 commit 747ea44
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions zaphod32_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,17 @@ void zaphod32_seed_state (
const U32 *seed= (const U32 *)seed_ch;
U32 *state= (U32 *)state_ch;

/* hex expansion of pi, skipping first two digits. pi= 3.2[43f6...]*/
/* pi value in hex from here:
* http://turner.faculty.swau.edu/mathematics/materialslibrary/pi/pibases.html*/
/* Ensure that the three state vectors are nonzero regardless of the seed. */
/* The idea of these two steps is to ensure that the 0 state comes from a seed
* utterly unlike that of the value we replace it with.*/
/* hex expansion of PI, skipping first two digits. PI= 3.2[43f6...]
*
* PI value in hex from here:
*
* http://turner.faculty.swau.edu/mathematics/materialslibrary/pi/pibases.html
*
* Ensure that the three state vectors are nonzero regardless of
* the seed. The idea of these two steps is to ensure that the 0
* state comes from a seed utterly unlike that of the value we
* replace it with.
*/
state[0]= seed[0] ^ 0x43f6a888;
state[1]= seed[1] ^ 0x5a308d31;
state[2]= seed[2] ^ 0x3198a2e0;
Expand Down

0 comments on commit 747ea44

Please sign in to comment.