Re: use pynac from cython(or python) without sage

22 views
Skip to first unread message

Burcin Erocal

unread,
Nov 3, 2012, 6:26:39 PM11/3/12
to pynac...@googlegroups.com
Hi,

On Thu, 1 Nov 2012 07:19:05 -0700 (PDT)
scripts <gabrielm...@gmail.com> wrote:

> i need to use symbolic math for a project, is it possible to "import"
> pynac in cython without sage ?
> I just need the ginac functionalities (symbols and math
> operations/functions on them).

No, Pynac uses Sage for the "numbers" and special functions. It is not
possible to use Pynac without Sage.

Titus' Google Summer of Code project, when merged, will bring Pynac
closer to being useful without Sage. But this still requires some work.

Cheers,
Burcin

scripts

unread,
Nov 5, 2012, 7:59:51 AM11/5/12
to pynac...@googlegroups.com
Do you have any suggestion to help me with my problem ? I have been using  sympy, but the problem is that my application receives a lot of requests per second
(is a web page where students can solve several mathematical problems that are generated in real time and correct by the system) and sympy is slow for this.
So i thought to write part of the system in cython, but the really slow part is where sympy comes in. 

Burcin Erocal

unread,
Nov 6, 2012, 2:41:12 AM11/6/12
to pynac...@googlegroups.com
On Mon, 5 Nov 2012 04:59:51 -0800 (PST)
scripts <gabrielm...@gmail.com> wrote:

> Do you have any suggestion to help me with my problem ? I have been
> using sympy, but the problem is that my application receives a lot of
> requests per second
> (is a web page where students can solve several mathematical problems
> that are generated in real time and correct by the system) and sympy
> is slow for this.
> So i thought to write part of the system in cython, but the really
> slow part is where sympy comes in.

What exactly does your application need? Do you use functions
like solve() or integrate() at all, or only basic manipulation of
expressions?

For anything other than simple expression representation and
arithmetic, Sage relies on Maxima. If you want to use these functions,
pynac would not help much anyway.


Are you running this on a shared host? What prevents you from setting
up Sage on the server?

Another option would be to set up Sage as a web service on a more
powerful machine using the single cell server [1] and make your web app
communicate with this. I don't know if the latency would be a problem
for your app though.

https://github.com/sagemath/sagecell


Cheers,
Burcin
Reply all
Reply to author
Forward
0 new messages