Open GoogleCodeExporter opened 9 years ago
> and perhaps if it should be part of a more general functionality for code
generation in multiple languages.
This part can and probably should be done in sympy, not sympycore (to make
Ondrej
happy ;-)
Original comment by fredrik....@gmail.com
on 3 Dec 2007 at 6:59
> A final detail. I think approximate numbers should be contagious like in
Agree.
> already have that in sympy (lambdify) -- what we should look at in
> sympycore is how to integrate it better, and perhaps if it should be part
> of a more general functionality for code generation in multiple languages.
Agree. The code generation should probably go to a module. Pearu, is code
generation
something you would like to have in sympycore? I think it belongs to IO.
> be wrong in extremely badly conditioned cases. There should be a second,
> independent function for generating a rigorous interval or complex interval
> for a given expression.
Does Mathematica have something like that? I think it'd be cool to have
something
like that. But it belongs to mpmath, right? Then we'll just call it from
sympy/sympycore.
Original comment by ondrej.c...@gmail.com
on 8 Dec 2007 at 8:46
Code generation has not high priority at the moment but
this is certainly something that I would need in projects
that will use python based CA, e.g. in g3f2py.
Original comment by pearu.peterson
on 8 Dec 2007 at 9:19
> Does Mathematica have something like that? I think it'd be cool to have
something
> like that. But it belongs to mpmath, right? Then we'll just call it from
> sympy/sympycore.
Mathematica supports interval arithmetic, but it only works for simple
functions (as
of version 5, at least).
Interval arithmetic can be implemented easily in mpmath; it's usually just a
matter
of evaluating the function at both endpoints, both rounded down and up (some
more
care is needed for non-monotone functions). See
http://code.google.com/p/mpmath/wiki/IntervalArithmetic for a usage demo (the
code
used to generate the examples is not in SVN yet... still working on that).
Complex intervals are more difficult, and to the extent they can be supported,
they
probably require a combination of symbolic and numerical evaluation.
Original comment by fredrik....@gmail.com
on 8 Dec 2007 at 9:39
Original issue reported on code.google.com by
fredrik....@gmail.com
on 3 Dec 2007 at 6:19