Crate anything

Source
Expand description

github crates.io docs.rs

Calculate everything and nothing with perfect precision.

Anything provides the any binary, which is a small flexible program intended to do calculations and query for numerical facts.

You can install the any command by using:

cargo install anything

The any command can do a couple of really interesting things:

  • Unit conversions!
    • any 3dl to m^3 gives us 0.0003 m³.
    • any 1000Gbtu to MWh gives us 293055.555555555555… hr⋅MW.
  • Fact queries!
    • any population finland / population world gives us 0.000710822459005….
  • Basic math!
    • any 32500 / round(population finland) gives us 0.00586566578555….
  • Unit-aware calculations!
    • any 3N / 10kg gives us 0.3 m/s².
  • And a bit more…

You can think of any is a much smaller and local wolfram engine, without the hassle of having to go online for your answers.

Re-exports§

pub use self::rational::Rational;

Modules§

rational
Helper module for calculating rational numbers.
units
Available derived units.

Structs§

Compound
A complex unit which supports powers and prefixes.
Constant
A single constant.
Db
The database of facts.
Error
A facts error.
Numeric
A arbitrary precision numerical value with a unit.
Options
The options of a query.
Powers
Helpers struct to build bases.
Query
The result of a query.
Source
A single source.

Enums§

Description
Description of things used by a query.
Unit
A base unit.

Functions§

parse
Parse the given source and return the corresponding node.
query
Perform a query over the given string and database.