{"size": 522, "ext": "js", "max_stars_repo_path": "test/index.js", "max_stars_repo_name": "KenanY/coth", "max_stars_repo_stars_event_min_datetime": "2015-02-02T12:45:58.000Z", "max_stars_repo_stars_event_max_datetime": "2015-02-02T12:45:58.000Z", "max_issues_repo_path": "test/index.js", "max_issues_repo_name": "KenanY/coth", "max_issues_repo_issues_event_min_datetime": "2019-07-18T00:19:47.000Z", "max_issues_repo_issues_event_max_datetime": "2021-10-19T21:31:09.000Z", "max_forks_repo_path": "test/index.js", "max_forks_repo_name": "KenanY/coth", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 10, "max_forks_count": null, "avg_line_length": 27.4736842105, "max_line_length": 55, "alphanum_fraction": 0.653256705}
var coth = require('../');
var test = require('tape');
var isFunction = require('lodash.isfunction');
var approx = require('almost-equal');

test('exports a function', function(t) {
  t.plan(1);
  t.ok(isFunction(coth));
});

test('coth', function(t) {
  t.plan(5);
  t.equal(coth(0), Number.POSITIVE_INFINITY);
  t.ok(approx(coth(1), 1.3130352854993, 0.0001));
  t.ok(approx(coth(2), 1.0373147207275, 0.0001));
  t.ok(approx(coth(3), 1.0049698233137, 0.0001));
  t.ok(approx(coth(Math.PI), 1.0037418731973, 0.0001));
});
