[sage-devel] Re: trying to define a function and find an approximation

2007-11-15 Thread Fredrik Johansson
On Nov 15, 2007 8:49 AM, William Stein <[EMAIL PROTECTED]> wrote: > Unfortunately, Sage does not have an implementation of computing > a numerical approximation of erf(a) when a is not real, as PARI only > provides this function in case a is real, and maxima also seems to > only provide it in that

[sage-devel] Re: canonicalize or evaluate

2008-04-14 Thread Fredrik Johansson
On Mon, Apr 14, 2008 at 10:06 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote: > Now the question is, how to call the method, that does just that. How about normalize() or standardize() ? (Wikipedia says: "Generally, in mathematics, a canonical form (often called normal form or standard form) of a

[sage-devel] Computing large Bernoulli numbers

2008-05-02 Thread Fredrik Johansson
Oleksandr Pavlyk reports on the Wolfram Blog that he has computed the 10 millionth Bernoulli number using Mathematica: http://blog.wolfram.com/2008/04/29/today-we-broke-the-bernoulli-record-from-the-analytical-engine-to-mathematica/ How does sage's Bernoulli number implementation compare? I'd lik

[sage-devel] Re: Comparing complex numbers

2008-08-23 Thread Fredrik Johansson
On Sat, Aug 23, 2008 at 9:57 PM, Nils Bruin <[EMAIL PROTECTED]> wrote: > > Would it break Python too much if comparison would simply throw an > exception in these cases? Hardly, considering that this is what Python itself does: >>> 1+1j > 1-1j Traceback (most recent call last): File "", line 1

[sage-devel] Re: symbol number radian degree

2007-05-22 Thread Fredrik Johansson
On 5/22/07, William Stein <[EMAIL PROTECTED]> wrote: > By the way, here is what Mathematica does: > > In[7]:= N[Sin[10 Degree]] > Out[7]= 0.173648 > > I am in favor of something more like that, though I *loathe* adding > anything further to the preparser. Maybe this is more pythonic: > >sage:

[sage-devel] Re: Python bindings for Ginac

2007-09-09 Thread Fredrik Johansson
On 9/9/07, Pablo De Napoli <[EMAIL PROTECTED]> wrote: > > Simpy is indeed an interesting package and could be useful in a future > for rewriting the > calculus package (replacing maxima) > > However. rather than incorporating it into Sage as a package, I feel > that we will need to take some of it

[sage-devel] Re: Why Mathematica is not my language of choice

2006-12-08 Thread Fredrik Johansson
dea. I'd like to help out with this, but I won't have time in the near future. Fortunately, it's not much work to implement from scratch if anyone else thinks it's a good idea. Fredrik Johansson --~--~-~--~~~---~--~~ To post to this group, send e

[sage-devel] Re: Sage 3.4.2.rc0 release!

2009-05-05 Thread Fredrik Johansson
On Sun, May 3, 2009 at 8:42 AM, Dr. David Kirkby wrote: > The link > http://listserv.nodak.edu/cgi-bin/wa.exe?A2=ind0010&L=nmbrthry&P=2988 > states the algorithm used, but in a way I don't understand. It says: > > "This value has been checked by computing pi(10^21+10^8) with > a different paramet

[sage-devel] Re: Sage 3.4.2.rc0 release!

2009-05-05 Thread Fredrik Johansson
On Tue, May 5, 2009 at 3:37 PM, William Stein wrote: > Fredrik, Just out of curiosity, is that the sort of algorithm you like > to implement? > > William Quite possibly, but I'm not familiar with any of these algorithms so I'd need some practice to implement anything even remotely optimized. Pe

[sage-devel] Re: Prime Pi

2009-05-07 Thread Fredrik Johansson
On Tue, May 5, 2009 at 6:36 PM, victor miller wrote: > Fredrik, I just saw on the SAGE days 15 project list you have the > Meissel-Lehmer-Lagarias-Miller-Odlyzko algorithm.  I still have my old C > code for this, if that would be a good start.  I never looked in detail at > the variants that were

[sage-devel] mpmath installation and location of extension code

2009-05-31 Thread Fredrik Johansson
Hi all, I could use some guidance for mpmath/Sage integration. To put mpmath in Sage, I presume it should just be installed into site-packages as a regular Python library, so I should create an spkg that does the usual python setup.py install. (Is there a policy of requiring the spkg to be a rele

[sage-devel] Re: elliptic_e(0.5, 0.1) test failure on Solaris SPARC (error about 0.04%)

2009-08-09 Thread Fredrik Johansson
On Sun, Aug 9, 2009 at 7:51 PM, William Stein wrote: > > Thanks.  I've cc'd Fredrik Johansson who can probably verify that the > Mathematica output is right.  This could be a new bug in Maxima, which > should be reported to them.   If it is, we might still have the opti

[sage-devel] Re: units

2009-08-12 Thread Fredrik Johansson
On Wed, Aug 12, 2009 at 8:44 AM, William Stein wrote: > > On Tue, Aug 11, 2009 at 11:30 PM, Jason > Grout wrote: >> >> William Stein wrote: >>> Hi, >>> >>> I just wanted to let people know that David Ackerman -- a UW student who >>> took my course on Sage last quarter -- is working (funded by NSF)

[sage-devel] Re: units

2009-08-12 Thread Fredrik Johansson
On Wed, Aug 12, 2009 at 9:19 AM, William Stein wrote: > > On Wed, Aug 12, 2009 at 12:11 AM, Fredrik > Johansson wrote: >> >> On Wed, Aug 12, 2009 at 8:44 AM, William Stein wrote: >>> >>> On Tue, Aug 11, 2009 at 11:30 PM, Jason >>> Grou

[sage-devel] ANN: mpmath 0.13 released

2009-08-13 Thread Fredrik Johansson
grant resources to support this project, and for providing much encouragement. The new version of mpmath will soon be available in Sage. Enjoy, Fredrik Johansson --~--~-~--~~~---~--~~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from

[sage-devel] Re: ANN: mpmath 0.13 released

2009-08-13 Thread Fredrik Johansson
On Thu, Aug 13, 2009 at 9:54 PM, Minh Nguyen wrote: > > Hi Fredrik, > > On Fri, Aug 14, 2009 at 5:48 AM, Fredrik > Johansson wrote: >> >> Hi all, >> >> Version 0.13 of mpmath is now available from the website: >> http://code.google.com/p/mpmath/ &

[sage-devel] Re: Fwd: [Maxima] mpmath + sage + hypergeometric numerics

2009-08-15 Thread Fredrik Johansson
On Sat, Aug 15, 2009 at 4:40 PM, Minh Nguyen wrote: > > Hi folks, > > I noticed the following thread from the Maxima mailing list. > > -- > Regards > Minh Van Nguyen > > > -- Forwarded message -- > From: Richard Fateman > Date: Sun, Aug 16, 2009 at 12:35 AM > Subject: Re: [Maxima]

[sage-devel] Re: Fwd: [Maxima] mpmath + sage + hypergeometric numerics

2009-08-17 Thread Fredrik Johansson
On Sat, Aug 15, 2009 at 9:57 PM, Fredrik Johansson wrote: > On Sat, Aug 15, 2009 at 4:40 PM, Minh Nguyen wrote: >> >> Hi folks, >> >> I noticed the following thread from the Maxima mailing list. >> >> -- >> Regards >> Minh Van Nguyen >&

[sage-devel] Re: Explicit variable of integration

2009-08-18 Thread Fredrik Johansson
On Tue, Aug 18, 2009 at 6:53 PM, Golam Mortuza Hossain wrote: > > Hi, > > I am preparing patches that will resolve > > http://trac.sagemath.org/sage_trac/ticket/6465 > > and will also move symbolic integration as a sub-class > of SFunction into new symbolics. > > > Currently, Sage allows omitting

[sage-devel] Re: Explicit variable of integration

2009-08-18 Thread Fredrik Johansson
On Wed, Aug 19, 2009 at 1:02 AM, Jason Grout wrote: > > Fredrik Johansson wrote: >> On Tue, Aug 18, 2009 at 6:53 PM, Golam Mortuza >> Hossain wrote: >>> Hi, >>> >>> I am preparing patches that will resolve >>> >>> http://trac.sagemat

[sage-devel] Re: Sage benchmark

2009-08-22 Thread Fredrik Johansson
On Sat, Aug 22, 2009 at 9:50 PM, William Stein wrote: > On my laptop (OS X 64-bit Sage-4.1.1 and Mathematica 7.0): > > Test 1 -- sage (=mpfr) wins > > SAGE: > sage: time a = N(pi, 500) > CPU times: user 10.31 s, sys: 0.94 s, total: 11.26 s > Wall time: 11.73 s > > MATHEMATICA: > In[1]:= Timing

[sage-devel] Re: Sage benchmark

2009-08-25 Thread Fredrik Johansson
On Sun, Aug 23, 2009 at 1:29 AM, Harald Schilly wrote: > > On Aug 23, 12:24 am, Simon King wrote: >> >> So, over QQ, MMA is slightly faster, but over finite fields Sage >> clearly wins? That is already something worth pointing out. >> > > I'm not a mma expert, but since they have no system in pla

[sage-devel] Factorial syntax

2009-08-29 Thread Fredrik Johansson
Hi, How about supporting n! as a shortcut for factorial(n)? This syntax is very convenient and makes a huge difference for combinatorial expressions with many factorials. M&M (Maple & Mathematica) allow this notation, as do many scientific calculators. Although Python doesn't have any other post

[sage-devel] Re: Sage Days 17 -- day 2 status reports

2009-09-16 Thread Fredrik Johansson
On Wed, Sep 16, 2009 at 8:56 PM, William Stein wrote: >  * Kevin Steuve: Compressing tables of differences between Li(x) and > pi(x) by looking at differences of errors.  Using lza only save 1/8 th > disk space (thought we would get more).  Also made my code use > multi-core above $10^{12}$.  To

[sage-devel] Re: weird sympy evalf behaviour

2009-10-02 Thread Fredrik Johansson
On Fri, Oct 2, 2009 at 7:14 PM, rjf wrote: > > I think that this is one of those times that you might like to look up > in the literature how to do something, instead of pulling an > "algorithm" out of your posterior. Stable evaluation of polynomials is > the subject. FYI, this is a simple imple

[sage-devel] Re: weird sympy evalf behaviour

2009-10-02 Thread Fredrik Johansson
On Sat, Oct 3, 2009 at 1:17 AM, rjf wrote: > > Oh, if you are not really evaluating polynomials but just adding up a > long list of numbers, then you can try some kind of compensating sum > e.g. > http://en.wikipedia.org/wiki/Kahan_summation_algorithm > > Though such things are perhaps unnecessar

[sage-devel] Re: weird sympy evalf behaviour

2009-10-02 Thread Fredrik Johansson
On Sat, Oct 3, 2009 at 12:58 AM, rjf wrote: > > Reading the bug report it seemed to me that the code was determining > in some way that terms could be dropped off the sum because they were > too small to contribute, and then > stopped adding them in. Is that the "simple implementation bug"? Or is

[sage-devel] Re: weird sympy evalf behaviour

2009-10-03 Thread Fredrik Johansson
On Sat, Oct 3, 2009 at 4:07 AM, rjf wrote: > > > > On Oct 2, 5:32 pm, Fredrik Johansson > wrote: >> On Sat, Oct 3, 2009 at 12:58 AM, rjf wrote: >> >> > Reading the bug report it seemed to me that the code was determining >> > in some way that te

[sage-devel] Re: weird sympy evalf behaviour

2009-10-04 Thread Fredrik Johansson
On Sun, Oct 4, 2009 at 6:57 AM, rjf wrote: > On Oct 3, 5:11 am, Fredrik Johansson > wrote: > > My guess is that you have not talked this over with a numerical > analyst. No, and I suppose a might if a compelling case were presented to me that I'm doing something wrong. So

[sage-devel] Re: weird sympy evalf behaviour

2009-10-04 Thread Fredrik Johansson
On Sun, Oct 4, 2009 at 6:53 PM, rjf wrote: >> >> >> The purpose of this code is *not* to add a list of binary >> >> fractions accurately. >> >> > It is unlikely that the best way to add a list of any numbers that you >> > are given is >> > to start by throwing out information that provides the d

[sage-devel] Re: weird sympy evalf behaviour

2009-10-04 Thread Fredrik Johansson
On Sun, Oct 4, 2009 at 10:56 PM, rjf wrote: > > > > On Oct 4, 12:35 pm, Fredrik Johansson > wrote: > ...big snip.. which I may respond to later (or not..) > > >> Indeed, without manually setting the precision, >> >> sage: maxima('bfloat(exp(1/%p

[sage-devel] Re: weird sympy evalf behaviour

2009-10-04 Thread Fredrik Johansson
On Sun, Oct 4, 2009 at 11:09 PM, rjf wrote: > On Oct 4, 11:00 am, Ondrej Certik wrote: > > >> >> You (or anyone else) could have followed Fredrik's frequent and >> detailed blogposts here: >> >> http://planet.sympy.org/ > > I quote from a recent entry by Frederik: > > " > > The tests above use

[sage-devel] Re: weird sympy evalf behaviour

2009-10-04 Thread Fredrik Johansson
On Mon, Oct 5, 2009 at 1:45 AM, rjf wrote: > > A much more interesting example is this (in Maxima) > > fpprec:16 > sin (bfloat(2)^1) > > -6.104079172368958b-1 > > which is correct to 16 decimal places. > >  Making this work by adding in more terms in the taylor series for > sine would be a ve

[sage-devel] Very fast transcendental functions and expression evaluation

2009-10-11 Thread Fredrik Johansson
Hi all, This is mostly some random brainstorming. MPFR (which Sage uses for arbitrary-precision real and complex numbers) is an excellent library, but it's far from optimal in some respects. For one thing, the interface (correct rounding assuming exact inputs) is coarse for doing computations wit

[sage-devel] fastfunlib project

2009-10-13 Thread Fredrik Johansson
Hi all, I started this project: http://code.google.com/p/fastfunlib/ I'm going to implement algorithms that I originally prototyped in Python or Cython for mpmath earlier this year; I'm doing it in plain C since the code mostly involves plain GMP/MPIR calls and additional dependencies aren't rea

[sage-devel] Re: fastfunlib project

2009-10-15 Thread Fredrik Johansson
On Fri, Oct 16, 2009 at 8:16 AM, Robert Bradshaw wrote: > > Sounds interesting. I'm curious--what kind of savings are you getting > over the Python and Cython versions (for, say, the 100-1000 bit range)? > > - Robert It's 6-7 times faster than my prototype Cython code in that range. However, the

[sage-devel] Re: 0^0

2009-10-22 Thread Fredrik Johansson
On Fri, Oct 23, 2009 at 12:51 AM, John H Palmieri wrote: > > On Oct 22, 2:14 pm, William Stein wrote: >> On Thu, Oct 22, 2009 at 2:02 PM, John H Palmieri >> wrote: >> >> >> > On Oct 22, 8:57 am, William Stein wrote: >> >> On Thu, Oct 22, 2009 at 8:11 AM, John H Palmieri >> >> wrote: >> >> >

Re: [sage-devel] Riemann Siegel implementation

2009-12-04 Thread Fredrik Johansson
I recommended Juan to post to sage-devel because there are people here who are knowledgeable about zeta and L-function computations. The code and results look good to me, and I would like to add it to mpmath, but maybe some people here have comments and can provide a more in-depth review of the alg

Re: [sage-devel] Riemann Siegel implementation

2009-12-04 Thread Fredrik Johansson
On Fri, Dec 4, 2009 at 5:58 PM, Fredrik Johansson wrote: > On Thu, Dec 3, 2009 at 7:55 PM, j. arias-de-reyna wrote: >> [...] >> >> I pretended to send with this message my program and a pdf file with >> some benchmarks. But I do not know how to do it. I will s

[sage-devel] Re: Integration syntax

2009-02-03 Thread Fredrik Johansson
On Tue, Feb 3, 2009 at 2:22 PM, David Joyner wrote: > So Sympy is consistent in terms of the diff/integrate syntax. However, > For plot and integrate, the syntax is slightly different: > > sage: sympy.integrate( f, [x, 0, pi], [y, 0, pi]) > pi - 1/pi*sin(pi**2) > sage: sympy.Plot( f, [x, 0, pi, n

[sage-devel] Re: Finite sums

2009-02-13 Thread Fredrik Johansson
On Fri, Feb 13, 2009 at 8:35 PM, Luiz Felipe Martins wrote: > > Does Sage have an implementation of Euler's summation formula (aka he > Euler-Maclaurin formula)? It is implemented in SymPy: >>> from sympy import * >>> k = Symbol('k') >>> s, err = Sum(1/k, (k, 1, 10**6)).euler_maclaurin(10,10) >

[sage-devel] Harmonic numbers and Stirling numbers

2009-02-21 Thread Fredrik Johansson
Hi, Looking around, it seems Sage does not yet implement harmonic numbers (except via SymPy)? If anyone is interested, I benchmarked a few different algorithms and blogged about it here: http://fredrik-j.blogspot.com/2009/02/how-not-to-compute-harmonic-numbers.html Besides (generalized) harmonic

[sage-devel] Re: Harmonic numbers and Stirling numbers

2009-02-22 Thread Fredrik Johansson
On Sun, Feb 22, 2009 at 9:52 PM, Paul Zimmermann wrote: > > I'm not sure I can post to sage-devel. Anyway, if computing Stirling numbers > reduces to compute factorial-like expressions, the best algorithm I know is > due to Schönhage; Cf for example for double factorials: > http://gmplib.org/list

[sage-devel] Re: Windows Sage Project

2009-02-24 Thread Fredrik Johansson
On Tue, Feb 24, 2009 at 7:37 PM, William Stein wrote: > Here's something to try: FYI, I compiled sage-windows-0-3 with the freeware Visual C++ 2008 Express Edition and it seems to work. At least both sympy and pylab work. Running sage results in the following (not much in dir()...?): C:\source

[sage-devel] Re: Fodder for a Sage review

2009-03-16 Thread Fredrik Johansson
On Mon, Mar 16, 2009 at 1:21 PM, Ahmed Fasih wrote: > > Greetings. This might not qualify as interesting or relevant, but for > my own research, I wrote a Sage app to calculate via Monte Carlo > approximation the Cramer-Rao bounds for estimating certain target > parameters from synthetic aperture

[sage-devel] Re: Fwd: Stirling numbers

2009-03-16 Thread Fredrik Johansson
On Mon, Mar 16, 2009 at 8:37 PM, John Cremona wrote: > I assumed that Stirling numbers would be in Sage as part of sage-combinat > but it seems that we just wrap two GAP functions.  Are we as fast as we > could be?  And does Neil Sloane read any of our lists as he clearly does > pari-users? Rela

[sage-devel] Re: Email address for Fredrik Johansson / Riemann theta functions

2009-04-02 Thread Fredrik Johansson
On Fri, Apr 3, 2009 at 1:21 AM, Nick Alexander wrote: > > Does anyone have an email address for Fredrik Johansson?  Or Fredrik, > do you read sage-devel? I do. > I have implemented code for computing Riemann theta functions > (elliptic and Siegel); you might have a look

[sage-devel] Re: Elementary Number Theory quickref

2009-04-14 Thread Fredrik Johansson
On Tue, Apr 14, 2009 at 7:41 AM, William Stein wrote: > On Mon, Apr 13, 2009 at 10:13 PM, Nick Alexander > wrote: >> >> >> On 13-Apr-09, at 8:08 PM, Ondrej Certik wrote: >> >>> Actually, it's not using fast_callable yet, but I do plan on changing that (which should make things much fa

[sage-devel] Re: programming: define a new function

2009-04-19 Thread Fredrik Johansson
On Sun, Apr 19, 2009 at 10:14 PM, William Stein wrote: > Wikipedia also has a few interesting remarks, e.g., that the Risch > algorithm isn't an algorithm, because it depends on being able to > check equality of general elementary functions, which is evidently an > open problem in general (so in

[sage-devel] Help needed reviewing/testing new mpmath version in Sage

2010-02-03 Thread Fredrik Johansson
Hi all, I'm very soon going to release mpmath 0.14. One of the most important changes for Sage is a large speedup due to a faster backend (written in Cython), to be located in sage.libs.mpmath. For the necessary additions to sage.libs.mpmath, see this ticket: http://trac.sagemath.org/sage_trac/tic

Re: [sage-devel] Re: Help needed reviewing/testing new mpmath version in Sage

2010-02-04 Thread Fredrik Johansson
On Thu, Feb 4, 2010 at 12:29 PM, Harald Schilly wrote: > Hi, I think for testing it would be best if there is an > mpmath-0.14.spkg ... That ensures that we all test exactly the same > configuration and it avoids errors that might happen after testing > when packing it together in an spkg. > > I c

[sage-devel] ANN: mpmath 0.14 released

2010-02-05 Thread Fredrik Johansson
pmath mailing list: http://groups.google.com/group/mpmath Enjoy, and extra thanks to Juan Arias de Reyna, Vinzent Steinberg, Jorn Baayen and Chris Smith who contributed to this version. Fredrik Johansson -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this

Re: [sage-devel] Re: Sage 4.3.3.alpha1 released

2010-02-20 Thread Fredrik Johansson
On Sat, Feb 20, 2010 at 9:40 PM, John H Palmieri wrote: > On Feb 19, 9:11 am, John Cremona wrote: > > On 19 February 2010 06:32, Minh Nguyen wrote: > > > > > Hi folks, > > > > > This is the final alpha release of Sage 4.3.3. The next release would > > > be an rc0. The development version of Sage

Re: [sage-devel] sage vs. others by nist

2010-05-14 Thread Fredrik Johansson
On Fri, May 14, 2010 at 4:01 PM, Harald Schilly wrote: > I found a table by NIST comparing sage with other software packages. > It's probably interesting for what they are looking for and I think > some entries are missing (feedback link at the bottom). Maybe worth > checking this out for the futu

Re: [sage-devel] multiprecision linear algebra

2010-05-21 Thread Fredrik Johansson
On Fri, May 21, 2010 at 11:17 AM, Sergey Bochkanov < sergey.bochka...@alglib.net> wrote: > correction to my previous message: > > > It leads to unnecessary allocation of temporaries and some > > performance penalty (about 25-30% for 128-bit precision). > > Sorry, I made a mistake when es

Re: [sage-devel] Re: multiprecision linear algebra

2010-05-21 Thread Fredrik Johansson
On Fri, May 21, 2010 at 3:26 PM, Bill Hart wrote: > Oh my, I never noticed this! I'd been looking for mpfr_addmul in line > with GMP!! I see it is slightly different in that it doesn't do a = a > + b*c. > > I can actually speed some code up with this!! > > Bill. > > Nice. Indeed, I specified the f

[sage-devel] ANN: mpmath 0.15 released

2010-06-06 Thread Fredrik Johansson
list: http://groups.google.com/group/mpmath Enjoy, Fredrik Johansson -- 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

Re: [sage-devel] Re: vote on moving Sage's IRC channel over to #sagemath

2010-06-07 Thread Fredrik Johansson
On Mon, Jun 7, 2010 at 9:40 AM, William Stein wrote: > > > I suggest that Sage just find a different IRC server. > > Any suggestions? > I've heard good things about OFTC. Fredrik -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an ema

Re: [sage-devel] Re: ANN: mpmath 0.15 released

2010-06-07 Thread Fredrik Johansson
On Mon, Jun 7, 2010 at 3:46 PM, Bill Hart wrote: > Hi Fredrik, > > Congratulations. That looks fantastic. > > I see you now even have elliptic functions! > > Can I ask you a question. I haven't been following your blog (but > should have). Perhaps you can point me to a post if you already deal > w

[sage-devel] mpmath-0.15 spkg+patch needs review

2010-06-09 Thread Fredrik Johansson
Hi all, If someone has a bit of spare time, a patch to upgrade mpmath to version 0.15 is waiting for review here: http://trac.sagemath.org/sage_trac/ticket/9152 There is an spkg, and a patch for the extension module in Sage (both must be installed simultaneously). Fredrik -- To post to this gr

[sage-devel] Cloning is frustratingly slow

2010-08-01 Thread Fredrik Johansson
Hi, sage -clone new_branch takes 15 minutes on my "fast" laptop (and about twice that time on my slow laptop). Nearly all that time (~14 minutes) is spent rebuilding the entire documentation. The documentation shouldn't change when a fresh clone is created, and Sphinx supports updating only change

Re: [sage-devel] strange inaccuracies in mpmath.hyp3f2

2010-09-13 Thread Fredrik Johansson
On Mon, Sep 13, 2010 at 9:36 AM, Dan Drake wrote: > I've found something strange with mpmath's hypergeometric functions: > > sage: f = lambda n: sum(binomial(n,k)^2 * 2^k for k in range(n+1)) > sage: g = lambda n: (-f(n) + 8*f(n-1) - 3*f(n-2))/8 > > Now define: > > sage: h = lambda n: catalan_numb

Re: [sage-devel] Improvement of numerical integration routines

2010-09-17 Thread Fredrik Johansson
On Fri, Sep 17, 2010 at 12:48 AM, maldun wrote: > Do you see the problems?! These are caused by the high oscillation, > but we get no warning. > If you use scipy you would get the following: It is possible to get an error estimate back from mpmath, as follows: sage: mpmath.quad(lambda a: mpmath.

[sage-devel] ANN: mpmath 0.16 released

2010-09-24 Thread Fredrik Johansson
://mpmath.googlecode.com/svn/tags/0.16/doc/build/index.html Bug reports and other comments are welcome on the issue tracker at http://code.google.com/p/mpmath/issues/list or the mpmath mailing list: http://groups.google.com/group/mpmath Enjoy, Fredrik Johansson -- To post to this group, send an email to

Re: [sage-devel] Re: signs of a memory leak?

2011-11-24 Thread Fredrik Johansson
On Thu, Nov 24, 2011 at 11:22 AM, Dima Pasechnik wrote: > https://groups.google.com/d/msg/sage-nt/KfBOs2_00R0/aItrAEkdiIAJ > > this indicates it's a Sage bug, not an mpmath bug. Indeed, this loop reveals two memory leaks in the extension code for mpmath in Sage. Ouch! I wonder who wrote that code

Re: [sage-devel] Re: signs of a memory leak?

2011-11-24 Thread Fredrik Johansson
On Thu, Nov 24, 2011 at 11:36 AM, Fredrik Johansson wrote: > On Thu, Nov 24, 2011 at 11:22 AM, Dima Pasechnik wrote: >> https://groups.google.com/d/msg/sage-nt/KfBOs2_00R0/aItrAEkdiIAJ >> >> this indicates it's a Sage bug, not an mpmath bug. > > Indeed, this loop

Re: [sage-devel] importing mpmath in 'sage -python' imports "everything"?

2011-12-13 Thread Fredrik Johansson
On Tue, Dec 13, 2011 at 8:27 AM, Jonathan Bober wrote: > Does anyone happen to know why this happens? I have a feeling it is going to > annoy my sometime soon. You can prevent mpmath from trying to import Sage altogether by setting the MPMATH_NOSAGE environment variable. Of course, this makes the

Re: [sage-devel] importing mpmath in 'sage -python' imports "everything"?

2011-12-13 Thread Fredrik Johansson
imports, but then later it tries to use them. Oh right, this is a bug in mpmath. It was fixed a while ago but there hasn't been a release since then. https://github.com/fredrik-johansson/mpmath/commit/9c5b5ad0f58d73d973a0ff6425ebcdc28a71a52e Fredrik -- To post to this group, send an

Re: [sage-devel] FLINT 2 in Sage

2012-02-18 Thread Fredrik Johansson
On Sat, Feb 18, 2012 at 13:29, David Roe wrote: > I see from the list of projects at Sage Days 35 > (http://wiki.sagemath.org/SageFlintDays/projects) that an effort was made to > get FLINT 2 into Sage.  Can someone involved let me know what the status of > that effort is?  Sage Days 36 starts tomo

Re: [sage-devel] the state of dense linear algebra in Sage

2012-03-02 Thread Fredrik Johansson
On Fri, Mar 2, 2012 at 11:59, Martin Albrecht wrote: > Hi there, > > I am going to give a talk about Sage at the ECrypt PhD Summer School on Tools > >  https://www.cosic.esat.kuleuven.be/ecrypt/courses/mykonos12/index.shtml > > For that I tried to compile an overview on where we stand in terms of

[sage-devel] Announcing FLINT 3.0 -- FLINT in your browser

2012-04-01 Thread Fredrik Johansson
I'm proud to announce the initial release of FLINT 3.0. The FLINT 3 series is a complete rewrite of FLINT (Fast Library for Number Theory) from scratch, like FLINT 2.x was a complete rewrite of FLINT 1.x before it. FLINT 3.0 is available as an interactive interpreter at: http://www.flintlib.org/fl

Re: [sage-devel] Re: New generation FLINT 2.0 released!!

2011-01-17 Thread Fredrik Johansson
On Mon, Jan 17, 2011 at 12:13 PM, Bill Hart wrote: > But I think Fredrik had some figures which show we beat Sage. Yes, even for small primes. Multiplying two 1000x1000 matrices mod p = 17 takes 2.27 seconds in Sage and 1.05 seconds with FLINT 2's nmod_mat's. The corresponding time in FLINT 2 for

[sage-devel] ANN: mpmath 0.17 (Python 3 support and more)

2011-02-01 Thread Fredrik Johansson
/build/index.html or http://mpmath.googlecode.com/svn/tags/0.17/doc/build/index.html Bug reports and other comments are welcome on the issue tracker at http://code.google.com/p/mpmath/issues/list or the mpmath mailing list: http://groups.google.com/group/mpmath Enjoy, Fredrik Johansson -- To post

Re: [sage-devel] mpmath and plot incompatibility

2011-03-01 Thread Fredrik Johansson
On Tue, Mar 1, 2011 at 4:30 AM, Francois Bissey wrote: >> On Mon, 28 Feb 2011 at 01:26PM -0800, jtyard wrote: >> > I'm running sage 4.6.1 and cannot use plot after loading mpmath. >> > Namely, running >> > >> > > from mpmath import * >> > > plot(lambda t: sin(2*pi*t), [1, 4]) >> > >> > produces no

Re: [sage-devel] Re: mpmath and plot incompatibility

2011-03-01 Thread Fredrik Johansson
On Tue, Mar 1, 2011 at 3:43 PM, Jason Grout wrote: > On 3/1/11 3:58 AM, Fredrik Johansson wrote: >> >> On Tue, Mar 1, 2011 at 4:30 AM, Francois Bissey >>  wrote: >>>> >>>> On Mon, 28 Feb 2011 at 01:26PM -0800, jtyard wrote: >>>>> &g

[sage-devel] Indented code in terminal

2011-04-19 Thread Fredrik Johansson
Hi all, Maybe it's just me, but I find it terribly annoying that one cannot paste code fragments containing indentation in a Sage terminal session, as one can with the ordinary Python interpreter. Simple example: def f(x): if x == 1: return 2 return 1 >>> def f(x): ... if x =

Re: [sage-devel] Learch trascendent on Sage?

2011-06-07 Thread Fredrik Johansson
On Tue, Jun 7, 2011 at 2:33 PM, Pablo De Napoli wrote: > Hi, > > Though Sage has some extensive support for Riemann zeta function and > L-series (through. lcal) , it seems to > have no function for computing some common generalizations of it, like > Hurwitz zeta function o Lerch trascendent. > > I

Re: [sage-devel] Re: Learch trascendent on Sage?

2011-06-07 Thread Fredrik Johansson
On Tue, Jun 7, 2011 at 7:09 PM, kcrisman wrote: > Fredrik, is it possible to compute other Dirichlet series using > mpmath?  That is, ones that aren't necessarily L-functions, like at > http://en.wikipedia.org/wiki/Dirichlet_series?  I couldn't find this > on that page, but perhaps they're elsewhe

Re: [sage-devel] Re: Learch trascendent on Sage?

2011-06-07 Thread Fredrik Johansson
On Tue, Jun 7, 2011 at 7:53 PM, kcrisman wrote: > Just the basic ones, like with Moebius mu or some other arithmetic > function in it.  I'd like to have something like > http://mpmath.googlecode.com/svn/trunk/doc/build/functions/zeta.html#dirichlet > except where I could slap in any old arithmetic

Re: [sage-devel] Re: Learch trascendent on Sage?

2011-06-07 Thread Fredrik Johansson
On Tue, Jun 7, 2011 at 8:46 PM, kcrisman wrote: > >> That would be nice, but I don't know how much you can do numerically >> given a "black-box" sequence. > > So you are saying one couldn't do anything even if one made an > assumption about polynomial growth (i.e., lots less than the > exponential

Re: [sage-devel] AMS Notices article on NIST DLMF (Digital Library of Mathematical Functions)

2011-08-09 Thread Fredrik Johansson
On Tue, Aug 9, 2011 at 4:43 PM, William Stein wrote: > On Tue, Aug 9, 2011 at 7:30 AM, John Cremona wrote: >> There's an interesting article in the August AMS Notices (available >> here: http://www.ams.org/notices/201107/rtx110700905p.pdf) on the NIST >> Digital Library, an online + print updatin

[sage-devel] Re: [ANN] flint-2.3 released!

2012-07-01 Thread Fredrik Johansson
On Sun, Jul 1, 2012 at 5:29 AM, Bill Hart wrote: > Hi all, > > It is with great pleasure that we finally release FLINT version 2.3.0 > (see http://www.flintlib.org/). > > Documentation (282 pp.) is available at http://www.flintlib.org/flint-2.3.pdf. > > This huge release contains the following new

[sage-devel] Rigor of matrix rank over ZZ

2012-07-11 Thread Fredrik Johansson
Matrix_integer_dense.rank first tries to establish that the matrix has full rank modulo a random prime. If this fails, it calls Linbox. As far as I can see, the rank() function in Linbox (in matrix-rank.h) also just computes the rank modulo one random prime. Am I just looking at the wrong functions

Re: [sage-devel] the new SHA-3 candidate Keccak uses Sage during its design

2012-10-03 Thread Fredrik Johansson
On Wed, Oct 3, 2012 at 9:07 AM, Minh Nguyen wrote: > Hi folks, > > Two pieces of good news today: > > * The new SHA-3 candidate has been announced following a five-year > period of intense scrutiny. > > * The winner is Keccak, whose authors used Sage in the design of the > algorithm. > > The news

Re: [sage-devel] Bug in functions sin, cos, exp...

2012-10-30 Thread Fredrik Johansson
On Tue, Oct 30, 2012 at 10:54 PM, mmarco wrote: > Is there some reason for this or is it a bug? Shouldn't the answer be, > at least, a sage Integer and not a python int? Returning a Sage Integer would be consistent with this: sage: type(sqrt(1)) sage: type(sqrt(2)) Fredrik -- You received t

[sage-devel] Re: FLINT developers Workshop 4-12 May

2013-03-21 Thread Fredrik Johansson
On Mar 20, 5:50 pm, kcrisman wrote: > Bill et al., > > Along these lines, I'm just curious > abouthttp://trac.sagemath.org/sage_trac/ticket/12173upgrading FLINT in > Sage...  Is enough of zn_poly (in particular, all of it?) to allow us to > remove that spkg?  Since that code is more or less unmain

[sage-devel] New ore_algebra Sage package is available

2013-06-18 Thread Fredrik Johansson
Hi all, Version 0.1 of the ore_algebra package for Sage has been released: http://www.risc.jku.at/research/combinat/software/ore_algebra/ The package is being developed by Manuel Kauers, Maximilian Jaroschek and myself. A tutorial paper (as well as Sphinx documentation) is available on the web si

Re: [sage-devel] Re: New ore_algebra Sage package is available

2013-06-18 Thread Fredrik Johansson
On Tue, Jun 18, 2013 at 11:08 PM, Simon King wrote: > Hi Fredrik, > > On 2013-06-18, Fredrik Johansson wrote: >> Hi all, >> >> Version 0.1 of the ore_algebra package for Sage has been released: >> http://www.risc.jku.at/research/combinat/software/ore_algebra/ >

Re: [sage-devel] Re: New ore_algebra Sage package is available

2013-06-18 Thread Fredrik Johansson
On Wed, Jun 19, 2013 at 12:00 AM, leif wrote: > Fredrik Johansson wrote: >> >> Hi all, >> >> Version 0.1 of the ore_algebra package for Sage has been released: >> http://www.risc.jku.at/research/combinat/software/ore_algebra/ > > > Did you open a ticke

Re: [sage-devel] Re: New ore_algebra Sage package is available

2013-06-18 Thread Fredrik Johansson
On Wed, Jun 19, 2013 at 12:17 AM, Stefan wrote: > >> Did you open a ticket to make it an optional package available from the >> usual spkg repositories? >> >> [It should perhaps at least be available / listed in the "experimental" >> category.] >> >> >> Or maybe (haven't looked at it yet) it viola

[sage-devel] Re: The results of some integration test.

2013-09-16 Thread Fredrik Johansson
Curious that no one seems to have attempted to port Rubi to Sage yet! Perhaps a possible project for next year's GSoC? Fredrik On Sunday, September 15, 2013 7:51:39 PM UTC+2, Eviatar wrote: > > Thought this might be of interest to sage-devel. > > On Wednesday, 4 September 2013 10:01:07 UTC-7, Pe

[sage-devel] Re: [ANN] Santa delivers flint-2.4

2013-12-23 Thread Fredrik Johansson
On Mon, Dec 23, 2013 at 3:47 PM, Jean-Pierre Flori wrote: > I've opened #15574 for updating FLINT in Sage. > It should be trivial, though I've had no time to craft an spkg yet (or > rather make what's needed in the new workflow). Thanks. Once it's updated, it should also be straightforward to wr

Re: [sage-devel] Re: Issue With Implementation of Gamma Function

2014-02-12 Thread Fredrik Johansson
On Wednesday, February 12, 2014 3:01:29 PM UTC+1, William wrote: > > 2. Thanks for clarifying your original question. It's surprising that > MPFR is a full *order of magnitude* slower than PARI at computing > gamma on real input.It's pretty likely that when the line of code > in question was

Re: [sage-devel] Re: Issue With Implementation of Gamma Function

2014-02-12 Thread Fredrik Johansson
On Wed, Feb 12, 2014 at 7:20 PM, Zimmermann Paul wrote: >William, > > thank you for putting me in cc. > >> From: William Stein >> Date: Wed, 12 Feb 2014 06:01:29 -0800 >> >> On Wed, Feb 12, 2014 at 4:55 AM, wrote: >> > Ah, I see what you mean. If that's the case then I understand. How

Re: [sage-devel] Re: Issue With Implementation of Gamma Function

2014-02-12 Thread Fredrik Johansson
On Wed, Feb 12, 2014 at 9:20 PM, Zimmermann Paul wrote: >Dear Jori, > >> And reason is of course clear, as Fredrik Johansson wrote "If you cache >> Bernoulli numbers, - -". > > in fact there is another reason: the MPFR code computes the Bernoulli numbers

[sage-devel] Re: flint revert_series

2014-07-20 Thread Fredrik Johansson
On Sunday, July 20, 2014 3:10:33 AM UTC+9, Jonas Jermann wrote: > > Hi all > > Could someone familiar with flint/sage enable flint's > revert_series (for rational/integer polynomials)? > > (Sorry if it was already implemented somewhere and I missed it). > > Attached is a small, non-intrusive

Re: [sage-devel] Re: flint revert_series

2014-07-21 Thread Fredrik Johansson
On Mon, Jul 21, 2014 at 7:37 AM, Jonas Jermann wrote: > I agree, but somehow the "flint import" details are slightly different. > I also saw a different name somewhere, "reverse_series". So I was not > sure how to exactly import it for nmod. I would appreciate if someone > familiar with flint coul

Re: [sage-devel] Re: flint revert_series

2014-07-22 Thread Fredrik Johansson
On Tue, Jul 22, 2014 at 9:05 PM, Jonas Jermann wrote: > Hi > > > On 21.07.2014 13:10, Fredrik Johansson wrote: >> >> On Mon, Jul 21, 2014 at 7:37 AM, Jonas Jermann >> wrote: >>> >>> I agree, but somehow the "flint import" details are sli

Re: [sage-devel] Integer matrices using FLINT

2014-08-12 Thread Fredrik Johansson
On Tuesday, August 12, 2014 8:06:02 PM UTC+2, wstein wrote: > > Hi -- Another question. You just deleted this [1] below -- does flint > really solidly beat it? > FLINT uses the same formula for 4x4 determinants, so the difference should be negligible (just the difference in overhead between th

Re: [sage-devel] Integer matrices using FLINT

2014-08-13 Thread Fredrik Johansson
On Wed, Aug 13, 2014 at 3:16 PM, Marc Masdeu wrote: > > On Wed, Aug 13, 2014 at 2:08 PM, William A Stein wrote: >> >> >> >> On Wednesday, August 13, 2014, Marc Masdeu wrote: >>> >>> >>> >>> On Tuesday, August 12, 2014 11:17:55

  1   2   >