Distance from a complex number to the nearest (real) integer.
(x: Complex)
| 596 | return new Complex(re === 0 ? 0 : re, im === 0 ? 0 : im); |
| 597 | } |
| 598 | |
| 599 | /** The principal value of `arcsin z`. Accurate for a large or a small `|z|`. */ |
| 600 | export function complexAsin(z: Complex): Complex { |
| 601 | if (!isFiniteComplex(z.re, z.im)) return z.asin(); |
| 602 | const [re, im] = asinCore(z.re, z.im === 0 ? realAxisZero(z.re) : z.im); |
| 603 | return new Complex(re, im); |
| 604 | } |
no test coverage detected