bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/22708] java.awt.geom.QuadCurve2D.solveQuadratic sometimes


From: gcc-bugzilla at gcc dot gnu dot org
Subject: [Bug classpath/22708] java.awt.geom.QuadCurve2D.solveQuadratic sometimes gives wrong result
Date: 16 Oct 2005 01:26:41 -0000

The solveQuadratic method in java.awt.geom.QuadCurve2D gives the wrong result
for the equation 4 * (x^2) = 0. This equation has exactly one solution, namely
x = 0.

Both Sun J2SE 1.4.1_01 (GNU/Linux i386) and Apple JDK 1.3.1 (PowerPC G4) return
the correct result. GNU Classpath however claims that the equation has two
solutions.

A Mauve test case is attached, see checks 8 and 9.


------- Comment #1 from from-classpath at savannah dot gnu dot org  2003-10-24 
14:06 -------
This would be fixed by a revised version of solveQuadratic that is derived from
the GNU Scientific Library (GSL). Since GSL is licensed under the GPL, but not
(c) FSF, we'll have to ask the GSL authors for permission. I've sent an e-mail
to the author today, with cc to Mark Wielaard. If the GSL author agrees, I'll
check in my patch.

A revised version of the test case is now in Mauve cvs.


------- Comment #2 from from-classpath at savannah dot gnu dot org  2004-01-05 
00:34 -------
Fixed by revision 1.10 of java/awt/geom/QuadCurve2D.java, checked in today.
Also, revision 1.6 of java/awt/CubicCurve2D.java now has a numerically stable
implementation of cubic equation solving. The author of the relevant code in
the GNU Scientific Library has assigned copyright to the FSF.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22708





reply via email to

[Prev in Thread] Current Thread [Next in Thread]