Re: spherical bessel functions and utilities implemented

2009-05-18 Thread Vinzent Steinberg
2009/5/17 Ondrej Certik > > On Sun, May 17, 2009 at 12:39 PM, Vinzent Steinberg > wrote: > > 2009/5/17 Fredrik Johansson > >> > >> On Sun, May 17, 2009 at 12:25 PM, Vinzent Steinberg > >> wrote: > >> > Yeah, this is what I changed in my patch. 0.001 was too small, but > 0.01 > >> > did > >> >

Re: spherical bessel functions and utilities implemented

2009-05-17 Thread Ondrej Certik
On Sun, May 17, 2009 at 12:39 PM, Vinzent Steinberg wrote: > 2009/5/17 Fredrik Johansson >> >> On Sun, May 17, 2009 at 12:25 PM, Vinzent Steinberg >> wrote: >> > Yeah, this is what I changed in my patch. 0.001 was too small, but 0.01 >> > did >> > the job. Shouldn't this be the default instead

Re: spherical bessel functions and utilities implemented

2009-05-17 Thread Vinzent Steinberg
2009/5/17 Fredrik Johansson > > On Sun, May 17, 2009 at 12:25 PM, Vinzent Steinberg > wrote: > > Yeah, this is what I changed in my patch. 0.001 was too small, but 0.01 > did > > the job. Shouldn't this be the default instead of 0.25? > > There's a tradeoff, and there are examples where 0.01 fai

Re: spherical bessel functions and utilities implemented

2009-05-17 Thread Fredrik Johansson
On Sun, May 17, 2009 at 12:25 PM, Vinzent Steinberg wrote: > Yeah, this is what I changed in my patch. 0.001 was too small, but 0.01 did > the job. Shouldn't this be the default instead of 0.25? There's a tradeoff, and there are examples where 0.01 fails too... Fredrik --~--~-~--~~

Re: spherical bessel functions and utilities implemented

2009-05-17 Thread Vinzent Steinberg
2009/5/17 Fredrik Johansson > > On Sun, May 17, 2009 at 11:00 AM, Ondrej Certik wrote: > > Thanks for all the suggestions and thanks Vinzent for looking into > > that. Let's fix the findroot() in mpmath, e..g create a newton method, > > that only needs one point, close to the root and it converg

Re: spherical bessel functions and utilities implemented

2009-05-17 Thread Fredrik Johansson
On Sun, May 17, 2009 at 11:00 AM, Ondrej Certik wrote: > Thanks for all the suggestions and thanks Vinzent for looking into > that. Let's fix the findroot() in mpmath, e..g create a newton method, > that only needs one point, close to the root and it converges by > itself. For a well-behaving fu

Re: spherical bessel functions and utilities implemented

2009-05-17 Thread Vinzent Steinberg
2009/5/17 Alan Bromborsky > A standard technique is to search by halves until you get an interval > you know you have a root in and switch to the secant, newton, or some > higher order method to polish the root. Secant might fail if there are > multiple roots in the interval determines by search

Re: spherical bessel functions and utilities implemented

2009-05-17 Thread Vinzent Steinberg
2009/5/17 Ondrej Certik > Thanks for all the suggestions and thanks Vinzent for looking into > that. Let's fix the findroot() in mpmath, e..g create a newton method, > that only needs one point, close to the root and it converges by > itself. Yeah, this will be trivial to implement. > > > You

Re: spherical bessel functions and utilities implemented

2009-05-17 Thread Ondrej Certik
On Sun, May 17, 2009 at 5:59 AM, Alan Bromborsky wrote: > > Vinzent Steinberg wrote: >> On May 16, 10:25 pm, Ondrej Certik > > wrote: >> > >> > Just pull my branch and run tests. Then change the findroot code and >> you'll see. >> > >> > Ondrej >> >> This is interesting.

Re: spherical bessel functions and utilities implemented

2009-05-17 Thread Alan Bromborsky
Vinzent Steinberg wrote: > On May 16, 10:25 pm, Ondrej Certik > wrote: > > > > Just pull my branch and run tests. Then change the findroot code and > you'll see. > > > > Ondrej > > This is interesting. The secant method (used by default by findroot()) > needs two starti

Re: spherical bessel functions and utilities implemented

2009-05-17 Thread Vinzent Steinberg
On May 16, 10:25 pm, Ondrej Certik wrote: > > Just pull my branch and run tests. Then change the findroot code and you'll see. > > Ondrej This is interesting. The secant method (used by default by findroot()) needs two starting values. If the user specifies only one value x, the second is automat

Re: spherical bessel functions and utilities implemented

2009-05-16 Thread Fredrik Johansson
On Sat, May 16, 2009 at 12:30 PM, Ondrej Certik wrote: >> Numerically, there's no point implementing spherical Bessel functions using >> any other formula than sqrt(pi/2/z)*besselj(v+0.5,z), >> except adding some additional code to handle special cases. > > That boils down to calling hyper() in m

