5 unstable releases
0.4.1 | Jan 12, 2024 |
---|---|
0.4.0 | Sep 12, 2023 |
0.3.1 | Nov 10, 2022 |
0.3.0 | Nov 10, 2022 |
0.2.0 | Sep 13, 2022 |
#19 in #arbitrary-precision
3,284 downloads per month
Used in 23 crates
(via dashu)
1MB
24K
SLoC
dashu-macros
Utility macros to create number literals. See Docs.rs for the full documentation.
Features
- Support creating big integers with literals using
ubig!
andibig!
. - Support creating big floats with literals using
fbig!
anddbig!
. - Support creating big rationals with literals using
rbig!
. - All macros can be used to create const numbers if they are small enough.
License
See the top-level readme.
lib.rs
:
A macro library for creating big numbers from literals.
See the documentation of each macro for the usage.
Dependency requirement
Due the fact that the macros expand to plain tokens, and proc macro crates can't
re-export types, it's required to add explicit dependency to the underlying crates
when using the macros. Specifically, you need to add the following crates as dependencies
to your Cargo.toml
:
- For [ubig!]/[static_ubig!] and [ibig!]/[static_ibig!]:
dashu-int
- For [fbig!] and [dbig!]:
dashu-int
,dashu-float
- For [rbig!]:
dashu-int
,dashu-ratio
If you are using these macros from the dashu
crate, then it's not necessary to
explicitly adding these dependencies, because the related types are re-exported
by the dashu
crate.