6#ifndef SYMENGINE_REAL_DOUBLE_H
7#define SYMENGINE_REAL_DOUBLE_H
10#include <symengine/symengine_exception.h>
16RCP<const Number> number(
double x);
62 return this->i == 0.0;
89 + mp_get_d(
other.as_integer_class()));
98 i + mp_get_d(
other.as_rational_class()));
108 mp_get_d(
other.imaginary_)));
131 return other.add(*
this);
141 - mp_get_d(
other.as_integer_class()));
150 i - mp_get_d(
other.as_rational_class()));
160 mp_get_d(
other.imaginary_)));
183 return other.rsub(*
this);
212 mp_get_d(
other.imaginary_)));
234 if (
other.is_zero()) {
238 * mp_get_d(
other.as_integer_class()));
247 i * mp_get_d(
other.as_rational_class()));
257 mp_get_d(
other.imaginary_)));
280 return other.mul(*
this);
290 / mp_get_d(
other.as_integer_class()));
299 i / mp_get_d(
other.as_rational_class()));
309 mp_get_d(
other.imaginary_)));
332 return other.rdiv(*
this);
360 mp_get_d(
other.imaginary_))
394 mp_get_d(
other.as_rational_class())));
407 mp_get_d(
other.imaginary_))));
433 return other.rpow(*
this);
442 if (
other.is_negative()) {
455 if (
other.is_negative()) {
457 mp_get_d(
other.as_rational_class())));
469 mp_get_d(
other.imaginary_)),
#define IMPLEMENT_TYPEID(SYMENGINE_ID)
Inline members and functions.
The lowest unit of symbolic representation.
A class that will evaluate functions numerically.
RealDouble Class to hold double values.
RCP< const Number > rpow(const Number &other) const override
Converts the param other appropriately and then calls powreal
bool is_minus_one() const override
RCP< const Number > divreal(const Complex &other) const
RCP< const Number > addreal(const Complex &other) const
RCP< const Number > addreal(const RealDouble &other) const
bool is_zero() const override
RCP< const Number > powreal(const Rational &other) const
RCP< const Number > subreal(const RealDouble &other) const
RCP< const Number > rdivreal(const Integer &other) const
RCP< const Number > powreal(const RealDouble &other) const
RCP< const Number > sub(const Number &other) const override
Converts the param other appropriately and then calls subreal
RCP< const Number > rdivreal(const Complex &other) const
RCP< const Number > div(const Number &other) const override
Converts the param other appropriately and then calls divreal
hash_t __hash__() const override
RCP< const Number > rsub(const Number &other) const override
Converts the param other appropriately and then calls subreal
bool is_one() const override
RCP< const Number > rpowreal(const Integer &other) const
RCP< const Number > rpowreal(const Rational &other) const
Evaluate & get_eval() const override
Get Evaluate singleton to evaluate numerically.
bool is_positive() const override
bool __eq__(const Basic &o) const override
RCP< const Number > add(const Number &other) const override
Converts the param other appropriately and then calls addreal
RCP< const Number > divreal(const Rational &other) const
RCP< const Number > mulreal(const RealDouble &other) const
RCP< const Number > divreal(const RealDouble &other) const
int compare(const Basic &o) const override
RCP< const Number > powreal(const Integer &other) const
RCP< const Number > rsubreal(const Integer &other) const
RCP< const Number > rdiv(const Number &other) const override
Converts the param other appropriately and then calls divreal
RCP< const Number > addreal(const Rational &other) const
bool is_negative() const override
bool is_complex() const override
RCP< const Number > subreal(const Rational &other) const
RCP< const Number > rsubreal(const Complex &other) const
RCP< const Number > rpowreal(const Complex &other) const
RCP< const Number > mulreal(const Rational &other) const
RCP< const Number > subreal(const Complex &other) const
RCP< const Number > mul(const Number &other) const override
Converts the param other appropriately and then calls mulreal
RCP< const Number > powreal(const Complex &other) const
RCP< const Number > rdivreal(const Rational &other) const
RCP< const Number > mulreal(const Complex &other) const
RCP< const Number > pow(const Number &other) const override
Converts the param other appropriately and then calls powreal
bool is_exact() const override
RCP< const Number > rsubreal(const Rational &other) const
RCP< const Number > addreal(const Integer &other) const
RCP< const Number > mulreal(const Integer &other) const
RCP< const Number > subreal(const Integer &other) const
RCP< const Number > divreal(const Integer &other) const
Main namespace for SymEngine package.
void hash_combine(hash_t &seed, const T &v)