(x: Interval | IntervalResult)
| 396 | } |
| 397 | |
| 398 | /** |
| 399 | * Inverse hyperbolic cosine. |
| 400 | * |
| 401 | * Domain: [1, +Infinity) |
| 402 | */ |
| 403 | export function acosh(x: Interval | IntervalResult): IntervalResult { |
| 404 | const unwrapped = unwrapOrPropagate(x); |
| 405 | if (!Array.isArray(unwrapped)) return unwrapped; |
| 406 | const [xVal] = unwrapped; |
| 407 | if (xVal.hi < 1) { |
| 408 | return { kind: 'empty' }; |
| 409 | } |
| 410 | |
| 411 | if (xVal.lo < 1) { |
| 412 | return { |
| 413 | kind: 'partial', |
| 414 | value: { lo: 0, hi: Math.acosh(xVal.hi) }, |
| 415 | domainClipped: 'lo', |
| 416 | }; |
| 417 | } |
| 418 |
no test coverage detected