#9880: Segfault in PyNaC 0.2.0.p4
-------------------------+--------------------------------------------------
Reporter: jpflori | Owner: burcin
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.7
Component: symbolics | Keywords: pynac
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-------------------------+--------------------------------------------------
Comment(by vbraun):
With the attached script I find some examples in `cmp_add` where
`a<b<c<a`. This violates SWO:
{{{
sage: attach strict_weak_order.py
sage: test_symbolic_expression_order(10000)
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
/home/vbraun/Sage/Order/<ipython console> in <module>()
/home/vbraun/Sage/Order/strict_weak_order.py in
test_symbolic_expression_order(repetitions)
113 c = make_random_expr()
114 assert_strict_weak_order(a, b, c, lambda x,y: x._cmp_(y))
--> 115 assert_strict_weak_order(a, b, c, lambda x,y:
x._cmp_add(y))
116 assert_strict_weak_order(a, b, c, lambda x,y:
x._cmp_mul(y))
117
/home/vbraun/Sage/Order/strict_weak_order.py in
assert_strict_weak_order(a, b, c, cmp_func)
63
64 for i,j,k in Permutations([0,1,2]): # transitivity
---> 65 if cmp[i,j] and cmp[j,k] and not cmp[i,k]: raise
ValueError, msg
66
67 def incomparable(i,j):
ValueError: The binary relation failed to be a strict weak order on the
elements
a = 2*v10*(v5 - 2)*v7 + (-(v8 + e)*(-v8 + pi) + v6)*(v9*e - 2) - v2 - v3
- v5 - v9
b = -(v3*v8 - 51*v2 - 105)*(v2 + 5)*(v3 - 1) + 3*v6*v9
c = -v1*v6*brun + v6*v9*pi + 3*(7*(v5 + 1)*v7 - 3)*(-(v3 - 1)*e + v4) -
(v5 - 4)*(v9 + 8) - v3 - 3
[0 0 1]
[1 0 0]
[0 1 0]
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9880#comment:31>
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.