drand48 0.2.0

drand48 - POSIX.1 standard LCG random number generator
Documentation
/*
DRAND48 Linear congruential generator
implementation by Radim Kolar <hsn@sendmail.cz> 2025
https://gitlab.com/hsn10/drand48

This is free and unencumbered software released into the public domain.
SPDX-License-Identifier: Unlicense OR CC0-1.0

For more information, please refer to <http://unlicense.org/>
*/

#![allow(non_snake_case)]

use super::M;

#[test]
fn check_M_minus_1() {
   assert_eq!(M-1, 0xFFFF_FFFF_FFFF_i64);
}

#[test]
fn check_M() {
   assert_eq!(M, 2i64.pow(48));
}

#[test]
fn check_C() {
   assert_eq!(super::C, 11);
}

#[test]
fn check_A() {
   // value from https://pubs.opengroup.org/onlinepubs/7908799/xsh/drand48.html
   assert_eq!(super::A, 0x5DEECE66D);
}

#[test]
fn check_MIN() {
   assert_eq!(super::MIN, 0);
}

#[test]
fn check_MAX() {
   assert_eq!(super::MAX, M-1);
}