These are chat archives for symengine/symengine

19th
Jun 2016
Isuru Fernando
@isuruf
Jun 19 2016 03:43
@rwst, I tried using FLINT with MSVC. One problem is that MSVC dies with error fatal error C1060: compiler is out of heap space whenever the flint C++ files are included. More specifically flint/flintxx/flint_exception.h
Ralf Stephan
@rwst
Jun 19 2016 06:03
@isuruf I don't use Windoze but googling suggests playing with the /Zm option, e.g. http://stackoverflow.com/questions/4609729/msvc-gives-up-on-template-heavy-code-with-fatal-error-c1060-compiler-is-out-of
Isuru Fernando
@isuruf
Jun 19 2016 06:04
Yes, tried that with /Zm2000. No luck
It seems Flint doesn't support C++ layer on Windows
C++ tests are not run on Windows
Ralf Stephan
@rwst
Jun 19 2016 06:13
So rewrite using Flint C-layer?
Isuru Fernando
@isuruf
Jun 19 2016 06:13
Yes, it should be easy enough
Ralf Stephan
@rwst
Jun 19 2016 06:18
I can start this afternoon. You need it soon?
Isuru Fernando
@isuruf
Jun 19 2016 06:19
Not really. I want to do it by the time there is a new flint release
with LGPL license
If you are interested, there are conda packages for symengine. I will include flint there once there is a LGPL release
Ralf Stephan
@rwst
Jun 19 2016 06:23
I'm on it today anyway. Also I need to read about conda, it seems.
Isuru Fernando
@isuruf
Jun 19 2016 06:23
@rwst, in multivariable series, what should be the output of 1/(x+y) with prec=2
Ralf Stephan
@rwst
Jun 19 2016 06:23
with respect to what variable?
Isuru Fernando
@isuruf
Jun 19 2016 06:24
(x, y) = (0,0)
Ralf Stephan
@rwst
Jun 19 2016 06:25
Try pari:
? Ser(1/(x+y))
%2 = 1/y - 1/y^2*x + 1/y^3*x^2 - 1/y^4*x^3 + 1/y^5*x^4 - 1/y^6*x^5 + 1/y^7*x^6 - 1/y^8*x^7 + 1/y^9*x^8 - 1/y^10*x^9 + 1/y^11*x^10 - 1/y^12*x^11 + 1/y^13*x^12 - 1/y^14*x^13 + 1/y^15*x^14 - 1/y^16*x^15 + O(x^16)
Isuru Fernando
@isuruf
Jun 19 2016 06:26
This is wrt to x right?
Ralf Stephan
@rwst
Jun 19 2016 06:27
yes
sage: (1/(x+y)).series(x,2)
(1/y) + (-1/y^2)*x + Order(x^2)
sage: (1/(x+y)).series(y,2)
(1/x) + (-1/x^2)*y + Order(y^2)
Isuru Fernando
@isuruf
Jun 19 2016 06:29
isn't there something for both variables. (x, y) = (0,0)?
Like the multi-variable taylor series?
Ralf Stephan
@rwst
Jun 19 2016 06:30
sage: (1/(x+y)).series(x,2).series(y,2)
(-x)*y^(-2) + 1*y^(-1) + Order(1)
which is unfortunately different if you switch x,y
can you really do x and y simultaneously? You can do x+y or x*y but...
Isuru Fernando
@isuruf
Jun 19 2016 06:36
https://en.wikipedia.org/wiki/Taylor%27s_theorem
See taylor's theorem for multivariate functions
I guess, it's not that useful to have a multi-variable series right?
Ralf Stephan
@rwst
Jun 19 2016 06:51
Well, define multi-var series. It seems so if you mean higher dimensional (and that's way over my head). Taking a one-dimensional series of a multi-var function is useful, e.g. to compute generating functions of polynomials.
Isuru Fernando
@isuruf
Jun 19 2016 06:53

one-dimensional series of a multi-var function is useful

This is already supported in symengine. You can just use Expression as coefficients

Ralf Stephan
@rwst
Jun 19 2016 06:53
Then there seems no further need, yes.
Isuru Fernando
@isuruf
Jun 19 2016 06:55
I'll have to go through the code to see if there are any issues though
Pari seems to order the variables and then do the series with one variable and then do the series with the second variable for each coefficient
Ralf Stephan
@rwst
Jun 19 2016 07:03
it's practically seing the multivar function as a univar polynomial in the main variable, with the rest taken as a constant.
Ralf Stephan
@rwst
Jun 19 2016 13:09
@isuruf ATM, WITH_FLINT can be set independently from INTEGER_CLASS, e.g. to enable series_flint.cpp code. However, I might have a use for the fmpq_wrapper class there---but it will only be included with INTEGER_CLASS set to flint. So, will there be always those two cmake options, will this be maybe only one Flint option? If two options, I might factor out the fmpq_wrapper class of mp_wrapper.h into its own header to use it with series_flint.*. Agree?
Srajan Garg
@srajangarg
Jun 19 2016 13:55

I might have a use for the fmpq_wrapper class there

what do you mean?
Also, a user might want to use a different integer class (eg. piranha::integer), while using say flint polynomials. So, two options must exist

Ralf Stephan
@rwst
Jun 19 2016 14:04
I mean to use fmpq_wrapper as type for the series template instead of fmpqxx. See the talk above about MSVC bugs.
Isuru Fernando
@isuruf
Jun 19 2016 14:06
We can move fmpq_wrapper and fmpz_wrapper to a new header
Ralf Stephan
@rwst
Jun 19 2016 14:23
already done
and add fmpq_poly_wrapper for series_flint.* and fmpz_poly_wrapper for polys/uintpoly* later
Isuru Fernando
@isuruf
Jun 19 2016 14:27
Thanks for doing this.
I forgot that there is a new Update 3 RC1 for MSVC, I'll try that as well, but I doubt this has been fixed there
Ralf Stephan
@rwst
Jun 19 2016 14:28
Not finished yet, thank later :smile: