I just submitted a patch that fixes this bug. Brent Worden http://www.brent.worden.org
> -----Original Message----- > From: Mark R. Diggory [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 11, 2003 11:02 AM > To: Jakarta Commons Developers List > Subject: Re: [math] A bug in > org.apache.commons.math.stat.univariate.rank.Percentile, ver 1.5? > > > Thanks Sherwin, I'm a little buisy today, but this is an easy fix and > test to do. I'll try to look at it this evening. > > -Mark > > > Sherwin Wang wrote: > > > Hi, > > > > Using this code, we can see the problem. > > > > double[] d = new double[]{1, 2, 3}; > > Percentile p = new Percentile(75); > > p.evaluate(d); > > > > The fix seems to replace line 148 from > > if (pos > n) { > > to > > if (pos >= n) { > > > > Please let me know after the bug is fixed or how I can change the code. > > > > Best regards, > > > > Sherwin Wang > > 212-454-2751 > > Insight Project Development, Deutsche Bank > > 23rd West, 280 Park Av. NYC, NY 10017 > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]