(x: Interval | IntervalResult)
| 496 | } |
| 497 | |
| 498 | /** |
| 499 | * Hyperbolic cotangent: coth(x) = cosh(x)/sinh(x). |
| 500 | * |
| 501 | * Has a singularity at x = 0. |
| 502 | */ |
| 503 | export function coth(x: Interval | IntervalResult): IntervalResult { |
| 504 | const unwrapped = unwrapOrPropagate(x); |
| 505 | if (!Array.isArray(unwrapped)) return unwrapped; |
| 506 | const [xVal] = unwrapped; |
| 507 | if (containsZero(xVal)) { |
| 508 | return { kind: 'singular', at: 0 }; |
| 509 | } |
no test coverage detected