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::validate_seed;
use super::M;

#[test]
fn is_zero() {
   assert_eq! ( validate_seed(0), true );
}

#[test]
fn is_minus_1() {
   assert_eq! ( validate_seed(-1), false );
}

#[test]
fn is_M() {
   assert_eq! ( validate_seed(M), false );
}

#[test]
fn is_M_plus_1() {
   assert_eq! ( validate_seed(M+1), false );
}

#[test]
fn is_50() {
   assert_eq! ( validate_seed(50), true );
}