#6391: libGAP! -- create a Cython library interface to gap
---------------------------+------------------------------------------------
Reporter: was | Owner: was
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.7
Component: interfaces | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
Comment(by dimpase):
Replying to [comment:28 vbraun]:
> I think the big issues right now are
> * being able to get out of the break/debug loop after a gap error
> * use libtool to build the library
> If upstream manages to rid themselves of their memory manager and
arbitrary precision arithmetic then thats awesome!
>
Hi Volker,
please see my current (Sage-4.6.1) snapshot, catching zero division etc.
http://sage.math.washington.edu/home/dima/packages/gap-4.4.12.p6.spkg
It gets rid of the zero division problem. I.e. I can divide by 0 in GAP
and still retain Sage/GAP session.
Here is an example (sorry for extra print statements producing noise
below)
{{{
sage: import sage.libs.gap.gap as g
######### ###### ########### ###
############# ###### ############ ####
############## ######## ############# #####
############### ######## ##### ###### #####
###### # ######### ##### ##### ######
###### ########## ##### ##### #######
##### ##### #### ##### ###### ########
#### ##### ##### ############# ### ####
##### ####### #### #### ########### #### ####
##### ####### ##### ##### ###### #### ####
##### ####### ##### ##### ##### #############
##### ##### ################ ##### #############
###### ##### ################ ##### #############
################ ################## ##### ####
############### ##### ##### ##### ####
############# ##### ##### ##### ####
######### ##### ##### ##### ####
Information at: http://www.gap-system.org
Try '?help' for help. See also '?copyright' and '?authors'
Loading the library. Please be patient, this may take a while.
GAP4, Version: 4.4.12 of 17-Dec-2008, i686-apple-darwin10.6.0-gcc
sage: a = g.libgap('0')
> status in GapElement()= 0
sage: b = g.libgap('10')
> status in GapElement()= 0
sage: a
calling READ_ERR at ViewObjVar0
output_buffer=0
0
sage: b
calling READ_ERR at ViewObjVar10
output_buffer=10
10
sage: a*b
calling READ_ERR at ViewObjVar0
output_buffer=0
0
sage: b/a
Rational operations: <divisor> must not be zero
not in any function
Entering break read-eval-print loop ...
you can 'quit;' to quit to outer loop, or
you can replace <divisor> via 'return <divisor>;' to continue
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call
last)
/usr/local/src/sage/sage-4.6.1.rc0/spkg/standard/<ipython console> in
<module>()
/usr/local/src/sage/current/local/lib/python2.6/site-
packages/sage/structure/element.so in
sage.structure.element.RingElement.__div__
(sage/structure/element.c:11931)()
RuntimeError: ReadEvalDebug called!
sage: a*b
calling READ_ERR at ViewObjVar0
output_buffer=0
0
sage: b+b
calling READ_ERR at ViewObjVar20
output_buffer=20
20
sage:
}}}
Dima
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6391#comment:29>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.