[READ-ONLY] Mirror of https://github.com/probablykasper/cpc. Text calculator with support for units and conversion cpc.kasper.space
calculator cli conversion converter library math package units units-converter wasm website
0

Configure Feed

Select the types of activity you want to include in your feed.

v1.1.0

Kasper (Nov 14, 2020, 5:26 AM +0100) efd5b63a 7284422e

+11 -6
+8
CHANGELOG.md
··· 1 + ## 1.1.0 - 2020 Nov 14 2 + - Added units of frequency 3 + - Added support using foot-inch syntax with addition, like `2"+6'4"` 4 + - Unsupported foot-inch syntax like `(6)'4"` and `6'4!"` now cause errors 5 + - Fixed README.md stating the performance is 1000x slower than it actually is 6 + - Fixed trailing percentage signs being ignored when `allow_trailing_operators` is true 7 + - Fixed error caused by consecutive percentage signs 8 + 1 9 ## 1.0.2 - 2020 Oct 12 2 10 - Fix parsing of unit `Quarter` (#1) 3 11 - Use division instead of multiplication when dividing numbers of the same unit `Quarter` (#1)
+1 -1
Cargo.lock
··· 12 12 13 13 [[package]] 14 14 name = "cpc" 15 - version = "1.0.2" 15 + version = "1.1.0" 16 16 dependencies = [ 17 17 "decimal 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 18 18 ]
+1 -1
Cargo.toml
··· 1 1 [package] 2 2 name = "cpc" 3 - version = "1.0.2" 3 + version = "1.1.0" 4 4 description = "evaluates math expressions, with support for units and conversion between units" 5 5 authors = ["Kasper Henningsen"] 6 6 edition = "2018"
+1 -4
README.md
··· 62 62 63 63 (4 + 1)km to light years 64 64 65 - 10m/2s * 5s 65 + 10m/2s * 5 trillion s 66 66 67 67 1 lightyear * 0.001mm in km2 68 68 ··· 165 165 ``` 166 166 167 167 ### Potential Improvements 168 - #### General 169 - - The functions in units.rs have a lot of manual if statements. This could probably be replaced with a pretty advanced macro. 170 - - Support for lexing words, like `one billion` 171 168 #### Potential unit types 172 169 Nice list of units: https://support.google.com/websearch/answer/3284611 173 170 - Currency: How would you go about dynamically updating the weights?