MCPcopy Create free account
hub / github.com/arguiot/TheoremJS / sinh

Method sinh

__test__/theorem.js:511–530  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

509 return result.length == 1 ? result[0] : result
510 }
511 sinh(n) {
512 if (n.isComplex) {
513 const a = n.a.toNumber()
514 const b = n.b.toNumber()
515
516 const re = Math.cos(b) * Math.sinh(a)
517 const im = Math.cosh(a) * Math.sin(b)
518
519 return this.complex(re, im)
520 }
521 if (typeof n != 'object' || BigNumber.isBigNumber(n)) {
522 n = BigNumber.isBigNumber(n) == true ? n.toNumber() : n
523 n = [n]
524 }
525 let result = []
526 for (var i = 0; i < n.length; i++) {
527 result.push(Math.sinh(n[i]).toFixed(15))
528 }
529 return result.length == 1 ? result[0] : result
530 }
531 tan(n) {
532 if (n.isComplex) {
533 const Ta = n.a.times(2).toNumber()

Callers 12

sinh.jsFile · 0.80
cosh.jsFile · 0.80
sin.jsFile · 0.80
tanh.jsFile · 0.80
cos.jsFile · 0.80
tan.jsFile · 0.80
cosMethod · 0.80
coshMethod · 0.80
sinMethod · 0.80
tanMethod · 0.80
tanhMethod · 0.80
test.jsFile · 0.80

Calls 4

complexMethod · 0.95
cosMethod · 0.80
coshMethod · 0.80
sinMethod · 0.80

Tested by

no test coverage detected