Changeset d9585291 for libcfa/src


Ignore:
Timestamp:
Dec 28, 2022, 12:50:50 PM (2 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, master
Children:
8d9d974, a7662b8
Parents:
8ee54963
Message:

formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/random.hfa

    r8ee54963 rd9585291  
    1010// Created On       : Fri Jan 14 07:18:11 2022
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Dec 14 20:32:53 2022
    13 // Update Count     : 177
     12// Last Modified On : Thu Dec 22 20:54:22 2022
     13// Update Count     : 178
    1414//
    1515
    1616#pragma once
    1717
    18 #include <stdint.h>
     18#include <stdint.h>                                                                             // uintXX_t
    1919
    2020#define GLUE2( x, y ) x##y
     
    194194        static inline uint64_t lehmer64( __uint128_t & state ) {
    195195                __uint128_t ret = state;
    196                 state *= 0xda942042e4dd58b5;
     196                state *= 0x_da94_2042_e4dd_58b5;
    197197                return ret >> 64;
    198198        } // lehmer64
    199199
    200200        static inline void lehmer64_set_seed( __uint128_t & state, uint64_t seed ) {
    201                 // The seed needs to be coprime with the 2^64 modulus to get the argest period, so no factors of 2 in the seed.
     201                // The seed needs to be coprime with the 2^64 modulus to get the largest period, so no factors of 2 in the seed.
    202202                state = seed;
    203203                lehmer64( state );                                                              // prime
Note: See TracChangeset for help on using the changeset viewer.