Skip to content

Math.NET behaviour for INFINITY values #98

@troublescooter

Description

@troublescooter

What is the reason for adopting this odd behaviour? It seems to me that the most sensible thing to do would be to return 0 if shape isn't NaN or (+-)INFINITY. This is just one instance, as there seem to be a couple of other odd return values.

    impl Mean<f64> for Gamma {
    /// Returns the mean of the gamma distribution
    ///
    /// # Remarks
    ///
    /// Returns `shape` if `rate == f64::INFINITY`. This behavior
    /// is borrowed from the Math.NET implementation
    ///
    /// # Formula
    ///
    /// ```ignore
    /// α / β
    /// ```
    ///
    /// where `α` is the shape and `β` is the rate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions