pmt: Reals

pmt.is_real(pmt_t obj) → bool
pmt.to_double(pmt_t x) → double

Convert pmt to double if possible.

Returns the number closest to that is representable as a double. The argument must be a real or integer, otherwise a wrong_type exception is raised.

pmt.from_double(double x) → pmt_t

Return the pmt value that represents double .

pmt: Complex

pmt.is_complex(pmt_t obj) → bool

return true if is a complex number, false otherwise.

pmt.to_complex(pmt_t z) → std::complex<(double)>

If is complex, real or integer, return the closest complex<double>. Otherwise, raise the wrong_type exception.

pmt.from_complex(std::complex<(double)> z) → pmt_t

Return a complex number constructed of the given real and imaginary parts.

pmt.make_rectangular(double re, double im) → pmt_t

Return a complex number constructed of the given real and imaginary parts.

Table Of Contents

Previous topic

pmt: Misc

Next topic

pmt: Vectors

This Page