On Dec 23, 10:17 pm, Volker Braun <[email protected]> wrote:
> I'm getting the somewhat expected result:
>
> sage: i=sqrt(-1)
> sage: for k in range(100):
> ....:         print k; r1=random(); r2=random()
> ....:     try:
> ....:             xx=100*r1-i; yy=100*r2
> ....:         res=gamma(xx)*gamma(yy)/gamma(xx+yy)
> ....:     except:
> ....:             pass
> ....:
> 0
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
> 11
> 12
> 13
> 14
> 15
> 16
>   ***   overflow in t_REAL->double conversion.
> 17
> 18
> 19
> 20
> ... and so on...
>
> Try running your code in sage -gdb and then bt (backtrace) the stack.
>
> Since you apparently are running a binary distribution, I'd bet that there
> is a slight mismatch between the overflow signal handler on your
> distribution and on the distribution that it was compiled for. So when the
> overflow occurs it longjmp's into the abyss....

Hi Volker,

I followed your suggestions and this is the output:

#0  0x0012e416 in __kernel_vsyscall ()
#1  0x0030e941 in raise () from /lib/libc.so.6
#2  0x00311e42 in abort () from /lib/libc.so.6
#3  0x00346305 in ?? () from /lib/libc.so.6
#4  0x003c9970 in __fortify_fail () from /lib/libc.so.6
#5  0x003c98da in ?? () from /lib/libc.so.6
#6  0x003c9849 in __longjmp_chk () from /lib/libc.so.6
#7  0x00b49f0e in pari_err (numerr=15) at ../src/language/init.c:980
#8  0x008eef06 in rtodbl (x=0xb7d3d708)
   from /usr/local/Sage/sage-4.6-linux-32bit-ubuntu_10.04_lts-i686-
Linux/local/lib/libpari-gmp-2.4.so.3
#9  0x00eab396 in
__pyx_f_4sage_5rings_14complex_double_20ComplexDoubleElement__new_from_gen_c
(__pyx_v_self=0x843932c, __pyx_v_g=0xb7d3d738,
    __pyx_v_sp=3084113776) at sage/rings/complex_double.c:6488
#10 0x00ebf6a6 in
__pyx_pf_4sage_5rings_14complex_double_20ComplexDoubleElement_gamma
(__pyx_v_self=0x843932c, unused=0x0) at sage/rings/complex_double.c:
12513
#11 0x0019cc81 in PyCFunction_Call (func=0x824732c, arg=0xb7fa502c,
kw=0x0)
    at Objects/methodobject.c:90
#12 0x0015973c in PyObject_Call (func=0x824732c, arg=0xb7fa502c,
kw=0x0)
    at Objects/abstract.c:2492
#13 0x0392f1c3 in py_tgamma (__pyx_v_x=0x843932c)
    at sage/symbolic/pynac.cpp:9137
#14 0x03ad7169 in GiNaC::Number_T::tgamma (this=0xa6da6f4) at
numeric.cpp:1280
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x0030e941 in raise () from /lib/libc.so.6
#2  0x00311e42 in abort () from /lib/libc.so.6
#3  0x00346305 in ?? () from /lib/libc.so.6
#4  0x003c9970 in __fortify_fail () from /lib/libc.so.6
#5  0x003c98da in ?? () from /lib/libc.so.6
#6  0x003c9849 in __longjmp_chk () from /lib/libc.so.6
#7  0x00b49f0e in pari_err (numerr=15) at ../src/language/init.c:980
#8  0x008eef06 in rtodbl (x=0xb7d3d708)
   from /usr/local/Sage/sage-4.6-linux-32bit-ubuntu_10.04_lts-i686-
Linux/local/lib/libpari-gmp-2.4.so.3
#9  0x00eab396 in
__pyx_f_4sage_5rings_14complex_double_20ComplexDoubleElement__new_from_gen_c
(__pyx_v_self=0x843932c, __pyx_v_g=0xb7d3d738,
    __pyx_v_sp=3084113776) at sage/rings/complex_double.c:6488
#10 0x00ebf6a6 in
__pyx_pf_4sage_5rings_14complex_double_20ComplexDoubleElement_gamma
(__pyx_v_self=0x843932c, unused=0x0) at sage/rings/complex_double.c:
12513
#11 0x0019cc81 in PyCFunction_Call (func=0x824732c, arg=0xb7fa502c,
kw=0x0)
    at Objects/methodobject.c:90
#12 0x0015973c in PyObject_Call (func=0x824732c, arg=0xb7fa502c,
kw=0x0)
    at Objects/abstract.c:2492
