forked from Orchid/orchid
Most files suffered major changes
- Less ambiguous syntax - Better parser (Chumsky only does tokenization now) - Tidy(|ier) error handling - Facade for simplified embedding - External code grouped in (fairly) self-contained Systems - Dynamic action dispatch - Many STL additions
This commit is contained in:
@@ -123,3 +123,9 @@ pub fn float_parser() -> impl SimpleParser<char, NotNan<f64>> {
|
||||
))
|
||||
.labelled("float")
|
||||
}
|
||||
|
||||
pub fn print_nat16(num: NotNan<f64>) -> String {
|
||||
let exp = num.log(16.0).floor();
|
||||
let man = num / 16_f64.powf(exp);
|
||||
format!("{man}p{exp:.0}")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user