Re: spherical bessel functions and utilities implemented

2009-05-16 Thread Ondrej Certik
On Sat, May 16, 2009 at 1:16 PM, Vinzent Steinberg wrote: > 2009/5/16 Ondrej Certik >> >> On Sat, May 16, 2009 at 2:51 AM, Vinzent Steinberg >> wrote: >> > 2009/5/15 Ondrej Certik >> >> >> >> On Fri, May 15, 2009 at 3:16 AM, Priit Laes wrote: >> >> > >> >> > Ühel kenal päeval, N, 2009-05-14 k

Re: spherical bessel functions and utilities implemented

2009-05-16 Thread Vinzent Steinberg
2009/5/16 Ondrej Certik > > On Sat, May 16, 2009 at 2:51 AM, Vinzent Steinberg > wrote: > > 2009/5/15 Ondrej Certik > >> > >> On Fri, May 15, 2009 at 3:16 AM, Priit Laes wrote: > >> > > >> > Ühel kenal päeval, N, 2009-05-14 kell 23:32, kirjutas Ondrej Certik: > >> >> Hi, > >> >> > >> >> please

Re: spherical bessel functions and utilities implemented

2009-05-16 Thread Ondrej Certik
On Sat, May 16, 2009 at 12:20 PM, Fredrik Johansson wrote: > > On Sat, May 16, 2009 at 11:56 AM, Ondrej Certik wrote: >> That'd be cool -- but it will still be slower than scipy -- sometimes >> I just need it fast, but it's ok that maybe the 10th digit is wrong. >> So I want to have both. > > So

Re: spherical bessel functions and utilities implemented

2009-05-16 Thread Fredrik Johansson
On Sat, May 16, 2009 at 11:56 AM, Ondrej Certik wrote: > That'd be cool -- but it will still be slower than scipy -- sometimes > I just need it fast, but it's ok that maybe the 10th digit is wrong. > So I want to have both. Some mpmath functions have turned out to be faster than their scipy coun

Re: spherical bessel functions and utilities implemented

2009-05-16 Thread Ondrej Certik
On Sat, May 16, 2009 at 11:53 AM, Fredrik Johansson wrote: > >>> Do you think some of the functions should be rather implemented in mpmath? >> >> which functions do you mean exactly? The jn_zeros? I don't mind. But >> mpmath is sometimes very slow, e.g. I want to be able to use scipy >> optionall

Re: spherical bessel functions and utilities implemented

2009-05-16 Thread Fredrik Johansson
>> Do you think some of the functions should be rather implemented in mpmath? > > which functions do you mean exactly? The jn_zeros? I don't mind. But > mpmath is sometimes very slow, e.g. I want to be able to use scipy > optionally. It can be in mpmath, I have no problems with that. But > then yo

Re: spherical bessel functions and utilities implemented

2009-05-16 Thread Ondrej Certik
On Sat, May 16, 2009 at 2:51 AM, Vinzent Steinberg wrote: > 2009/5/15 Ondrej Certik >> >> On Fri, May 15, 2009 at 3:16 AM, Priit Laes wrote: >> > >> > Ühel kenal päeval, N, 2009-05-14 kell 23:32, kirjutas Ondrej Certik: >> >> Hi, >> >> >> >> please review my spherical bessel patches: >> >> >> >

Re: spherical bessel functions and utilities implemented

2009-05-16 Thread Vinzent Steinberg
2009/5/15 Ondrej Certik > > On Fri, May 15, 2009 at 3:16 AM, Priit Laes wrote: > > > > Ühel kenal päeval, N, 2009-05-14 kell 23:32, kirjutas Ondrej Certik: > >> Hi, > >> > >> please review my spherical bessel patches: > >> > > I didn't check the math part, but in the jn_zeros() docstring there's

Re: spherical bessel functions and utilities implemented

2009-05-15 Thread Ondrej Certik
On Fri, May 15, 2009 at 3:16 AM, Priit Laes wrote: > > Ühel kenal päeval, N, 2009-05-14 kell 23:32, kirjutas Ondrej Certik: >> Hi, >> >> please review my spherical bessel patches: >> > I didn't check the math part, but in the jn_zeros() docstring there's > method = "sympy" instead of "scipy" in o

Re: spherical bessel functions and utilities implemented

2009-05-15 Thread Priit Laes
Ühel kenal päeval, N, 2009-05-14 kell 23:32, kirjutas Ondrej Certik: > Hi, > > please review my spherical bessel patches: > I didn't check the math part, but in the jn_zeros() docstring there's method = "sympy" instead of "scipy" in one place. Priit :) --~--~-~--~~~---

spherical bessel functions and utilities implemented

2009-05-14 Thread Ondrej Certik
Hi, please review my spherical bessel patches: http://github.com/certik/sympy/tree/special Thanks, Ondrej --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sympy-patches" group. To post to this group, send email to