Crates.io | math-symbols |
lib.rs | math-symbols |
version | 0.1.1 |
source | src |
created_at | 2023-06-23 07:49:26.098445 |
updated_at | 2023-06-23 07:49:26.098445 |
description | Symbols for computer algebra |
homepage | |
repository | https://github.com/a-maier/math-symbols |
max_upload_size | |
id | 898083 |
size | 5,523 |
Named symbols for use in compute algebra systems. Symbol names are stored centrally such that copies are cheap and need little memory.
use math_symbols::*;
// Define a number of symbols with variable name equal to symbol name
symbols!(x, y, z);
assert_eq!(x.name(), "x");
assert_eq!(y.name(), "y");
assert_eq!(z.name(), "z");
// Symbols are identified by their names
let xx = Symbol::new("x");
assert_eq!(x, xx);
// Symbols are ordered by their creation time
assert!(x < y);
License: GPL-3.0-or-later