Grokking Modern System Design Interview for Engineers & Managers
Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.
Math
is a built-in object in JavaScript that contains different methods and properties to perform mathematical operations. It contains the cosh()
function, which is used to compute the hyperbolic cosine of a specified angle.
Math.cosh(param);
param
: This is the angle for which we want to compute the hyperbolic cosine. Its type is Number
and it is measured in radians.
Number
in JavaScript is a 64-bit double-precision value which is the same asdouble
in C# or Java.
Number
: It returns the hyperbolic cosine of the given angle stored in param
. It is of the Number
type.
Infinity
: The function returns this for positive and negative Infinity
.
Use the following formula to convert degrees to radians.
- Radians = Degrees x
π
/180where
π
= 3.14159, approximately.
console.log("cosh(-1) = " + Math.cosh(-1));console.log("cosh(0) = " + Math.cosh(0));console.log("cosh(1) = " + Math.cosh(1));console.log("cosh(∞) = " + Math.cosh(Infinity));console.log("cosh(-∞) = " + Math.cosh(-Infinity));
RELATED TAGS
CONTRIBUTOR
Grokking Modern System Design Interview for Engineers & Managers
Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.