[sage-devel] perl @INC

2016-09-19 Thread YannLC
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

[sage-devel] Re: Building interfaces for the libraries of multiprecision.org

2011-09-02 Thread YannLC
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

[sage-devel] Re: build and test reports server

2010-10-21 Thread YannLC
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

[sage-devel] Re: Google constraint programming solver

2010-09-25 Thread YannLC
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

[sage-devel] Re: bug? sage.combinat.sloane_functions.A111776

2010-09-25 Thread YannLC
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

[sage-devel] build and test reports server

2010-09-05 Thread YannLC
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

[sage-devel] ticket 8230 closed

2010-08-15 Thread YannLC
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...

[sage-devel] Re: numerical noise question

2010-08-12 Thread YannLC
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:

[sage-devel] Re: New module complex_mpc using lib mpc #4446

2010-08-12 Thread YannLC
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

[sage-devel] Re: Dodgson condensation

2010-08-04 Thread YannLC
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

[sage-devel] Re: Zumkeller Numbers

2010-08-03 Thread YannLC
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:

[sage-devel] Re: Zumkeller Numbers

2010-08-03 Thread YannLC
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

[sage-devel] Re: Zumkeller Numbers

2010-08-03 Thread YannLC
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

[sage-devel] Re: Zumkeller Numbers

2010-08-03 Thread YannLC
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

[sage-devel] Re: LibSingular exponentiation

2010-07-05 Thread YannLC
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

[sage-devel] Re: numerically stable fast univariate polynomial multiplication over RR[x]

2010-04-28 Thread YannLC
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

[sage-devel] Re: norm of a complex number

2010-04-27 Thread YannLC
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

[sage-devel] Re: NTL-5.5.2 and gf2x

2010-03-19 Thread YannLC
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

[sage-devel] NTL-5.5.2 and gf2x

2010-03-18 Thread YannLC
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

[sage-devel] Re: Logistic Curve Fitting in Sage

2010-03-12 Thread YannLC
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

[sage-devel] Re: Memory leak

2010-03-04 Thread YannLC
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

[sage-devel] Re: creating a random matrix is slow

2010-02-18 Thread YannLC
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

[sage-devel] Re: creating a random matrix is slow

2010-02-18 Thread YannLC
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

[sage-devel] Re: bug in sqrt() for QQbar elements

2010-02-08 Thread YannLC
> 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)

[sage-devel] Re: MPC: Complex arithmetic with correct rounding

2010-02-07 Thread YannLC
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

[sage-devel] Re: Life's a Beach: Google Summer of Code and the Abelian Sandpile Model

2010-02-05 Thread YannLC
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'

[sage-devel] Re: docstrings test failures for randomised computations

2010-02-02 Thread YannLC
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,

[sage-devel] Re: docstrings test failures for randomised computations

2010-02-02 Thread YannLC
, -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  

[sage-devel] Re: docstrings test failures for randomised computations

2010-02-02 Thread YannLC
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*

[sage-devel] Re: 2 variable polynomial factorization over finite fields

2010-01-12 Thread YannLC
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

[sage-devel] Re: 2 variable polynomial factorization over finite fields

2010-01-12 Thread YannLC
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

[sage-devel] Re: MPC: Complex arithmetic with correct rounding

2010-01-04 Thread YannLC
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

[sage-devel] MPC: Complex arithmetic with correct rounding

2010-01-04 Thread YannLC
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..

[sage-devel] Vote! factorization of some special numbers

2009-12-18 Thread YannLC
> > 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

[sage-devel] factorization of special numbers

2009-12-18 Thread YannLC
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

[sage-devel] Re: New license for Graphviz

2009-12-16 Thread YannLC
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

[sage-devel] deep copy vs. shallow copy

2009-12-06 Thread YannLC
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

[sage-devel] Re: Implementation of Graphs, c_graphs, and NetworkX

2009-12-05 Thread YannLC
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

[sage-devel] Re: Implementation of Graphs, c_graphs, and NetworkX