#13 0x0392f1c3 in py_tgamma (__pyx_v_x=0x843932c)
    at sage/symbolic/pynac.cpp:9137
#14 0x03ad7169 in GiNaC::Number_T::tgamma (this=0xa6da6f4) at
numeric.cpp:1280
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x0030e941 in raise () from /lib/libc.so.6
#2  0x00311e42 in abort () from /lib/libc.so.6
#3  0x00346305 in ?? () from /lib/libc.so.6
#4  0x003c9970 in __fortify_fail () from /lib/libc.so.6
#5  0x003c98da in ?? () from /lib/libc.so.6
#6  0x003c9849 in __longjmp_chk () from /lib/libc.so.6
#7  0x00b49f0e in pari_err (numerr=15) at ../src/language/init.c:980
#8  0x008eef06 in rtodbl (x=0xb7d3d708)
   from /usr/local/Sage/sage-4.6-linux-32bit-ubuntu_10.04_lts-i686-
Linux/local/lib/libpari-gmp-2.4.so.3
#9  0x00eab396 in
__pyx_f_4sage_5rings_14complex_double_20ComplexDoubleElement__new_from_gen_c
(__pyx_v_self=0x843932c, __pyx_v_g=0xb7d3d738,
    __pyx_v_sp=3084113776) at sage/rings/complex_double.c:6488
#10 0x00ebf6a6 in
__pyx_pf_4sage_5rings_14complex_double_20ComplexDoubleElement_gamma
(__pyx_v_self=0x843932c, unused=0x0) at sage/rings/complex_double.c:
12513
#11 0x0019cc81 in PyCFunction_Call (func=0x824732c, arg=0xb7fa502c,
kw=0x0)
    at Objects/methodobject.c:90
#12 0x0015973c in PyObject_Call (func=0x824732c, arg=0xb7fa502c,
kw=0x0)
    at Objects/abstract.c:2492
#13 0x0392f1c3 in py_tgamma (__pyx_v_x=0x843932c)
    at sage/symbolic/pynac.cpp:9137
#14 0x03ad7169 in GiNaC::Number_T::tgamma (this=0xa6da6f4) at
numeric.cpp:1280
#15 0x03ad93a2 in GiNaC::tgamma (x=...) at numeric.cpp:2380
#16 0x03a71212 in GiNaC::tgamma_eval (x=...) at inifcns_gamma.cpp:186
#17 0x03a184e6 in GiNaC::function::eval (this=0xbfffdadc, level=1)
    at function.cpp:796
#18 0x03a016ba in GiNaC::ex::construct_from_basic (other=...) at
ex.cpp:312
#19 0x03d238ad in ex (__pyx_v_self=0xaa0ed8c, __pyx_args=0xb7fa502c,
    __pyx_kwds=0x0)
    at /home/wstein/build/sage-4.6/local//include/pynac/ex.h:266
#20 __pyx_pf_4sage_8symbolic_10expression_10Expression_gamma (
    __pyx_v_self=0xaa0ed8c, __pyx_args=0xb7fa502c, __pyx_kwds=0x0)
    at sage/symbolic/expression.cpp:22628
#21 0x0019cc48 in PyCFunction_Call (func=0xa97cdcc, arg=0xb7fa502c,
kw=0x0)
    at Objects/methodobject.c:85
#22 0x0015973c in PyObject_Call (func=0xa97cdcc, arg=0xb7fa502c,
kw=0x0)
    at Objects/abstract.c:2492
#23 0x03db43c8 in
__pyx_pf_4sage_8symbolic_8function_13GinacFunction___call__ (
    __pyx_v_self=0x9c053ac, __pyx_args=0x855cf0c,
__pyx_kwds=0xaa113e4)
    at sage/symbolic/function.cpp:6553
#24 0x001b4c6d in wrap_call (self=0x9c053ac, args=0x855cf0c,
    wrapped=0x3db3d00, kwds=0xaa113e4) at Objects/typeobject.c:4591
#25 0x001755b0 in wrapper_call (wp=0xa9e308c, args=0x855cf0c,
kwds=0x6)
    at Objects/descrobject.c:982
#26 0x0015973c in PyObject_Call (func=0xa9e308c, arg=0x855cf0c,
kw=0xaa113e4)

I am running Ubuntu 10.10 btw. Can we/you/I deduce something from the
above?

Many thanks, Kees

-- 
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-support
URL: http://www.sagemath.org

Reply via email to