malachite_base/num/basic/mod.rs
1// Copyright © 2025 Mikhail Hogrefe
2//
3// This file is part of Malachite.
4//
5// Malachite is free software: you can redistribute it and/or modify it under the terms of the GNU
6// Lesser General Public License (LGPL) as published by the Free Software Foundation; either version
7// 3 of the License, or (at your option) any later version. See <https://www.gnu.org/licenses/>.
8
9/// The [`PrimitiveFloat`](floats::PrimitiveFloat) trait.
10pub mod floats;
11/// The [`PrimitiveInt`](integers::PrimitiveInt) trait.
12///
13/// ```
14/// use malachite_base::num::basic::integers::PrimitiveInt;
15/// use malachite_base::num::basic::traits::{One, Two, Zero};
16///
17/// assert_eq!(u32::WIDTH, 32);
18/// assert_eq!(u32::LOG_WIDTH, 5);
19/// assert_eq!(u32::WIDTH_MASK, 0x1f);
20///
21/// assert_eq!(u32::ZERO, 0);
22/// assert_eq!(u32::ONE, 1);
23/// assert_eq!(i16::TWO, 2);
24///
25/// assert_eq!(u32::MAX, 0xffffffff);
26/// assert_eq!(u32::MIN, 0);
27/// assert_eq!(i32::MAX, 0x7fffffff);
28/// assert_eq!(i32::MIN, -0x80000000);
29/// ```
30pub mod integers;
31/// The [`PrimitiveSigned`](signeds::PrimitiveSigned) trait.
32///
33/// ```
34/// use malachite_base::num::basic::traits::NegativeOne;
35///
36/// assert_eq!(i16::NEGATIVE_ONE, -1);
37/// ```
38pub mod signeds;
39/// Traits for constants.
40pub mod traits;
41/// The [`PrimitiveUnsigned`](unsigneds::PrimitiveUnsigned) trait.
42pub mod unsigneds;