2009-12-05 Thread YannLC
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

[sage-devel] Re: Implementation of Graphs, c_graphs, and NetworkX

2009-12-05 Thread YannLC
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

[sage-devel] Re: coercion, categories, and slow code

2009-12-02 Thread YannLC
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=

[sage-devel] Re: Implementation of Graphs, c_graphs, and NetworkX

2009-11-27 Thread YannLC
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

[sage-devel] Re: Implementation of Graphs, c_graphs, and NetworkX

2009-11-27 Thread YannLC
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

[sage-devel] Re: InfinitePolynomialRing is -- very -- slow

2009-11-26 Thread YannLC
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

[sage-devel] Re: InfinitePolynomialRing is -- very -- slow

2009-11-26 Thread YannLC
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

[sage-devel] Re: InfinitePolynomialRing is -- very -- slow

2009-11-26 Thread YannLC
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

[sage-devel] Re: InfinitePolynomialRing is -- very -- slow

2009-11-26 Thread YannLC
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

[sage-devel] Re: Computational Geometry in SAGE ( CGAL )

2009-11-03 Thread YannLC
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..

[sage-devel] Re: Iterating over finite fields

2009-11-01 Thread YannLC
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

[sage-devel] sage vs magma

2009-10-25 Thread YannLC
(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)[]

[sage-devel] Cunningham numbers factorization

2009-10-18 Thread YannLC
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? --~--~-~--~~~--

[sage-devel] databases

2009-10-17 Thread YannLC
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

[sage-devel] extension field iterator

2009-09-02 Thread YannLC
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

[sage-devel] Re: Listing all polynomials of a given degree

2009-03-09 Thread YannLC
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

[sage-devel] missing sphinxification

2009-03-06 Thread YannLC
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

[sage-devel] Re: Matrix kernel with PARI algorithm - bug fix?

2009-03-01 Thread YannLC
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

[sage-devel] Re: symbolic functions

2009-02-26 Thread YannLC
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? > > &

[sage-devel] Re: symbolic functions

2009-02-26 Thread YannLC
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:

[sage-devel] Re: symbolic functions

2009-02-26 Thread YannLC
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)

[sage-devel] symbolic functions

2009-02-26 Thread YannLC
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,

[sage-devel] Re: reusing solutions in functions

2009-02-24 Thread YannLC
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 -

[sage-devel] Re: generic discrete logarithm

2009-01-27 Thread YannLC
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

[sage-devel] Re: generic discrete logarithm

2009-01-25 Thread YannLC
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

[sage-devel] Re: generic discrete logarithm

2009-01-24 Thread YannLC
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

[sage-devel] Re: generic discrete logarithm

2009-01-24 Thread YannLC
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

[sage-devel] Re: generic discrete logarithm

2009-01-24 Thread YannLC
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. > >

[sage-devel] generic discrete logarithm

2009-01-24 Thread YannLC
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

[sage-devel] Re: slicing in pari

2009-01-21 Thread YannLC
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

[sage-devel] Re: slicing in pari

2009-01-21 Thread YannLC
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

[sage-devel] Re: slicing in pari

2009-01-21 Thread YannLC
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()

[sage-devel] Re: univariate polynomial over finite extension field

2009-01-21 Thread YannLC
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

[sage-devel] Re: slicing in pari

2009-01-21 Thread YannLC
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

[sage-devel] Re: slicing in pari

2009-01-21 Thread YannLC
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

[sage-devel] slicing in pari

2009-01-21 Thread YannLC
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

[sage-devel] univariate polynomial over finite extension field

2009-01-21 Thread YannLC
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-devel] Re: FW: [Sage Bug Report] or not?

2009-01-18 Thread YannLC
.| -- 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

[sage-devel] Re: FW: [Sage Bug Report] or not?

2009-01-18 Thread YannLC
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

[sage-devel] Re: performace issue for generic polynomial rings

2008-12-24 Thread YannLC
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

[sage-devel] performace issue for generic polynomial rings

2008-12-24 Thread YannLC
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