Trusted answers to developer questions

Harris Amjad

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.

The **acosh()****function** returns the inverse hyperbolic cosine of a number.

We can see the mathematical representation of the `acosh()`

function below.

$acosh(x) =ln(x+√(x^{2}-1))$ |
---|

Note:`std.math`

is required for this function.

```
acosh(number) //number can be real, float, or double.
```

This function requires a number as a parameter. The value of the parameter should be greater than or equal to 1.

`acosh()`

returns the inverse hyperbolic cosine of a number that is sent as a parameter.

The following code shows how to use the `acosh()`

function in D.

import core.stdc.stdio;import std.stdio;//header required for functionimport std.math;int main() {//positive numberwriteln("The value of acosh(1.5) :", acosh(1.5));// 1writeln("The value of acosh(1.0) :", acosh(1.0));//less than 1writeln("The value of acosh(0.0): ",acosh(0.0) );writeln("The value of acosh(-1.5): ",acosh(-1.5) );return 0;}

- Line 4: We add the
`std.math`

header required for`acosh()`

function. - Line 8: We calculate the inverse hyperbolic cosine of the positive number greater than 1 using
`acosh()`

. - Line 11: We calculate inverse hyperbolic cosine of 1 using
`acosh()`

.

- Lines 14–15: We calculate the inverse hyperbolic cosine of the number less than 1 using
`acosh()`

.

RELATED TAGS

d

acosh

communitycreator

CONTRIBUTOR

Harris Amjad

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.

Keep Exploring

Related Courses