These are chat archives for symengine/symengine

30th
Mar 2016
Akash Trehan
@CodeMaxx
Mar 30 2016 04:58
This message was deleted
Akash Trehan
@CodeMaxx
Mar 30 2016 07:00
@isuruf I’m getting an error with apple clang.
https://travis-ci.org/symengine/symengine/jobs/119447218
No error on Linux
Akash Trehan
@CodeMaxx
Mar 30 2016 07:14
So we can’t declare an empty polynomial?
Isuru Fernando
@isuruf
Mar 30 2016 07:15
No, you just can't declare it that way
You have to call the constructor of std::map
Akash Trehan
@CodeMaxx
Mar 30 2016 07:18
Right…Thanks!
Akash Trehan
@CodeMaxx
Mar 30 2016 20:04
@isuruf Any specific reason for not using from_dict() here?
@irislq ^
Akash Trehan
@CodeMaxx
Mar 30 2016 21:47
@isuruf @Sumith1896 is there a way to detect a SYMENGINE_ASSERT(false) and not throw an error? like we have CHECK_THROWS_AS() for runtime errors
Akash Trehan
@CodeMaxx
Mar 30 2016 22:06
Actually I want to detect an error by is_cannonical()
Iris Lui
@irislq
Mar 30 2016 22:36
@isuruf @Sumith1896 How would x^(-1) or any term with a negative exponent be represented in UnivariatePolynomial?
@CodeMaxx Is there a dilemma if we don't use from_dict()?
Akash Trehan
@CodeMaxx
Mar 30 2016 22:39
No I mean passing the degree to univariate_polynomial becomes redundant since we already have the dictionary telling us that(just like it works in UnivariateIntPolynomial)
Iris Lui
@irislq
Mar 30 2016 22:41
That's true. I think it's better if we change it to use from_dict() since it checks for 0 coefficient terms
Akash Trehan
@CodeMaxx
Mar 30 2016 22:41
@irislq If you mean how to initialise a polynomial having x^-1 term, then you can do it just like a normal polynomial using {-1, 5(say)} in the dictionary.
Yes we should use from_dict()
Was there any specific reason you didn’t use from_dict() before?
Iris Lui
@irislq
Mar 30 2016 22:44
I think it was just an oversight
Akash Trehan
@CodeMaxx
Mar 30 2016 22:44
Right I’ll send in a PR changing it.
Akash Trehan
@CodeMaxx
Mar 30 2016 22:56
@irislq btw if you use univariate_polynomial() for x^(-1), it won’t work since univariate_polynomial() is only allowing uint degree polynomials. This is a bug. Will be solved when we use from_dict()
Iris Lui
@irislq
Mar 30 2016 22:57
Alright, if you can submit the PR and have it merged soon that'll be great!
Akash Trehan
@CodeMaxx
Mar 30 2016 22:58
Yeah I’ll submit is ASAP
Akash Trehan
@CodeMaxx
Mar 30 2016 23:06
@isuruf Why do we have unsigned int degree_; for UnivariatePolynomial when we are allowing negative exponent terms. This should be changed.
Iris Lui
@irislq
Mar 30 2016 23:11
@CodeMaxx I think it's a rule in math that polynomials can't have negative exponentials. Exponents can only be 0,1,2, and so on.
Akash Trehan
@CodeMaxx
Mar 30 2016 23:15
@irislq Refer to this discussion here