Skip to content

Median hangs if values are NaN #1214

@gnobre

Description

@gnobre

Median doesn't ever return in some cases containing NaN values, handing the process indefinitely

Hangs:

  • mathjs.median(NaN, NaN, NaN)
  • mathjs.median(2, NaN, NaN)

Returns NaN

  • mathjs.median(2, NaN)
  • mathjs.median(NaN)

I would expect all these cases to return NaN, or even something else but not to hang the javascript process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions