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

Method cosh

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

Source from the content-addressed store, hash-verified

443 return result.length == 1 ? result[0] : result
444 }
445 cosh(n) {
446 if (n.isComplex) {
447 const a = n.a.toNumber()
448 const b = n.b.toNumber()
449
450 const re = Math.cos(b) * Math.cosh(a)
451 const im = Math.sin(b) * Math.sinh(a)
452
453 return this.complex(re, im)
454 }
455 if (typeof n != 'object' || BigNumber.isBigNumber(n)) {
456 n = BigNumber.isBigNumber(n) == true ? n.toNumber() : n
457 n = [n]
458 }
459 let result = []
460 for (var i = 0; i < n.length; i++) {
461 result.push(Math.cosh(n[i]).toFixed(15))
462 }
463 return result.length == 1 ? result[0] : result
464 }
465 deg2rad(x) {
466 return new BigNumber(x).times(this.pi).div(180)
467 }

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
sinMethod · 0.80
sinhMethod · 0.80
tanMethod · 0.80
tanhMethod · 0.80
test.jsFile · 0.80

Calls 4

complexMethod · 0.95
cosMethod · 0.80
sinMethod · 0.80
sinhMethod · 0.80

Tested by

no test coverage detected