These are chat archives for symengine/symengine
e^(i * pi)to
-1right? Because I'm binding it to haskell through the C FFI, and this expression isn't getting simplified
eseem to work properly alone (as in,
1/i == -i,
e ** 0 = 1and things like that
symbol_setis used to create a new symbol, correct? Symbol in the sense of symbolic math symbol, right?
noexceptthe methods involved with move semantics (move constructor and move assignment). This allows the compiler to generate more optimised code (e.g., when storing objects in a standard container)
x / 0situation to
basic_divcauses a crash
x + 1work where
xis a Symbol?
*Symengine Symengine> let x= symbol "x" *Symengine Symengine> x + 1 1 + x
*Symengine Symengine> let x = symbol "x" *Symengine Symengine> 1 + x 1 + x *Symengine Symengine> :t (1 + x) (1 + x) :: BasicSym
BasicSym < Num. Hence. the right hand / left hand should also be
BasicSym. It auto-converts using the
fromInteger :: Int -> BasicSym
*Symengine Symengine> :t (+) (+) :: Num a => a -> a -> a *Symengine Symengine> :t (+ x) (+ x) :: BasicSym -> BasicSym *Symengine Symengine> :t (x +) (x +) :: BasicSym -> BasicSym
0.5. One is a
Rationaland the other is a
RealDouble. @rajithv is supposed to wrap
Rational. So in that case, all Haskell-floats will become
RealDouble, while explicitly constructed
Rationalwill become rational? what about
/operator? It yields a
RatioAFAIK. It has both.
scientificpackage for this stuff
Rationalis a bit different from arbitrary precision floats.
Rationalis exact arithmetic with rational numbers, while arbitrary precision is "real" base-exponent with just an arbitrary number of bits for the mantissa, correct?
RealDoubleis the machine precision one.
RealMPFRis the arbitrary precision one
Complexif I can
basic_typeeverytime you call a ffi function