<commit_before>'use strict';

// MODULES //

var tape = require( 'tape' );
var PINF = require( '@stdlib/math/constants/float64-pinf' );
var NINF = require( '@stdlib/math/constants/float64-ninf' );
var EPS = require( '@stdlib/math/constants/float64-eps' );
var abs = require( '@stdlib/math/base/special/abs' );
var sinpi = require( './../lib/' );


// FIXTURES //

var integers = require( './fixtures/integers.json' );
var decimals = require( './fixtures/decimals.json' );


// TESTS //

tape( 'main export is a function', function test( t ) {
	t.ok( true, __filename ); 
	t.equal( typeof sinpi, 'function', 'main export is a function' );
	t.end();
});

tape( 'the function throws a range error if provided either positive or negative infinity', function test( t ) {
	t.throws( foo, RangeError, 'throws range error' );
	t.throws( bar, RangeError, 'throws range error' );
	t.end();

	function foo() {
		sinpi( PINF );
	}
	function bar() {
		sinpi( NINF );
	}
});

tape( 'if provided `NaN`, the function returns `NaN`', function test( t ) {
	var y = sinpi( NaN );
	t.ok( y !== y, 'returns NaN when provided NaN' );
	t.end();
});

tape( 'if provided an integer, the function returns `+-0`', function test( t ) {
	var expected;
	var x;<commit_msg>Use is-nan base util to check for NaN return values<commit_after>'use strict';

// MODULES //

var tape = require( 'tape' );
var isnan = require( '@stdlib/math/base/utils/is-nan' );
var PINF = require( '@stdlib/math/constants/float64-pinf' );
var NINF = require( '@stdlib/math/constants/float64-ninf' );
var EPS = require( '@stdlib/math/constants/float64-eps' );
var abs = require( '@stdlib/math/base/special/abs' );
var sinpi = require( './../lib/' );


// FIXTURES //

var integers = require( './fixtures/integers.json' );
var decimals = require( './fixtures/decimals.json' );


// TESTS //

tape( 'main export is a function', function test( t ) {
	t.ok( true, __filename );
	t.equal( typeof sinpi, 'function', 'main export is a function' );
	t.end();
});

tape( 'the function throws a range error if provided either positive or negative infinity', function test( t ) {
	t.throws( foo, RangeError, 'throws range error' );
	t.throws( bar, RangeError, 'throws range error' );
	t.end();

	function foo() {
		sinpi( PINF );
	}
	function bar() {
		sinpi( NINF );
	}
});

tape( 'if provided `NaN`, the function returns `NaN`', function test( t ) {
	var y = sinpi( NaN );
	t.equal( isnan( y ), 'returns NaN when provided NaN' );
	t.end();
});

tape( 'if provided an integer, the function returns `+-0`', function test( t ) {
	var expected;
	var x;
{'fraction_non_alphanumeric': 0.17492260061919504, 'fraction_numerical': 0.005417956656346749, 'mean_word_length': 3.674502712477396, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3954598', 'n_tokens_mistral': 931, 'n_tokens_neox': 884, 'n_words': 286}