These are chat archives for symengine/symengine

16th
Jul 2015
Isuru Fernando
@isuruf
Jul 16 2015 14:07
@certik, What should be outputs of
x ** 0.0
x ** 1.0
x * 0.0
Ondřej Čertík
@certik
Jul 16 2015 14:08
Here is what SymPy returns:
In [1]: x**0.0
Out[1]: 
 0.0
x   

In [2]: x**1.0
Out[2]: 
 1.0
x   

In [3]: x*0.0
Out[3]: 0

So for the power it just keeps it in the power. For multiplying, somehow it thinks it's 0, since

In [4]: 0.0 == 0
Out[4]: True

I think either is fine with me. What exactly is your question about the printing?

Isuru Fernando
@isuruf
Jul 16 2015 14:10
For symengine, I was thinking of
In [1]: x**0.0
Out[1]: 
1.0

In [2]: x**1.0
Out[2]: 
 1.0
x   

In [3]: x*0.0
Out[3]: 0.0

What exactly is your question about the printing?

Which comment are you talking about?

Ondřej Čertík
@certik
Jul 16 2015 14:15
It's fine if it prints what you just wrote.
I don't see a problem with that.
Isuru Fernando
@isuruf
Jul 16 2015 14:17
We'll have to modify printing of doubles
Do you know of a way to print the 15 most significant digits of a double?
Isuru Fernando
@isuruf
Jul 16 2015 14:22
@bluescarni, I left a message on https://gitter.im/bluescarni/piranha
Ondřej Čertík
@certik
Jul 16 2015 14:55
@isuruf I think you just have to setup some flags in the << printer
Shivam Vats
@shivamvats
Jul 16 2015 18:30
In #511 , basic.h includes piranha as piranha/piraha.hpp. This works fine if piranha is installed. In my case, I have not installed piranha, so I set the PIRANHA_INCLUDE_DIRS as piranha/src, which works with piranha.hpp but not piranha/piranha.hpp. Is there a common solution?
Sumith Kulal
@Sumith1896
Jul 16 2015 20:25
Even I am worried about @shivamvats's query
Sumith Kulal
@Sumith1896
Jul 16 2015 20:34
@certik @bluescarni Does the member of the class change from hash_set to std::unique_ptr<hash_set> ?
Francesco Biscani
@bluescarni
Jul 16 2015 22:36
@Sumith1896 yes
basically it's something like the PIMPL idiom
just use a smart pointer instead of a naked one, since we are in C++11
Sumith Kulal
@Sumith1896
Jul 16 2015 22:38
Cool, I'll have a look
Francesco Biscani
@bluescarni
Jul 16 2015 22:52
the idea is that in order to declare a std::unique_ptr<T> you do not need the definition of T, just its declaration. Then you can move the inclusion of Piranha headers into the .cpp and just include the declaration of hash_set in the .h.