@isuruf I’m getting an error with apple clang.

https://travis-ci.org/symengine/symengine/jobs/119447218

https://travis-ci.org/symengine/symengine/jobs/119447218

No error on Linux

So we can’t declare an empty polynomial?

No, you just can't declare it that way

You have to call the constructor of std::map

Right…Thanks!

@isuruf Any specific reason for not using

`from_dict()`

here?
@irislq ^

@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
Actually I want to detect an error by

`is_cannonical()`

@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()`

?
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`

)
That's true. I think it's better if we change it to use

`from_dict()`

since it checks for 0 coefficient terms
@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?
I think it was just an oversight

Right I’ll send in a PR changing it.

@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()`

Alright, if you can submit the PR and have it merged soon that'll be great!

Yeah I’ll submit is ASAP

@isuruf Why do we have

`unsigned int degree_;`

for `UnivariatePolynomial`

when we are allowing negative exponent terms. This should be changed.
@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.

@irislq Refer to this discussion here