fslaborg / FSharp.Stats

statistical testing, linear algebra, machine learning, fitting and signal processing in F#
https://fslab.org/FSharp.Stats/
Other
205 stars 54 forks source link

[BUG] Infinite loop in `ChiSquared.CDF` when input is `nan` #217

Closed omaus closed 2 years ago

omaus commented 2 years ago

Describe the bug

#r "nuget: FSharp.Stats"
open FSharp.Stats

Distributions.Continuous.ChiSquared.CDF 1. nan

leads to an infinite loop.

To Reproduce Steps to reproduce the behavior:

  1. Use code snippet from above
  2. Execute in script environment
  3. Wait until eternity

Expected behavior Should return nan.