runmat_runtime/builtins/constants/
mod.rs1use runmat_builtins::Value;
5
6runmat_builtins::inventory::submit! {
8 runmat_builtins::Constant { name: "pi", value: Value::Num(std::f64::consts::PI) }
9}
10
11runmat_builtins::inventory::submit! {
12 runmat_builtins::Constant { name: "e", value: Value::Num(std::f64::consts::E) }
13}
14
15runmat_builtins::inventory::submit! {
16 runmat_builtins::Constant { name: "eps", value: Value::Num(f64::EPSILON) }
17}
18
19runmat_builtins::inventory::submit! {
20 runmat_builtins::Constant { name: "sqrt2", value: Value::Num(std::f64::consts::SQRT_2) }
21}
22
23runmat_builtins::inventory::submit! {
24 runmat_builtins::Constant { name: "i", value: Value::Complex(0.0, 1.0) }
25}
26
27runmat_builtins::inventory::submit! {
28 runmat_builtins::Constant { name: "j", value: Value::Complex(0.0, 1.0) }
29}
30
31runmat_builtins::inventory::submit! {
33 runmat_builtins::Constant { name: "inf", value: Value::Num(f64::INFINITY) }
34}
35
36runmat_builtins::inventory::submit! {
37 runmat_builtins::Constant { name: "Inf", value: Value::Num(f64::INFINITY) }
38}
39
40runmat_builtins::inventory::submit! {
41 runmat_builtins::Constant { name: "nan", value: Value::Num(f64::NAN) }
42}
43
44runmat_builtins::inventory::submit! {
45 runmat_builtins::Constant { name: "NaN", value: Value::Num(f64::NAN) }
46}
47
48runmat_builtins::inventory::submit! {
50 runmat_builtins::Constant { name: "true", value: Value::Bool(true) }
51}
52
53runmat_builtins::inventory::submit! {
54 runmat_builtins::Constant { name: "false", value: Value::Bool(false) }
55}