Hi,
In Perl, Debian is removing '.' from @INC :
https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html
This breaks the build for PARI on my machine. The workaround I used is just
to add '.' to PERL5LIB when building sage.
Should this be patched in Sage? patched upstream? left to
Those might be relevant:
http://trac.sagemath.org/sage_trac/ticket/4446
http://www.sagemath.org/packages/optional/mpc-0.8.3-dev-svn793.txt
Regards,
Yann
On Sep 1, 11:02 am, Jean-Pierre Flori wrote:
> Dear all,
>
> During the coding sprints taking place at ECC2011 summer school, one
> of our p
On Sep 5, 4:04 pm, William Stein wrote:
> On Sunday, September 5, 2010, David Kirkby wrote:
> > On 5 September 2010 11:01, YannLC wrote:
> >> Would it be a valuable project to write scripts e.g. sage-test-
> >> report / sage-ptest-report producing xml
It might be worse to allow some output to the minizinc format:
http://www.g12.cs.mu.oz.au/minizinc/
Many good solvers have flatzinc interfaces: Gecode, ECLiPSe, SCIP, etc
On Sep 25, 7:57 pm, Martin Albrecht
wrote:
> Just a quick note:
>
> I started writing a SCIP wrapper for Sage which is also a
On Sep 25, 6:54 am, Donald Alan Morrison
wrote:
> Sage 4.5.3, 32-bit, Ubuntu 10.04
>
> %time
> # n 0..35
> #http://www.research.att.com/~njas/sequences/table?a=111776&fmt=4
> OEIS_A111776 =
> [1,1,1,1,2,3,1,4,6,10,1,8,12,20,35,1,16,24,40,70,125,1,32,48,80,140,250,450,1,64,96,160,280,500,900,162
Would it be a valuable project to write scripts e.g. sage-test-
report / sage-ptest-report producing xml output compatible with the
CDash scheme http://public.kitware.com/Wiki/CDash:XML . I guess it
needs only some modifications of the sage-test / sage-ptest scripts.
Does anyone ever thought about
Oups, my mistake, I closed this ticket without the right to do it.
I think it's fixed now, can anyone with the right permission take a
look at it please.
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...
On Aug 12, 10:40 pm, "Dr. David Kirkby"
wrote:
> On 08/12/10 08:30 PM, John H Palmieri wrote:
>
> > How can I tell if numerical noise is actually noise, or if it is
> > indicative of a bug? For example, with one or two OS/processor
> > combinations, I get this (from chmm.pyx):
>
> > sage:
On Aug 12, 12:27 am, "Dr. David Kirkby"
wrote:
> I've just got a message from the Sage nagbot, which made me bring this up.
>
> Does anyone have any comments on #4446?
Just one comment. Is there any reason not to make it an optional
package at least?
> It's outside my maths knowledge, but I've t
IIRC Bareiss is not division-free, but fraction-free ie. only exact
divisions.
But feel free to correct me...
On Aug 4, 5:32 pm, Dima Pasechnik wrote:
> A standard thing to use for computing determinants division-free
> ishttp://en.wikipedia.org/wiki/Bareiss_algorithm
> (which is O(n^3) if you c
a_ wrote:
> Wow, thanks. I didn't see your post just as I sent my retraction.
> I'll definitely play with this some tonight. I'm going to calculate
> very far, then do an intersection with is_squarefree() just out of
> curiousity.
>
> On Aug 3, 5:26 pm, YannLC wrote:
oups, add the declaration of mw to:
cdef int i, wi, w, s, mw
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/s
Here is a cython version suitable only for ints.
from sage.rings.arith import divisors
from sage.rings.arith import is_prime
from sage.rings.integer cimport Integer
cpdef is_zk_cython(int n):
cdef list d
cdef int *m
cdef int i, wi, w, s
cdef Integer a = Integer(n)
if a.is_prim
Here is my version,
def is_zk(a):
if is_prime(a): return False
d = divisors(a)
s = sum(d)
if s & 1 or s < 2*a:
return False
target = s//2 - a
if target < 2 : return True
m = [0] + [1] * target
d = [i for i in d[1:] if i <= target]
for wi in d:
fo
You might try to look at __pow__ (2 underscores)
On Jul 5, 1:39 pm, Simon King wrote:
> On Jul 5, 12:01 pm, Simon King wrote:
>
> > ...
> > Shouldn't one at least avoid the overhead in calling a Python function
> > whose only purpose is to call a Cython function? By renaming
> > generic_power_c
This might be of interest:
from the people of MPFR,
"Mpfrcx is a library for the arithmetic of univariate polynomials over
arbitrary precision real (Mpfr) or complex (Mpc) numbers, without
control on the rounding. For the time being, only the few functions
needed to implement the floating point a
On Apr 27, 10:06 am, Johan Grönqvist
wrote:
>
> The concept of a norm, as I have always encountered it, is well defined,
> as in e.g. wikipedia[0] and other mathematics encyclopedias [1], [2], as
> well as (I belive) any book I have used. This refers to vector spaces,
> and I expect that most pe
Hi François,
I have no problem building Sage from scratch with NTL 5.5.2 and gf2x.
As I said, I have myself available spkgs (and patches) doing them job
(modifiy spkg-install, remove or modify the patches to NTL, update
spkg/standard/deps etc).
My problem is that the policy is to make new spkg opti
Hi,
I would like to work on two tickets: #5731 (Update NTL to 5.5.2
release) and #2114 (get gf2x into Sage!).
As already reported in the discussion for #2114, the easiest way to
add gf2x is just to install it first, and then add an option to the ./
configure script of NTL. If have some spkgs ava
I guess that's about it:
sage: data = [(0,0),(1,0),(2,13),(3,28),(4,48),(5,89),(6,107),(7,168),
(8,188),(9,209)]
sage: var('K,a,r,t,t0,v')
(K, a, r, t, t0, v)
sage: model(t) = K/(1 + a*exp(r * (t - t0)))^(1/v)
sage: find_fit(data, model)
[K == 84.99972210745, a == 126.84970317061706, r ==
-183
Hi,
new data:
sage: R. = QQ[]
sage: M = get_memory_usage()
sage: for n in range(5):
if get_memory_usage()>M:
Mnew = get_memory_usage()
print n
print Mnew-M; M=Mnew
R(1); # <- remark: I got rid of the addition
:
0
0.40234375
3323
0.12890625
5435
0.1289
You might try this to do your benchmark:
import numpy
matrix(numpy.random.normal(size=(1000,1000)))
(or another numpy.random depending on the distribution you want)
of course, I don't know if there is a ticket opened (no time to check
now) but if not you might open one.
--
To post to this grou
from Matlab help:
r = randn(m,n) returns an m-by-n matrix containing pseudorandom values
drawn from the standard normal distribution
a somewhat better test would be:
Matlab: rand(1000,'double')
vs
Sage: random_matrix(RDF,1000)
(note: for matlab values are in [0,1) but in [-1,1) with Sage)
Sag
> It can do sqrt(-734/3), but fails on
> sqrt(-244.7? + 0.?e-39*I)
> for some reason.
>
> Dmitrii
It's worse than failing, it also changes the value:
sage: x = polygen(QQbar)
sage: f = 3*x^4 - 4*x^3 - 1046148*x^2 - 335575956*x - 30288853512
sage: rts = f.roots(multiplicities=False)
On Jan 7, 10:19 am, Alex Ghitza wrote:
> This is maybe an obvious point, but I'll make it anyway:MPCis "brought
> to you by the makers of MPFR". They care a great deal about correctness,
> performance, and portability. Both packages are actively developed and
> extensively tested. I think that
Is this sandpile stuff going to be in Sage somehow? It might be worth
asking the author.
http://people.reed.edu/~davidp/sand/sage/sage.html
On Feb 5, 7:44 pm, David Joyner wrote:
> Interesting. Thanks for this link Harald.
>
> On Fri, Feb 5, 2010 at 12:44 PM, Harald Schilly
>
> wrote:
> > Life'
m.
>
> On Feb 2, 10:01 pm, YannLC wrote:
>
> > Maybe just using sets:
>
> > sage: G = GL(2,3)
> > sage: k. = CyclotomicField(8)
> > sage: expected = set([(3, 0, 3, 0, -1, 1, 1, -1), (1, 1, 1, 1, 1, 1,
> > 1, 1), (1, 1, 1, 1, 1, -1, -1, -1), (2, -1, 2, -1,
, -2, -1, 0, -zeta8^3 - zeta8, zeta8^3 + zeta8, 0),
(3, 0, 3, 0, -1, -1, -1, 1)])
sage: set([tuple(x.values()) for x in G.irreducible_characters()]) ==
expected
True
On Feb 2, 2:25 pm, Dima Pasechnik wrote:
> On Feb 2, 8:54 pm, YannLC wrote:
> Unfortunately for irreducible characters (see
Why don't you use something like this e.g.:
sage: A. = AbelianGroup(5,[4, 5, 5, 7, 8])
sage: b1 = a^3*b*c*d^2*e^5
sage: b2 = a^2*b*c^2*d^3*e^3
sage: b3 = a^7*b^3*c^5*d^4*e^4
sage: b4 = a^3*b^2*c^2*d^3*e^5
sage: b5 = a^2*b^4*c^2*d^4*e^5
sage: word_problem([b1,b2,b3,b4,b5],e) #random order
[[a^3*b*
On Jan 12, 3:44 pm, John Cremona wrote:
> No, the van Hoeij / Belabas algorithms are for univariate polynomials,
> over Q (and then over number fields). Pari does not have multivariate
> polynomial factorization
It might not be implemented in Pari, but the algorithm has been
further extended a
On Jan 12, 2:46 pm, javier wrote:
> There are indeed well known (sort of) fast algorithms for
> factorization of multivariable polynomials over finite
> fields:http://portal.acm.org/citation.cfm?id=808748http://www.jstor.org/stable/2008063?seq=1
>
> In the second paper there is a particular (pr
On 4 jan, 15:06, Jason Grout wrote:
> I'm curious where you see this eventually going?
>
> (1) MPComplexField replaces ComplexField
> (2) MPComplexField provides an alternative to ComplexField (this is
> what you're proposing right now, right?)
Yes, even if I would like (1) to happen in a far
Magma now uses MPC (
http://magma.maths.usyd.edu.au/magma/htmlhelp/rel/node36.htm
)
Shouldn't we at least make it available in Sage ?
(see ticket #4446)
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr..
> > That said, it is probably reasonable to make your package standard.
>
> Yes, surely. That's why I suggested bringing the discussion here for
> a vote. YannLC needs to make his case!
Here comes my arguments:
* it's useful for people working with small characteristi
Dear sage-devel,
I made a small spkg in ticket #7239 which just received a positive
review.
Some apllications in #7240 are following the same way.
The package contains the list of prime factors occuring in
numbers of the form p^k-1 with p<13 and small k which can be useful
e.g. for finite field s
according to
http://www.gnu.org/licenses/license-list.html
CPLv1.0 is GPL incompatible.
On Dec 16, 8:51 pm, Nathann Cohen wrote:
> Here is the license mentionned :http://www.graphviz.org/License.php
>
> Nathann
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscri
The update of Networkx to version 1.0rc1 change the behavior of copy
from a shallow copy to a deep copy.
It exposes the following, already present in sage 4.2.1:
sage: X = species.SingletonSpecies()
sage: B = species.CombinatorialSpecies()
sage: B.define(X+B*B)
sage: g = B.digraph()
sage: s=set(g
patch updated. It should apply fine to sage 4.3alpha1 now.
Yann
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sa
Just to be clear, my patch is based on 4.3alpha0 and won't apply
cleanly to 4.3alpha1, that's why it's still marked as needs work.
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel-unsubscr...@googlegroups.com
For m
I have a patch making sage work with Netwotkx 1.0rc1 based on sage
4.3.alpha0, but it will probably conflict with many other graph
related patches...
If anyone wants to improve it, please do!
It's ticket #7608 now.
On Dec 1, 1:48 pm, William Stein wrote:
> The biggest problem we have wrt Network
first, you might be interested by this:
L = zip(Vars,p.lm().exponents()[0].sparse_iter())
its faster but still not enough...
then you might look at http://trac.sagemath.org/sage_trac/ticket/7587,
apply it ( review it ;) )
and do
L = [(Vars[i],e) for i,e in enumerate(p.lm().exponents
(as_ETuples=
You can obtain "some" c_grah in Sage with
cG = G.copy(implementation="c_graph")
I don't know how far the development is though.
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel-unsubscr...@googlegroups.com
For mo
No answer to the main question, but just completing the timings:
sage: G=graphs.RandomGNP(300,.1)
sage: time d=[G.distance(i,j) for (i,j) in Subsets(G.vertices(),2)]
CPU times: user 3.67 s, sys: 0.00 s, total: 3.67 s
Wall time: 3.72 s
sage: time d=networkx.all_pairs_shortest_path(G)
CPU times: use
Just a toy implementation as a very thin layer over dict (at least it
should be fast)
no doc
-
first see it in action:
sage: x=Test()
sage: p=x.zero_element()
sage: time for i in range(1): p+=x[i]
CPU times: user 0
because you use dense representation.
Try P.=PolynomialRing(QQ,sparse=True)
By the way, do you need QQ? RR or ZZ would probably be faster.
On Nov 26, 3:06 pm, Nathann Cohen wrote:
> I could cache the results... But I still do not understand why just
> evaluating x^99 takes so much time !
Y
can you avoid sums for initialisation?
sage: P.=PolynomialRing(QQ)
sage: time p=P(dict([(i,1) for i in range()]))
CPU times: user 0.07 s, sys: 0.00 s, total: 0.07 s
Wall time: 0.07 s
On Nov 26, 2:43 pm, Nathann Cohen wrote:
> R = PolynomialRing(QQ, 'x')
> x = R.gen()
> sum([x^i for i in rang
If you only want linear terms, you can also use an univariate
polynomial ring
just treat x^i as x_i.
it's lightning fast and allow you to easily access coefficients.
On Nov 26, 2:10 pm, Nathann Cohen wrote:
> Hello !!!
>
> I am writing the patch to move from InfinitePolynomialRing to just "var
One might also want to look at these existing python bindings:
http://cgal-python.gforge.inria.fr
Yann
--~--~-~--~~~---~--~~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel-unsubscr..
Nice, but I think Givaro fields were not the only ones broken:
K = Loading Sage library. Current Mercurial branch is: minpoly
sage: K. = GF(17^5)
sage: K.list()
---
TypeError Traceback (most re
(warning, blatant patch marketing)
You think this is a shame:
---
Magma:
R:=PolynomialRing(GF(2));
P:=x^257+x^31+x^2+x+1;
time IsPrimitive(P);
true
Time: 0.010
---
Sage:
R.=GF(2)[]
Hi,
I made a small package and two patch related to factorization of
Cunningham numbers and application to primitivity testing. These are
trac #7239 and #7240.
It seems to me that the spkg is useful enough (and small enough) to
become standard. Thoughts?
--~--~-~--~~~--
Hi,
I would like to provide some basic code for factoring Cunningham
numbers (my goal is in fact polynomial primitivity testing over binary
fields)
The raw data I use can be found there: http://cage.ugent.be/~jdemeyer/cunningham
My two questions are:
* how should one do to add something in the
Hi all,
I noticed that iterating over a finite field gives a different order
depending on the implementation:
sage: list(sage.rings.finite_field_prime_modn.FiniteField_prime_modn
(7))
[0, 1, 2, 3, 4, 5, 6]
sage: list(sage.rings.finite_field.FiniteField_givaro(7))
[0, 3, 2, 6, 4, 5, 1]
sage: list
On Mar 9, 6:38 pm, Nick Alexander wrote:
> On 9-Mar-09, at 8:48 AM, Noel wrote:
>
>
>
> > Hello Y'all,
>
> > What's the best way of listing all polynomials of a given degree with
> > coefficients in a finite field?
>
> If you want a one liner, you could use
>
> sage: [ GF(3)['x'](list(t)) for t i
Hi,
I think /sage/group/generic.py docstrings have not been changed.
Cheers
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to
sage-devel-unsubscr...@googlegroups.com
For more option
As it's not used anywhere else (accorded to search_src), I think
_kernel_gens_using_pari should be renamed to _kernel_matrix_using_pari
and could be implemented as a (long) oneliner:
return self._pari_().mattranspose().matkerint().mattranspose().python
()
and the refactoring should make all thos
2009 at 2:35 PM, Robert Bradshaw
>
>
>
> wrote:
>
> > On Feb 26, 2009, at 2:28 PM, YannLC wrote:
>
> >> Forgive my stubborness, but you answered only half of my question :)
> >> do you think the following is a sane behavior?
>
> &
Forgive my stubborness, but you answered only half of my question :)
do you think the following is a sane behavior?
sage: var('f x')
(f, x)
sage: f(x+3)
x+3
I would prefer a NotImplementedError...
Yann
On Feb 26, 11:14 pm, Robert Bradshaw
wrote:
> On Feb 26, 2009, at 1:
On Feb 26, 9:40 pm, Robert Bradshaw
wrote:
> On Feb 26, 2009, at 12:22 PM, YannLC wrote:
>
> > Hi,
> > am I doing something wrong here?
> > If not, this is a bug...
>
> > sage: f=function('f',x)
> > sage: f
> > f(x)
> > sage: g(f,x)
Hi,
am I doing something wrong here?
If not, this is a bug...
sage: f=function('f',x)
sage: f
f(x)
sage: g(f,x)=f(x+1)
sage: g
(f, x) |--> x + 1
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group,
If I try your example at home with sage-3.3, I obtain:
sage: time dizSub=G_igr_d.subs(paramsd)
CPU times: user 0.03 s, sys: 0.00 s, total: 0.03 s
Wall time: 0.03 s
sage: dizsub
(0.00497512437811*s*(s + 1058537.10173)/(s*((s + 22.4212271973)*(s +
1058537.10173) + 127669181.574) - (606.060606061 -
I have now a last patch providing Pollard lambda algorithm, should I
open a new ticket (needing #5098 to be applied first) or add it into
#5098 as it's almost the same topic?
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To u
in #5088, John Cremona wrote:
The next improvement we need is to replace the BSGS by something which
takes less memory
I thus made a first attempt to implement Pollard rho algorithm.
it's now trac #5098, with a proposed patch
--~--~-~--~~~---~--~~
To post to this
timings added
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-deve
I wrote a trac ticket #5088 , and there is a patch waiting for review
(based on 3.2.3). We can now compute discrete logs in GF(2**63)
lightning fast.
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this grou
To make it clearer, use Pohlig-Hellman algorithm
http://en.wikipedia.org/wiki/Pohlig-Hellman_algorithm
On Jan 24, 11:05 am, William Stein wrote:
> On Sat, Jan 24, 2009 at 1:59 AM, YannLC wrote:
>
> > I think we should use chinese remainder to work in smaller groups.
>
>
I think we should use chinese remainder to work in smaller groups.
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to
sage-devel-unsubscr...@googlegroups.com
For more options, visit t
On Jan 21, 4:49 pm, Burcin Erocal wrote:
> Here are my answers:
>
> > P[-1] = 0
>
> 0
>
> > P[-1:] = 1+x^2+x^3+x^4+x^5
>
> [0, 1, 1, 1, 1, 1, 1]
>
> > P[:-1] = 0
>
> []
>
> Slices should return lists, and single indices should return a value in
> the coefficient ring.
+1, lists are even better
to be exhaustive, note that
P[-1:] = [ P[-1], P[0], P[1], P[2]... P[degree(P)] ]
is also an option, which correspond to the above results, but then I
think that P[:-1] should be 0
and what if P is a power series where x^(-1) can appear...
My choice would be to forget about the Python idiom "nega
On Jan 21, 3:49 pm, Craig Citro wrote:
> I agree, P[-1:] should be x^5.
then a trac ticket should be opened:
--
| Sage Version 3.2.3, Release Date: 2009-01-05 |
| Type notebook() for the GUI, and license()
Unfortunately, not before the end of february , but I would be very
happy if someone else do it ;)
William Stein wrote:
> On Wed, Jan 21, 2009 at 3:58 AM, YannLC wrote:
> >
> > Is someone working on using NTL to handle GF(p^e)[X] ?
>
> Nobody is working on that. It
On Jan 21, 2:24 pm, Craig Citro wrote:
> > More generally, if P is a polynomial (givaro, NTL, generic, pari or
> > other...) let's say P=1+x+x^2+x^3+x^4+x^5 what should be the result
> > of:
>
> > P[-1] ?
>
> 0
I agree, and it seems ok.
> > P[-1:] ?
>
> 1+x+x^2+x^3+x^4+x^5
>
> > P[:-1] ?
>
> 1
More generally, if P is a polynomial (givaro, NTL, generic, pari or
other...) let's say P=1+x+x^2+x^3+x^4+x^5 what should be the result
of:
P[-1] ?
P[-1:] ?
P[:-1] ?
(answer before testing please...)
--~--~-~--~~~---~--~~
To post to this group, send email to sage
It seems to me that slicing for polynomials should return a
polynomial. Before working on ticket
http://trac.sagemath.org/sage_trac/ticket/4941,
I'd like to have your opinion...
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
Is someone working on using NTL to handle GF(p^e)[X] ?
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at
.|
--
sage: f(x)=1
sage: f*e
[...]
RuntimeError: maximum recursion depth exceeded
On Jan 18, 4:01 pm, William Stein wrote:
> On Sun, Jan 18, 2009 at 5:00 AM, YannLC wrote:
>
> > another strange coercion error:
>
> Using variables with "ns=1
another strange coercion error:
sage: var('x',ns=1)
x
sage: f(x)=x
sage: f*e
[...]
RuntimeError: maximum recursion depth exceeded
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to
s
of course I made a mistake, the timing is better after...
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group
replacing multiplications by shift in quo_rem found
polynomial_element_generic.py gives great improvement on this tiny
example:
sage: R.=PolynomialRing(GF(4,'a'))
sage: P=R.random_element(20)
sage: Q=R.random_element(256)
sage: time Q % P
before:
CPU time: 0.08 s, Wall time: 0.08 s
after:
CPU
79 matches
Mail list logo