Opened 8 years ago

Closed 6 years ago

#15226 closed enhancement (invalid)

cython interface for libgiac: giacpy

Reported by: frederichan Owned by:
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: interfaces Keywords: giac, cython, interface
Cc: jondo Merged in:
Authors: Reviewers: Frederic Han
Report Upstream: Reported upstream. No feedback yet. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

I have done a sage version of giacpy (a cython interface for the giac library)

. The speed seems similar to giac's one, and I have experienced better interruptions than with the expect interface.

. The giac spkg is recommended: http://www.math.jussieu.fr/~han/xcas/sage/giac-1.1.0.spkg (cf Trac 12375)

. I have also experienced good timings with multivariate polynomials gcd, factorisation, and also with the new implementation in giac of grobner basis (revlex).

. Some examples and sage worksheets are available here: http://www.math.jussieu.fr/~han/xcas/giacpy/

Attachments (1)

libgiac.patch (182.2 KB) - added by frederichan 8 years ago.

Download all attachments as: .zip

Change History (12)

Changed 8 years ago by frederichan

comment:1 Changed 8 years ago by frederichan

  • Report Upstream changed from Not yet reported upstream; Will do shortly. to Reported upstream. No feedback yet.

comment:2 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:3 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:4 follow-up: Changed 7 years ago by jondo

  • Cc jondo added

I would be interested in a giac interface, because Maxima lacks solving inequalities.

comment:5 in reply to: ↑ 4 Changed 7 years ago by frederichan

Replying to jondo:

I would be interested in a giac interface, because Maxima lacks solving inequalities.

For small computations like this the text interface already in sage should be enough. The cython interface is much faster and have better interuptions but it is a more dangerous patch.

If you just want to test without patching sage, I have made a standalone version (cf the instructions at the end of this page)

http://www.math.jussieu.fr/~han/xcas/giacpy/

comment:6 Changed 7 years ago by frederichan

Hi all, I am starting the comments, there something curious I remember, one coercion is much slowler than the other one (it is not the case in pure python).

from sage.libs.giac import *
a=libgiac(2)
sage: time l=[ a+1 for i in range(10**5)]
CPU times: user 0.20 s, sys: 0.00 s, total: 0.20 s
Wall time: 0.19 s
sage: time l=[ 1+a for i in range(10**5)]
CPU times: user 1.04 s, sys: 0.00 s, total: 1.04 s
Wall time: 1.03 s

any idea?

comment:7 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:8 Changed 6 years ago by frederichan

  • Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix

The cython interface has been put in an the optional spkg: giacpy in trac #12375, so this old patch is now duplicate/obsolete

comment:9 Changed 6 years ago by jdemeyer

  • Authors Frederic Han deleted
  • Reviewers set to Frederic Han
  • Status changed from new to needs_review

comment:10 Changed 6 years ago by jdemeyer

  • Status changed from needs_review to positive_review

comment:11 Changed 6 years ago by vbraun

  • Resolution set to invalid
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.