Expand description
The numbers/complex domain: complex literals and values, their arithmetic,
and the promotion edges from i64, f64, and rational into the complex
sink of the scalar lattice.
Structs§
- Complex
Number Domain - The complex number domain at the sink of the scalar promotion lattice:
parses
a+biliterals and accepts the widening edges fromf64,i64, andrational. - Complex
Numbers Lib - The library that installs the
numbers/complexdomain: its literal class and shapes, theComplexValueclass, the complex ops, and the incoming promotion rules fromf64,i64, andrational. - Complex
Value - A complex number value: real and imaginary parts over an
f64base scalar.
Functions§
- add_
symbol - The
math/addoperator symbol this domain installs a complex rule for. - canonical_
complex - Renders
(real, imag)parts into the canonicala+biliteral form, fixing the imaginary sign and normalizing negative zero viacanonical_f64. - canonical_
f64 - Renders an
f64part for inclusion in a complex literal, normalizing the-0rendering to0. - complex_
value - Constructs an opaque
numbers/complexvalue from finite real and imaginary parts, erroring when either part is non-finite. - complex_
value_ class_ symbol - The symbol of the
numbers/complexvalue class, used to register the class and to tag the read-constructor encoding of complex values. - div_
symbol - The
math/divoperator symbol this domain installs a complex rule for. - f64_
domain - The
numbers/f64domain symbol, source of the f64 -> complex promotion edge. - i64_
domain - The
numbers/i64domain symbol, source of the i64 -> complex promotion edge. - literal_
class_ symbol - The symbol of the complex literal class (the
Expr::Numberliteral shape in canonicala+biform). - literal_
instance_ shape_ symbol - The symbol of the shape matching individual complex literals, derived from
literal_class_symbol. - mul_
symbol - The
math/muloperator symbol this domain installs a complex rule for. - neg_
symbol - The
math/negoperator symbol this domain installs a complex rule for. - number_
domain - The
numbers/complexdomain symbol shared by this crate’s literals, values, and ops. - parse_
complex_ literal - Parses a canonical
a+bicomplex literal into its(real, imag)parts, returningNonewhen the text is not a well-formed complex literal. - parse_
rational_ as_ f64 - Parses a
num/denrational literal to itsf64value for the rational -> complex promotion, returningNoneon malformed text or a zero denominator. - product_
symbol - The
math/productreduction operator symbol this domain installs a complex rule for. - rational_
domain - The
numbers/rationaldomain symbol, source of the rational -> complex promotion edge. - sub_
symbol - The
math/suboperator symbol this domain installs a complex rule for. - sum_
symbol - The
math/sumreduction operator symbol this domain installs a complex rule for.