numojo.routines.constants¶
Constants (numojo.routines.constants)
This module defines physical and mathematical constants for use in numerical computations.
The constants are defined as class attributes of the Constants class, which is designed to be immutable and efficient for compile-time evaluation.
Structs¶
Constants¶
Memory convention: memory_only
Implements: AnyType, Copyable, ImplicitlyDestructible, Movable
Define constants.
Use comptime for compile time evaluation of indefinite precision.
import numojo as nm
fn main():
var pi: Float64 = nm.pi
print("Float64:", pi*pi*pi*pi*pi*pi)
print("Literal:", nm.pi*nm.pi*nm.pi*nm.pi*nm.pi*nm.pi)
Aliases¶
c¶
Value: 299792458
pi¶
Value: 3.1415926535897931
e¶
Value: 2.7182818284590451
hbar¶
Value: 1.0545718176461565E-34
__del__is_trivial¶
Value: False
__move_ctor_is_trivial¶
Value: True
__copy_ctor_is_trivial¶
Value: True