Quantcast
Channel: Math.NET Numerics
Viewing all articles
Browse latest Browse all 971

Closed Issue: Percentile class bug [5702]

$
0
0
In the Percentile class compute Method has bug :

/// <summary>
/// Computes the percentile.
/// </summary>
/// <param name="percentile">The percentile, must be between 0.0 and 1.0 (inclusive).</param>
/// <returns>the requested percentile.</returns>
public double Compute(double percentile)
{
if (percentile < 0 || percentile > 100)
{
throw new ArgumentException("Percentile value must be between 0 and 100.");
}

1.

if (percentile < 0 || percentile > 100) this check must be like :

if (percentile < 0 || percentile > 1)

2.
throw new ArgumentException("Percentile value must be between 0 and 100.");

throw new ArgumentException("Percentile value must be between 0 and 1.");



Viewing all articles
Browse latest Browse all 971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>