#proc-macro #hobby #util-lib #floating-point

macro real-proc

proc macros for floating point constants

3 releases

0.0.3 Mar 13, 2022
0.0.2 Mar 2, 2022
0.0.1 Mar 1, 2022

#7 in #util-lib

Download history 4/week @ 2024-02-19 73/week @ 2024-02-26 8/week @ 2024-03-04 7/week @ 2024-03-11 1/week @ 2024-03-18 6/week @ 2024-03-25 33/week @ 2024-04-01 7/week @ 2024-04-08 15/week @ 2024-04-15 12/week @ 2024-04-22

68 downloads per month
Used in 2 crates

MIT/Apache

4KB

Latest Release pipeline status coverage report

Description

Proc-macro for generating Frac from a decimal literal in const context.

Usage

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);

Project status

This package is in the very early stage.

Dependencies

~2.5MB
~52K SLoC