Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
bertiqwerty committed Jan 9, 2022
1 parent c4dc472 commit f742ec3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "exmex"
version = "0.13.1" # check html document root in lib.rs and the Readme.md
version = "0.14.0" # check html document root in lib.rs and the Readme.md
authors = ["Behrang Shafei <https://github.com/bertiqwerty>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Add
```
[dependencies]
# ...
exmex = "0.13.1"
exmex = "0.14.0"
```
to your `Cargo.toml` for the [latest relase](https://crates.io/crates/exmex). If you want to use the newest version of Exmex, add
```
Expand Down Expand Up @@ -63,7 +63,7 @@ assert_eq!(result, u32::MAX - 1);
```
More involved examples of data types are
* operators as operands as used for [day 19 of Advent of Code 2020](https://www.ninety.de/log/index.php/en/2021/11/11/parsing-operators-in-rust/) and
* the type [`Val`](https://docs.rs/exmex/0.13.1/exmex/enum.Val.html) that can be activated with the feature `value`, see below.
* the type [`Val`](https://docs.rs/exmex/0.14.0/exmex/enum.Val.html) that can be activated with the feature `value`, see below.

## Partial Differentiation

Expand Down Expand Up @@ -98,7 +98,7 @@ assert!((result - 2.0).abs() < 1e-12);

## Mixing Data Types in one Expression with the Feature `value`

After activating the Exmex-feature `value` one can use expressions with data of type [`Val`](https://docs.rs/exmex/0.13.1/exmex/enum.Val.html), inspired by the type `Value` from the crate [Evalexpr](https://crates.io/crates/evalexpr). An instance of `Val` can contain a boolean, an int, or a float. This way, it is possible to use booleans, ints, and floats in the same expression. Further, Exmex provides in terms of [`ValOpsFactory`](https://docs.rs/exmex/0.13.1/exmex/struct.ValOpsFactory.html) a pre-defined set of operators for `Val`. See the following example of a Python-like `if`-`else`-operator.
After activating the Exmex-feature `value` one can use expressions with data of type [`Val`](https://docs.rs/exmex/0.14.0/exmex/enum.Val.html), inspired by the type `Value` from the crate [Evalexpr](https://crates.io/crates/evalexpr). An instance of `Val` can contain a boolean, an int, or a float. This way, it is possible to use booleans, ints, and floats in the same expression. Further, Exmex provides in terms of [`ValOpsFactory`](https://docs.rs/exmex/0.14.0/exmex/struct.ValOpsFactory.html) a pre-defined set of operators for `Val`. See the following example of a Python-like `if`-`else`-operator.
```rust
use exmex::{Express, Val};
let expr = exmex::parse_val::<i32, f64>("0 if b < c else 1.2")?;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc(html_root_url = "https://docs.rs/exmex/0.13.1")]
#![doc(html_root_url = "https://docs.rs/exmex/0.14.0")]
//! Exmex is an extendable mathematical expression parser and evaluator. Ease of use, flexibility, and efficient evaluations are its main design goals.
//! Exmex can parse mathematical expressions possibly containing variables and operators. On the one hand, it comes with a list of default operators
//! for floating point values. For differentiable default operators, Exmex can compute partial derivatives. On the other hand, users can define their
Expand Down

0 comments on commit f742ec3

Please sign in to comment.