| Crates.io | real-proc |
| lib.rs | real-proc |
| version | 0.0.3 |
| created_at | 2022-03-01 14:21:33.643661+00 |
| updated_at | 2022-03-13 05:53:21.555307+00 |
| description | proc macros for floating point constants. |
| homepage | https://gitlab.com/fton/real-proc |
| repository | https://gitlab.com/fton/real-proc |
| max_upload_size | |
| id | 541571 |
| size | 9,332 |
Proc-macro for generating Frac from a decimal literal in const context.
use ::real_proc::frac;
use ::const_frac::Frac;
const CONST: Frac = frac!(const_frac, 3.14e-20);
let int = Frac::from_int(314);
let right = int * Frac::from_exp10(-22);
assert_eq!(CONST, right);
This package is in the very early stage.