#17243: connect bubble sort graph and permutahedron
-------------------------------------+-------------------------------------
Reporter: kcrisman | Owner:
Type: enhancement | Status: needs_work
Priority: minor | Milestone: sage-6.7
Component: documentation | Resolution:
Keywords: beginner, graph, | Merged in:
permutahedron, sd67 | Reviewers: Karl-Dieter Crisman,
Authors: Grégory Châtel | Vincent Delecroix
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/g.chatel/connect_bubble_sort_graph_and_permutahedron|
5b90c9b326967fc8f436771de5ec6f489f8ab8de
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by vbraun):
* status: positive_review => needs_work
Comment:
{{{
sage -t --long src/sage/sets/set_from_iterator.py
**********************************************************************
File "src/sage/sets/set_from_iterator.py", line 443, in
sage.sets.set_from_iterator.Decorator._sage_doc_
Failed example:
print sage_getdoc(d) # indirect doctest
Expected:
Test whether "self" is prime.
...
IMPLEMENTATION: Calls the PARI "isprime" function.
<BLANKLINE>
Got:
Test whether "self" is prime.
<BLANKLINE>
INPUT:
<BLANKLINE>
* "proof" -- Boolean or "None" (default). If False, use a strong
pseudo-primality test (see "is_pseudoprime()"). If True, use a
provable primality test. If unset, use the "default arithmetic
proof flag".
<BLANKLINE>
Note: Integer primes are by definition *positive*! This is
different than Magma, but the same as in PARI. See also the
"is_irreducible()" method.
<BLANKLINE>
EXAMPLES:
<BLANKLINE>
sage: z = 2^31 - 1
sage: z.is_prime()
True
sage: z = 2^31
sage: z.is_prime()
False
sage: z = 7
sage: z.is_prime()
True
sage: z = -7
sage: z.is_prime()
False
sage: z.is_irreducible()
True
<BLANKLINE>
sage: z = 10^80 + 129
sage: z.is_prime(proof=False)
True
sage: z.is_prime(proof=True)
True
<BLANKLINE>
When starting Sage the arithmetic proof flag is True. We can change
it to False as follows:
<BLANKLINE>
sage: proof.arithmetic()
True
sage: n = 10^100 + 267
sage: timeit("n.is_prime()") # not tested
5 loops, best of 3: 163 ms per loop
sage: proof.arithmetic(False)
sage: proof.arithmetic()
False
sage: timeit("n.is_prime()") # not tested
1000 loops, best of 3: 573 us per loop
<BLANKLINE>
ALGORITHM:
<BLANKLINE>
Calls the PARI "isprime" function.
<BLANKLINE>
**********************************************************************
1 item had failures:
1 of 6 in sage.sets.set_from_iterator.Decorator._sage_doc_
[213 tests, 1 failure, 4.14 s]
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/17243#comment:26>
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.
For more options, visit https://groups.google.com/d/optout.