cpc

Text calculator with support for units and conversion

MIT License

Downloads
30.5K
Stars
128
Committers
6

Bot releases are visible (Hide)

cpc - Latest Release

Published by github-actions[bot] about 1 year ago

  • Fix negative unary - always having higher precedence than ^. This resulted in -3^2 returning 9 instead of -9
cpc - v1.9.2

Published by github-actions[bot] over 1 year ago

  • Fix automatic light year unit not chosen for large distances (@gcomte)
cpc - v1.9.1

Published by github-actions[bot] over 1 year ago

  • Improve formatting of numbers
  • Remove unnecessary dependencies (@jqnatividad)
cpc - v1.9.0

Published by github-actions[bot] almost 2 years ago

  • Add marathon unit
  • Add aarch64 binaries
cpc - v1.8.0

Published by probablykasper about 3 years ago

  • Add support for data transfer rate units (like mb/s)
  • Add support for dividing length by speed (like 10 km / 100 kph)
  • Fix implicit start/end parentheses
cpc - v1.7.0

Published by probablykasper over 3 years ago

  • Add operator words plus, minus and times
  • Add operator phrases multiplied by and divided by
  • Add operator symbol ÷
  • Disallow named number followed by smaller named number (like 1 million thousand)
  • Fix/improve parsing of multi-word units
  • Fix light second parsed as light year
  • Fix Ω lexing
  • Fix lexing of rpm units
cpc - v1.6.0

Published by probablykasper over 3 years ago

  • Add support for non-US "metre" and "litre" spellings
  • Add help menu
  • Add --version flag
  • Freak out instead of ignoring unexpected arguments
  • Print errors to STDERR
  • Fix decimeter parsed as centimeter
cpc - v1.5.1

Published by probablykasper over 3 years ago

  • Fix numbers unnecessarily displayed in E notation
cpc - v1.5.0

Published by probablykasper over 3 years ago

  • Remove TokenVector type
  • Rename --debug to --verbose and -v
  • Allow CLI flags before input
  • Fix panic when input contains only whitespace and/or commas
cpc - v1.4.2

Published by probablykasper over 3 years ago

  • Fix d128 errors due to d128 error status not being cleared
cpc - v1.4.1

Published by probablykasper over 3 years ago

  • Fix panic when input is empty string
cpc - v1.4.0

Published by probablykasper over 3 years ago

  • Made cpc case insensitive
  • Switch back to official decimal because decimal#59 is fixed.
cpc - v1.3.2

Published by probablykasper over 3 years ago

  • Fix incorrect parsing of named numbers Duodecillion and greater
cpc - v1.3.1

Published by probablykasper almost 4 years ago

  • Fix spelling of Celsius (@joseluis)
cpc - v1.3.0

Published by probablykasper almost 4 years ago

  • Added unit of mass Stone
  • Added keyword pounds-force (used for PoundsPerSquareInch)
  • Fixed lexing of Pound
cpc - v1.2.0

Published by probablykasper almost 4 years ago

  • Added units of electric current
  • Added units of voltage
  • Added units of resistance
  • Added support for Voltage * ElectricCurrent
  • Added support for Voltage / ElectricCurrent
  • Added support for Voltage / Resistance
  • Added support for Power / ElectricCurrent
  • Added support for Power / Voltage
  • Added support for Power * Time
  • Added support for ElectricCurrent * Resistance
  • Added support for Energy / Time
  • Fixed dividing a unit by NoUnit resulting in NoUnit
  • Fixed interpreting of µs
  • Fixed panics caused in Rust 1.48.0 by switching decimal dependency to decimal_fixes_mirror
cpc - v1.1.0

Published by probablykasper almost 4 years ago

  • Added units of frequency
  • Added support using foot-inch syntax with addition, like 2"+6'4"
  • Unsupported foot-inch syntax like (6)'4" and 6'4!" now cause errors
  • Fixed README.md stating the performance is 1000x slower than it actually is
  • Fixed trailing percentage signs being ignored when allow_trailing_operators is true
  • Fixed error caused by consecutive percentage signs
cpc - v1.0.2

Published by probablykasper about 4 years ago

  • Fix parsing of unit Quarter (@ethwu)
  • Use division instead of multiplication when dividing numbers of the same unit Quarter (@ethwu)
cpc - v1.0.1

Published by probablykasper about 4 years ago

  • Fixed the library not working
  • Added documentation comments
  • Added docs.rs documentation link
  • Various fixes and improvements
cpc - v1.0.0

Published by probablykasper about 4 years ago

  • Initial release