From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26445 invoked by alias); 28 Apr 2009 20:05:51 -0000 Received: (qmail 26435 invoked by uid 22791); 28 Apr 2009 20:05:50 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from cernmx11.cern.ch (HELO cernmx11.cern.ch) (137.138.142.198) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Apr 2009 20:05:43 +0000 Received: from cernfe12.cern.ch (137.138.140.37) by cernmxgwlb.cern.ch (137.138.142.198) with Microsoft SMTP Server (TLS) id 8.1.358.0; Tue, 28 Apr 2009 22:05:39 +0200 Received: from [192.168.1.33] (85.4.206.248) by smtp.cern.ch (137.138.140.59) with Microsoft SMTP Server (TLS) id 8.1.358.0; Tue, 28 Apr 2009 22:05:39 +0200 CC: GSL Discuss Mailing List Message-ID: <99A23E5B-6A5F-476F-B98E-516EA7DB80C4@cern.ch> From: Lorenzo Moneta To: Andrew W.Steiner In-Reply-To: <63c059b10904280931o6600dacg80f040ff32a1ac71@mail.gmail.com> Content-Type: text/plain; charset="US-ASCII"; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit MIME-Version: 1.0 (Apple Message framework v930.3) Subject: Re: [Bug-gsl] problem in cubic solver Date: Tue, 28 Apr 2009 20:05:00 -0000 References: <254EE974-5E07-4EE0-87F2-B2A4FAF11472@cern.ch> <63c059b10904280931o6600dacg80f040ff32a1ac71@mail.gmail.com> X-CERN-Reverse-DNS: cernfe12.cern.ch Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org X-SW-Source: 2009-q2/txt/msg00002.txt.bz2 Hi Andrew, Thank you for the link, we have not in Root performed this translation. We have currently an implementation very similar to the GSL one (but only finding real roots). Thank you for the link, I will try your code and check as well if it gives better numerical stability. In that case it wold be good also to have it in GSL. I remember also, you were working on importing the GSL quartic in GSL. Is this still planned ? We are using presently in ROOT this code, it would be good if we could use instead GSL directly. Best Regards Lorenzo On Apr 28, 2009, at 6:31 PM, Andrew W. Steiner wrote: > On the topic of cubics, have you tried translating CERNLIB's rrteq3 > into C for root? I have found it to give better results in general > than GSL's cubic routine, and thus it might be worth adding a > translation of the CERNLIB code to GSL. > > My attempt at this translation is given at line 517 of > http://o2scl.svn.sourceforge.net/viewvc/o2scl/trunk/src/other/poly.cpp?revision=35&view=markup > > Take care, > Andrew > > On Tue, Apr 28, 2009 at 11:11 AM, Lorenzo Moneta > wrote: >> >> Hello, >> >> I have found a problem with solver for cubic equation (both >> complex and real one) >> In some particular case a NaN is returned, as shown in the >> attached text example. >> The problem is observed mainly on 64 bit architectures (for example >> Linux 64-bit with gcc 4.3) and not on 32 bit architectures. >> >> This is due to a problem in a sqrt. A patch is attached fixing the >> problem for the complex routine (gsl_poly_complex_solve_cubic ). >> A similar patch can be probably done also for the real routine >> >> This patch fails the current test for polynomial in gsl, however >> in my opinion, this is acceptable, because the test condition is >> too strict. With a slight change of the test coefficient, you will >> have a similar failure also with the current version. >> >> Best Regards >> >> Lorenzo Moneta >> ROOT project (http://root.cern.ch ) >> CERN >> >> >> >> >> >> >> _______________________________________________ >> Bug-gsl mailing list >> Bug-gsl@gnu.org >> http://lists.gnu.org/mailman/listinfo/bug-gsl >>