These are chat archives for symengine/symengine

9th
Mar 2016
Isuru Fernando
@isuruf
Mar 09 2016 03:08
@abhinavagarwal07, use a visitor whenever you have to go through the expression tree
Isuru Fernando
@isuruf
Mar 09 2016 04:03
@chenchfort, I looked at the ostringstream error. It is very strange because I don't that error in clang, just in gcc.
Isuru Fernando
@isuruf
Mar 09 2016 04:18
@certik, why are the ostream<< functions are defined outside of the SymEngine namespace?
Isuru Fernando
@isuruf
Mar 09 2016 04:28
@chenchfort, I fixed the error.
Can you clean up the history a bit? I will send a PR then
Charles Chen
@chenchfort
Mar 09 2016 04:33
So, erasing commits? Up to which point?
Isuru Fernando
@isuruf
Mar 09 2016 04:34
All commits after the 6th one was experiments right?
Charles Chen
@chenchfort
Mar 09 2016 04:36
So is it git reset or rebase
Isuru Fernando
@isuruf
Mar 09 2016 04:42
git reset is fine
Charles Chen
@chenchfort
Mar 09 2016 04:42
git reset 99a7a7d ?
Isuru Fernando
@isuruf
Mar 09 2016 04:43
git reset --hard cf3b33a36afeabea50dcc06a8af01b89604ee01e
Charles Chen
@chenchfort
Mar 09 2016 04:44
I think it would be 99a7a7d, the commit that completes get_args
Isuru Fernando
@isuruf
Mar 09 2016 04:46
Ah yes, so we need to keep 99a7a7d, 840234e, and commits before cf3b33a
Charles Chen
@chenchfort
Mar 09 2016 04:47
So rebase?
Isuru Fernando
@isuruf
Mar 09 2016 04:47
yeah
Charles Chen
@chenchfort
Mar 09 2016 04:47
git rebase -i cf3b33a36afeabea50dcc06a8af01b89604ee01e, correct? And drop the ones we don’t need
Isuru Fernando
@isuruf
Mar 09 2016 04:47
yeah
Charles Chen
@chenchfort
Mar 09 2016 04:49
It says error: could not apply
—continue?
Isuru Fernando
@isuruf
Mar 09 2016 04:50
There may be merge conflicts. You need to fix them and then continue
Charles Chen
@chenchfort
Mar 09 2016 04:51
It doesn’t say there’s conflict
Or, it doesn’t say which files
Isuru Fernando
@isuruf
Mar 09 2016 04:52
git status
Charles Chen
@chenchfort
Mar 09 2016 05:07
Ok. Can you send that PR?
Also stop any of my TravisCI and Appveyor builds
Isuru Fernando
@isuruf
Mar 09 2016 05:14
sent
Charles Chen
@chenchfort
Mar 09 2016 05:18
Ok. Assume this is going to take care of TravisCI, the concern now would be the Appveyor errors that we’ve been having. https://ci.appveyor.com/project/certik/symengine/build/1109/job/c632907yysgjh9n2#L1161
Isuru Fernando
@isuruf
Mar 09 2016 05:19
That would also be fixed
@chenchfort, you can enable Travis and appveyor for your repos to test as well
Charles Chen
@chenchfort
Mar 09 2016 05:36
Ready
How?
nvm I’ll google.
Isuru Fernando
@isuruf
Mar 09 2016 05:37
You can enable travis from here, https://travis-ci.org/profile/
Charles Chen
@chenchfort
Mar 09 2016 06:03
Alright done
Isuru Fernando
@isuruf
Mar 09 2016 06:08
@chenchfort, there's one more thing. For series, you need two methods,
mul_poly_prec(UnivariatePolynomial &a, UnivaraitePolynomial &b, unsigned prec)
pow_poly_prec(UnivariatePolynomial &a, unsigned exp, unsigned prec)
Charles Chen
@chenchfort
Mar 09 2016 06:08
Not part of this PR right?
Isuru Fernando
@isuruf
Mar 09 2016 06:09
Yeah, we'll handle that in another PR
Charles Chen
@chenchfort
Mar 09 2016 06:10
Can you take a look at 13 and 14 on TravisCI? Something wrong with piranha. I can fix 6.
Charles Chen
@chenchfort
Mar 09 2016 06:57
@isuruf you there? Is that last suggestion necessary.
Nishant Nikhil
@nishnik
Mar 09 2016 11:23
@isuruf
Can we discuss here about intervals and what needs to be done in it now ?
Isuru Fernando
@isuruf
Mar 09 2016 11:59
@nishnik, sure
Nishant Nikhil
@nishnik
Mar 09 2016 11:59

So, can we use

template <typename A, typename B>
class Interval{
     A left;
     B right;
}

where A and B can be rational_class or mpfr_class.

This way, if we get a fixed precision type like integer or rational, we can store in rational_class, and for others we have mpfr_class
Isuru Fernando
@isuruf
Mar 09 2016 12:00
There is double as well. mpfr_class is optional
Nishant Nikhil
@nishnik
Mar 09 2016 12:01
Can't double be stored with mpfr_class ?
Isuru Fernando
@isuruf
Mar 09 2016 12:02
Yes, but for mpfr_class you need to install MPFR which is an optional dependency
Nishant Nikhil
@nishnik
Mar 09 2016 12:02
Okay!
Using double instead of mpfr_class?
Isuru Fernando
@isuruf
Mar 09 2016 12:04
double has only limited precision. mpfr_class is needed for multi-precision
So, both are needed
That will 8 types, which is too much
There is really no point keeping two types of endpoints.
One template with integer_class, rational_class, double and mpfr_class will do I guess.
Or else you can go with Number as the endpoint
Nishant Nikhil
@nishnik
Mar 09 2016 12:05
Then, I think using Number will be more consistent.
Francesco Biscani
@bluescarni
Mar 09 2016 12:41
I thought symengine already wrapped ARB for interval arithmetics? (well, not strictly interval, it's ball arithmetics, but it should cover mostly the same use cases)
Isuru Fernando
@isuruf
Mar 09 2016 13:36
@bluescarni, good point. We can use ARB
Francesco Biscani
@bluescarni
Mar 09 2016 13:50
I mean, there's probably value in having a generic wrapper for exact types - that should be relatively straightforward
but for floating-point types my understanding is that it's really tricky to get things right
Nishant Nikhil
@nishnik
Mar 09 2016 15:27
This message was deleted
Nishant Nikhil
@nishnik
Mar 09 2016 23:37
@isuruf
I have a problem here.
Suppose for interval [1,5], we have end-points as integers.
And for interval [10/3, 100/3], we have end-points as rationals.
Now when we take intersection, we have interval [10/3, 5], Now as we want the interval to have same type of end-points, How do I change an integer to rational and accordingly for different combination of classes ?