These are chat archives for symengine/symengine

27th
Apr 2017
Francesco Biscani
@bluescarni
Apr 27 2017 19:31
@prateeksingh0001 the "x" input should be fine. My guess is that maybe SymEngine::mpz_wrapper does not support all the operations that are needed to perform the integration in piranha
the polynomial integration bit in piranha essentially requires that you implement a valid specialisation of a bunch of piranha mathematical functions for SymEngine::mpz_wrapper
Prateek Singh
@prateeksingh0001
Apr 27 2017 21:46
@bluescarni Thanks a lot for your help :) . I have started working towards identifying those functions. As soon as I am done with it I'll start with their implementation.
Francesco Biscani
@bluescarni
Apr 27 2017 21:52
feel free to ask for help, either here or over at https://gitter.im/bluescarni/piranha . That part of the code is not as well documented as it should be unfortunately. The relevant doc is here: http://bluescarni.github.io/piranha/doxygen/classpiranha_1_1polynomial.html#aeff11306cd945d956dd8edb3c55c068d but it does not tell you much
for starters, it says that the coefficient type (SymEngine::mpz_wrapper in this case) must be differentiable and support is_zero. This means that you need to provide specialisations for the piranha::math::is_zero() and piranha::math::partial() functions
Francesco Biscani
@bluescarni
Apr 27 2017 21:58
it tells you that in order to specialize it for your type (SymEngine::mpz_wrapper), you need to provide a specialization of the is_zero_impl functor
here's an example of such specialisation: https://github.com/bluescarni/piranha/blob/master/include/piranha/real.hpp#L1911 (this is for the real class)
the same process applies for piranha::math::partial() (i.e., specialize the partial_impl functor)
Prateek Singh
@prateeksingh0001
Apr 27 2017 22:05
Sure, I will start with these pointers you've provided me and ping you if I hit any roadblock.