[package]
edition = "2024"
name = "mech-math"
version = "0.3.0"
authors = [
"Corey Montella <corey@mech-lang.org>",
"Steven McPhillimey <slm526@lehigh.edu>",
"Liam Messinger <ljm426@lehigh.edu>",
"Natalie Dumler <nad326@lehigh.edu>",
]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Math library for the Mech language"
homepage = "https://mech-lang.org"
documentation = "http://docs.mech-lang.org"
readme = "README.md"
keywords = [
"mech",
"language",
"programming",
]
license = "Apache-2.0"
repository = "https://github.com/mech-machines/math"
[badges.gitlab]
branch = "main"
repository = "mech-lang/machines/math"
[badges.maintenance]
status = "actively-developed"
[features]
abs = ["arithmetic"]
acos = ["trig"]
acosh = ["trig"]
acot = ["trig"]
acsc = ["trig"]
add = ["ops"]
add_assign = ["op_assign"]
arithmetic = ["math"]
arithmetic_default = [
"copysign",
"abs",
"fdim",
"fmod",
"nextafter",
"remainder",
]
asec = ["trig"]
asin = ["trig"]
asinh = ["trig"]
atan = ["trig"]
atan2 = ["trig"]
atanh = ["trig"]
atom = ["mech-core/atom"]
base = [
"baselib",
"pretty_print",
"serde",
"compiler",
"program",
"math_default",
"statements_default",
"subscript_default",
"mech-core/base",
]
baselib = [
"bool",
"string",
"f64",
"c64",
"r64",
"set",
"map",
"table",
"tuple",
"record",
"atom",
"enum",
"row_vectord",
"vectord",
"matrixd",
"subscript_range",
"logical_indexing",
"subscript_formula",
"variable_define",
"variable_assign",
"kind_define",
"kind_annotation",
"variables",
"functions",
"formulas",
"mech-core/baselib",
]
bessel = ["math"]
bessel_default = [
"j0",
"j1",
"jn",
"y0",
"y1",
"yn",
]
bool = ["mech-core/bool"]
c64 = [
"complex",
"mech-core/c64",
]
cbrt = ["root"]
ceil = ["rounding"]
compiler = ["mech-core/compiler"]
complex = [
"f64",
"numbers",
"mech-core/complex",
]
copysign = ["arithmetic"]
cos = ["trig"]
cosh = ["trig"]
cot = ["trig"]
csc = ["trig"]
default = [
"baselib",
"pretty_print",
"serde",
"compiler",
"program",
"u8",
"u16",
"u32",
"u64",
"u128",
"i8",
"i16",
"i32",
"i64",
"i128",
"f32",
"f64",
"c64",
"r64",
"math_default",
"statements_default",
"subscript_default",
"mech-core/default",
]
div = ["ops"]
div_assign = ["op_assign"]
dot_indexing = [
"subscript",
"mech-core/dot_indexing",
]
dynamic_matrix = [
"matrixd",
"vectord",
"row_vectord",
"mech-core/dynamic_matrix",
]
enum = ["mech-core/enum"]
erf = ["stat_error"]
erfc = ["stat_error"]
exp = ["math"]
exp10 = ["exp"]
exp2 = ["exp"]
expm1 = ["exp"]
exponential_default = [
"exp",
"exp2",
"exp10",
"expm1",
]
extrema = ["math"]
extrema_default = [
"max",
"min",
]
f32 = [
"floats",
"mech-core/f32",
]
f64 = [
"floats",
"mech-core/f64",
]
fdim = ["arithmetic"]
fixed_matrix = [
"matrix4",
"matrix3",
"matrix2",
"matrix1",
"matrix2x3",
"matrix3x2",
"mech-core/fixed_matrix",
]
fixed_row_vector = [
"row_vector4",
"row_vector2",
"mech-core/fixed_row_vector",
]
fixed_vector = [
"vector4",
"vector3",
"vector2",
"mech-core/fixed_vector",
]
floats = [
"numbers",
"mech-core/floats",
]
floor = ["rounding"]
fmod = ["arithmetic"]
formulas = ["mech-core/formulas"]
functions = [
"symbol_table",
"mech-core/functions",
]
gamma = ["math"]
gamma_default = [
"lgamma",
"tgamma",
]
hypot = ["trig"]
i128 = [
"signed_ints",
"mech-core/i128",
]
i16 = [
"signed_ints",
"mech-core/i16",
]
i32 = [
"signed_ints",
"mech-core/i32",
]
i64 = [
"signed_ints",
"mech-core/i64",
]
i8 = [
"signed_ints",
"mech-core/i8",
]
j0 = ["bessel"]
j1 = ["bessel"]
jn = ["bessel"]
kind_annotation = [
"functions",
"mech-core/kind_annotation",
]
kind_define = [
"kind_annotation",
"statements",
"mech-core/kind_define",
]
lgamma = ["gamma"]
log = ["logarithm"]
log10 = ["logarithm"]
log1p = ["logarithm"]
log2 = ["logarithm"]
logarithm = ["math"]
logarithm_default = [
"log",
"log1p",
"log10",
"log2",
]
logical_indexing = [
"subscript",
"vectord",
"bool",
"mech-core/logical_indexing",
]
map = ["mech-core/map"]
math = [
"num-traits",
"libm",
"functions",
]
math_default = [
"arithmetic_default",
"bessel_default",
"exponential_default",
"extrema_default",
"gamma_default",
"logarithm_default",
"ops_default",
"ops_assign_default",
"root_default",
"rounding_default",
"stat_error_default",
"trig_default",
]
matrix = [
"nalgebra",
"mech-core/matrix",
]
matrix1 = [
"matrix",
"mech-core/matrix1",
]
matrix2 = [
"matrix",
"mech-core/matrix2",
"mech-core/matrix",
]
matrix2x3 = [
"matrix",
"mech-core/matrix2x3",
]
matrix3 = [
"matrix",
"mech-core/matrix3",
]
matrix3x2 = [
"matrix",
"mech-core/matrix3x2",
]
matrix4 = [
"matrix",
"mech-core/matrix4",
]
matrixd = [
"matrix",
"mech-core/matrixd",
]
max = ["extrema"]
min = ["extrema"]
mod = ["ops"]
mul = ["ops"]
mul_assign = ["op_assign"]
neg = [
"simba",
"ops",
]
nextafter = ["arithmetic"]
no_std = ["mech-core/no_std"]
numbers = ["mech-core/numbers"]
op_assign = ["math"]
ops = ["math"]
ops_assign_default = [
"add_assign",
"sub_assign",
"mul_assign",
"div_assign",
]
ops_default = [
"add",
"sub",
"mul",
"div",
"pow",
"mod",
"neg",
]
pow = [
"ops",
"mech-core/math_pow",
]
pretty_print = ["mech-core/pretty_print"]
program = ["mech-core/program"]
r64 = [
"rational",
"mech-core/r64",
]
rational = [
"i64",
"numbers",
"mech-core/rational",
]
record = [
"tuple",
"kind_annotation",
"mech-core/record",
]
remainder = ["arithmetic"]
rint = ["rounding"]
root = ["math"]
root_default = [
"cbrt",
"sqrt",
]
round = ["rounding"]
roundeven = ["rounding"]
rounding = ["math"]
rounding_default = [
"ceil",
"floor",
"rint",
"round",
"roundeven",
"trunc",
]
row_vector2 = [
"matrix",
"mech-core/row_vector2",
]
row_vector3 = [
"matrix",
"mech-core/row_vector3",
]
row_vector4 = [
"matrix",
"mech-core/row_vector4",
]
row_vectord = [
"matrix",
"mech-core/row_vectord",
]
sec = ["trig"]
serde = ["mech-core/serde"]
set = ["mech-core/set"]
signed_ints = [
"numbers",
"mech-core/signed_ints",
]
sin = ["trig"]
sinh = ["trig"]
sqrt = ["root"]
stat_error = ["math"]
stat_error_default = [
"erf",
"erfc",
]
statements = ["mech-core/statements"]
statements_default = [
"variable_assign",
"variable_define",
"kind_define",
]
stdlib = [
"bool",
"string",
"u8",
"u16",
"u32",
"u64",
"u128",
"i8",
"i16",
"i32",
"i64",
"i128",
"f32",
"f64",
"c64",
"r64",
"set",
"map",
"table",
"tuple",
"record",
"atom",
"matrix1",
"matrix2",
"matrix3",
"matrix4",
"matrix2x3",
"matrix3x2",
"row_vector2",
"row_vector3",
"row_vector4",
"vector2",
"vector3",
"vector4",
"row_vectord",
"vectord",
"matrixd",
"subscript_range",
"logical_indexing",
"swizzle",
"subscript_formula",
"dot_indexing",
"variable_define",
"variable_assign",
"kind_define",
"kind_annotation",
"variables",
"functions",
"formulas",
]
string = ["mech-core/string"]
sub = ["ops"]
sub_assign = ["op_assign"]
subscript = ["mech-core/subscript"]
subscript_default = [
"subscript_slice",
"subscript_range",
"logical_indexing",
"swizzle",
"subscript_formula",
"dot_indexing",
]
subscript_formula = [
"subscript_slice",
"formulas",
"mech-core/subscript_formula",
]
subscript_range = [
"subscript_slice",
"vectord",
"mech-core/subscript_range",
]
subscript_slice = [
"subscript",
"vectord",
"mech-core/subscript_slice",
]
swizzle = [
"subscript",
"mech-core/swizzle",
]
symbol_table = ["mech-core/symbol_table"]
table = [
"vectord",
"record",
"kind_annotation",
"mech-core/table",
]
tan = ["trig"]
tanh = ["trig"]
tgamma = ["gamma"]
trig = ["math"]
trig_default = [
"acos",
"acosh",
"acot",
"acsc",
"asec",
"asin",
"asinh",
"atan",
"atan2",
"atanh",
"cos",
"cosh",
"cot",
"csc",
"hypot",
"sec",
"sin",
"sinh",
"tan",
"tanh",
]
trunc = ["rounding"]
tuple = ["mech-core/tuple"]
u128 = [
"unsigned_ints",
"mech-core/u128",
]
u16 = [
"unsigned_ints",
"mech-core/u16",
]
u32 = [
"unsigned_ints",
"mech-core/u32",
]
u64 = [
"unsigned_ints",
"mech-core/u64",
]
u8 = [
"unsigned_ints",
"mech-core/u8",
]
unsigned_ints = [
"numbers",
"mech-core/unsigned_ints",
]
variable_assign = [
"statements",
"mech-core/variable_assign",
]
variable_define = [
"statements",
"functions",
"mech-core/variable_define",
]
variables = [
"variable_define",
"symbol_table",
"mech-core/variables",
]
vector2 = [
"matrix",
"mech-core/vector2",
]
vector3 = [
"matrix",
"mech-core/vector3",
]
vector4 = [
"matrix",
"mech-core/vector4",
]
vectord = [
"matrix",
"mech-core/vectord",
]
y0 = ["bessel"]
y1 = ["bessel"]
yn = ["bessel"]
[lib]
name = "mech_math"
crate-type = ["rlib"]
path = "src/lib.rs"
[dependencies.inventory]
version = "0.3.22"
[dependencies.libm]
version = "0.2.15"
optional = true
[dependencies.mech-core]
version = "0.3.0"
default-features = false
[dependencies.nalgebra]
version = "0.34.1"
optional = true
[dependencies.num-traits]
version = "0.2.19"
features = ["libm"]
optional = true
default-features = false
[dependencies.paste]
version = "1.0.15"
[dependencies.simba]
version = "0.9.0"
optional = true