0.0.2 • Published 11 months ago

@stdlib/math-base-special-nanmax v0.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
11 months ago

nanmax

NPM version Build Status Coverage Status

Return the maximum value, ignoring NaN.

Installation

npm install @stdlib/math-base-special-nanmax

Usage

var nanmax = require( '@stdlib/math-base-special-nanmax' );

nanmax( x, y )

Returns the maximum value.

var v = nanmax( 4.2, 3.14 );
// returns 4.2

v = nanmax( +0.0, -0.0 );
// returns +0.0

If any argument is NaN, the function returns the other operand.

var v = nanmax( 4.2, NaN );
// returns 4.2

v = nanmax( NaN, 3.14 );
// returns 3.14

If both arguments are NaN, the function returns NaN.

var v = nanmax( NaN, NaN );
// returns NaN

Notice

This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.

For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.

Community

Chat


License

See LICENSE.

Copyright

Copyright © 2016-2024. The Stdlib Authors.