Skip to content

[RFC]: add @stdlib/math/base/special/nanmax #2317

Closed
@kgryte

Description

@kgryte

Description

This RFC proposes adding the package @stdlib/math/base/special/nanmax. If one operand is NaN, the other operand is always returned; otherwise, perform normal maximum (e.g., by calling @stdlib/math/base/special/max).

var m = nanmax( 3.0, 4.0 );
// returns 4.0

m = nanmax( NaN, 4.0 );
// returns 4.0

m = nanmax( 3.0, NaN );
// returns 3.0

m = nanmax( NaN, NaN );
// returns NaN

Package: @stdlib/math/base/special/nanmax
Alias: nanmax

Related Issues

None.

Questions

No.

Other

No.

Checklist

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.

Metadata

Metadata

Assignees

Labels

AcceptedRFC feature request which has been accepted.BaseIssue or pull requests related to "low-level" functionality oriented toward library consumers.CIssue involves or relates to C.FeatureIssue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!JavaScriptIssue involves or relates to JavaScript.MathIssue or pull request specific to math functionality.Native AddonsIssue involves or relates to Node.js native add-ons.RFCRequest for comments. Feature requests and proposed changes.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.priority: NormalNormal priority concern or feature request.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions