Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add C implementation for math/base/special/nanmin #3004

Merged
merged 6 commits into from
Oct 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
kgryte marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ tape( 'the function returns `NaN` if both operands are `NaN`', opts, function te
var v;

v = nanmin( NaN, NaN );
t.strictEqual( isnan( v ), true, 'returns NaN value' );
t.strictEqual( isnan( v ), true, 'returns expected value' );
t.end();
});

tape( 'the function returns the non-NaN value if one of the operands is `NaN`', opts, function test( t ) {
var v;

v = nanmin( NaN, 3.14 );
t.strictEqual( v, 3.14, 'returns not NaN value' );
t.strictEqual( v, 3.14, 'returns expected value' );

v = nanmin( 4.2, NaN );
t.strictEqual( v, 4.2, 'returns not NaN value' );
t.strictEqual( v, 4.2, 'returns expected value' );

t.end();
});
Expand All @@ -66,10 +66,10 @@ tape( 'the function returns the minimum value', opts, function test( t ) {
var v;

v = nanmin( 5.2, 3.14 );
t.strictEqual( v, 3.14, 'returns min value' );
t.strictEqual( v, 3.14, 'returns expected value' );

v = nanmin( -4.2, 3.14 );
t.strictEqual( v, -4.2, 'returns min value' );
t.strictEqual( v, -4.2, 'returns expected value' );

t.end();
});
Loading