These are chat archives for symengine/symengine

21st
Apr 2016
Akash Trehan
@CodeMaxx
Apr 21 2016 09:49
@isuruf What do we want return for Inf + 2 + I ? Sum with Complex
Inf + I ?
Isuru Fernando
@isuruf
Apr 21 2016 10:25
Inf
Akash Trehan
@CodeMaxx
Apr 21 2016 12:48
Inf is explicitly Infinity with direction +1 . Giving the answer as Inf would go against the directional property. We should rather give an error ? or Inf + I like Sympy. Wolframalpha gives Inf though.
Isuru Fernando
@isuruf
Apr 21 2016 12:48
What do you mean by Inf would go against the directional property?
Akash Trehan
@CodeMaxx
Apr 21 2016 12:49
We can’t really add the imaginary and real part right, just because the real part is infinitely large
The angle from real axis would be approacing 0 though… hence the confusion.
Isuru Fernando
@isuruf
Apr 21 2016 12:51
Exactly. Since the angle approaches 0, the answer is Inf
Akash Trehan
@CodeMaxx
Apr 21 2016 12:57
Cool I’ll keep it as Inf then as long as the real part is finite :+1:
And what about oo/0? I’ve currently kept it as zoo
Isuru Fernando
@isuruf
Apr 21 2016 12:58
Okay
Akash Trehan
@CodeMaxx
Apr 21 2016 13:12
@isuruf This test fails in release modes but not in Debug modes. I can’t figure out why. Its just a CHECK_THROWS_AS test
Isuru Fernando
@isuruf
Apr 21 2016 13:13
Because is_canonical will throw an error only in debug mode
Akash Trehan
@CodeMaxx
Apr 21 2016 13:14
Oh.. cool! Thanks.
Isuru Fernando
@isuruf
Apr 21 2016 14:51
@bluescarni, is there a way to get the minimum key of a unordered_map other than to iterate all the keys manually
Francesco Biscani
@bluescarni
Apr 21 2016 19:30
@isuruf nope, unordered map is an unsorted data structure
you'll need a normal std::map for that, or something else
what do you need a sorted map for?