#14254: OverflowErrors in TripleDictEraser
----------------------------+-----------------------------------------------
Reporter: jdemeyer | Owner: robertwb
Type: defect | Status: new
Priority: blocker | Milestone: sage-5.8
Component: coercion | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
----------------------------+-----------------------------------------------
Comment (by jdemeyer):
Replying to [comment:10 SimonKing]:
> How many bytes is Py_ssize_t using? On 32-bit machines, is Py_ssize_t
perhaps using more bytes than size_t? Then, the problem could be here:
> {{{
> cdef Py_ssize_t h1 = <Py_ssize_t><void *>k1
> cdef Py_ssize_t h2 = <Py_ssize_t><void *>k2
> cdef Py_ssize_t h3 = <Py_ssize_t><void *>k3
> cdef Py_ssize_t h = (h1 + 13*h2 ^ 503*h3)
> }}}
> While h1, h2, and h3 should be fine (they are obtained from a pointer
and are thus using 32 bit), I could imagine that Python tries to be clever
and uses more byte (long versus int) for h
No, that cannot be the problem, arithmetic on pure C types (like here)
doesn't use Python at all.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14254#comment:11>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.