Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 23 15:38
    lucassouzavieira starred symengine/symengine
  • Oct 22 16:30
    teddyampian starred symengine/symengine
  • Oct 21 22:34
    gvvynplaine starred symengine/symengine
  • Oct 19 14:37
    jmig5776 commented #1617
  • Oct 19 14:16
    certik commented #1617
  • Oct 19 13:07
    isuruf-bot commented #1617
  • Oct 19 13:06
    jmig5776 synchronize #1617
  • Oct 19 06:02
    tuankiet65 starred symengine/symengine
  • Oct 17 13:18
  • Oct 16 21:33

    bjodah on master

    Add const qualifier to call met… Merge pull request #1619 from b… (compare)

  • Oct 16 21:33
    bjodah closed #1619
  • Oct 16 16:15
    bjodah opened #1619
  • Oct 15 20:25
    bwasty starred symengine/symengine
  • Oct 11 23:06
    cairdac-rd starred symengine/symengine
  • Oct 08 08:06
    bjodah closed #1618
  • Oct 08 08:06
    bjodah commented #1618
  • Oct 08 03:58
    certik commented #1618
  • Oct 08 03:17
    isuruf commented #1618
  • Oct 07 15:01
    isuruf commented #1616
  • Oct 07 15:01

    isuruf on master

    add specialization for julia fix namespace Avoid duplicating code and 2 more (compare)

Marcello
@torshind_gitlab
Output:
x + y
x + y
x + 4.0*y
0.0 + x + 4.0*y + 4.0*z
x + 4*y + 4*z
0.0 + 4.0*y + 4.0*z
4*y + 4*z
Do you have any idea how to eliminate the spurious 0.0 when the coefficients are double?
Isuru Fernando
@isuruf
Its a tough one. We want expand(4.0*(x + y - (x+y))) to give 0.0 instead of 0 to make it clear that the expression is inexact (floating point vs integer)
You can eliminate 0.0 in the final expression by checking if the expression is an Add and if the coefficient is 0.0, remove it
But that doesn't fix 0.0 in intermediate expressions
On second thought, returning 0 for expand(4.0*(x + y - (x+y))) is totally fine
Isuru Fernando
@isuruf
Currently, in symengine 0 * 4.0 gives 0.0, but it should probably return 0. @certik, what do you think?
Isuru Fernando
@isuruf
Marcello
@torshind_gitlab
I deleted my previous message because I verified that the workaround that I've proposed doesn't work. Sorry for the confusion.
Isuru Fernando
@isuruf
@torshind_gitlab, you need to use integer(0) as the coefficient in the code you posted previously
Marcello
@torshind_gitlab
yep, if get_coef()->is_zero() is true, forcing an exact coefficient does the trick
thanks again @isuruf
Isuru Fernando
@isuruf
@richardotis, @bocklund, I've released 0.4.1 of symengine. With conda you can use python-symengine 0.4.0 and symengine 0.4.1
I could use some help in fixing the tests of symengine.py at symengine/symengine.py#289
Steven Lee
@stevenleeS0ht
Is there versioning compatibility requirement between symengine and python-symengine?
Isuru Fernando
@isuruf
@stevenleeS0ht, yes, we usually only support one version of symengine recorded at https://github.com/symengine/symengine.py/blob/master/symengine_version.txt
Carl Poppa
@tgn3000

@isuruf Hi Isuru, long time no see! Was wondering if the following behavior is expected. Thanks!! (master, ed7479baf59a36636061acc35b676bcf9073a932)

int main() {
  RCP<const Basic> a = symbol("a"), b = symbol("b"), c = symbol("c");
  map_basic_basic d {{mul(a,b), c}};
  RCP<const Basic> r1 = mul(SymEngine::integer(2), mul(a, b)),
  r2 = add(SymEngine::integer(1), r1);
  std::cout << *r1 << " -> " << *r1->subs(d) << std::endl;
  std::cout << *r2 << " -> " << *r2->subs(d) << std::endl;
  return 0;
}

produces

2*a*b -> 2*a*b
1 + 2*a*b -> 1 + 2*c
Isuru Fernando
@isuruf
@tgn3000, looks like an oversight
Note that, we have
2*a*b*c -> 2*a*b*c
1 + 2*a*b*c -> 1+2*a*b*c
Richard Otis
@richardotis
Hi @isuruf , do you have a sense what the blockers are for the next release of symengine.py? The new as_ctypes API enables some really nice solver accuracy improvements for us downstream, and also lets pycalphad resolve an install-time bug related to finding libsymengine.
Isuru Fernando
@isuruf
@richardotis, I'd like to get #1596, #1582, #1592 done

The new as_ctypes API enables some really nice solver accuracy improvements for us downstream

What's the difference between this and the cython one?

Richard Otis
@richardotis
Two things: it supports the lambda backend with nogil calling (current release doesn't), and it eliminates symengine as a build-time dependency
Richard Otis
@richardotis
@isuruf Thanks for your hard work getting the new release out there. Our downstream CI picked it up without skipping a beat.
Sylvain Corlay
@SylvainCorlay
:+1:
Jogi Miglani
@jmig5776
Can anybody please guide me on this symengine/symengine#1617?
Ondřej Čertík
@certik
@jmig5776 I just replied there.
Jogi Miglani
@jmig5776
Yaa I am on it.Thanks
Dario Izzo
@darioizzo
Is there a user documentation for symengine? I am struggling to find one ...
Isuru Fernando
@isuruf
@darioizzo, it's at https://symengine.github.io/classSymEngine_1_1Add.html , but it has close to zero documentation
Björn Dahlgren
@bjodah
@darioizzo even though it's not a 1:1 mapping, SymPy's documentation is a good place to look since many functions are essentially a reimplementation in C++. Also, I find the tests in SymEngine to be quite approachable for examples of usage.
Jogi Miglani
@jmig5776
Btw can anyone tell me that what's the plan for documentation for symengine, because I myself facing very much problems while implementing cancel for apart ....if there is predefined plan then I would like to help in that