/** * Typed Complex Helper Functions * * Polymorphic complex-number utilities using typed-function for runtime dispatch. * Supports `number`, `bigint`, `BigNumber`, `Complex`, and `Array` types. * * Semantics follow the mathjs convention: * - `arg(number)` → `Math.atan2(0, number)` — 0 for positive, π for negative, 0 for 0, NaN for NaN. * - `conj(real)` → identity (real numbers are self-conjugate). * - `im(real)` → 0 (real numbers have no imaginary part). * - `re(real)` → the number itself. * * @packageDocumentation */ /** * Compute the argument (phase angle in radians) of a complex number or real value. * * For a complex number `a + bi`, the argument is `atan2(b, a)`. * For a real number `x`, the result is `atan2(0, x)`: * - `x > 0` → 0 * - `x < 0` → π * - `x = 0` → 0 (mathjs convention, not -π) * - `x = NaN` → NaN * * For arrays, the function is applied element-wise. * * @example * ```typescript * arg(1) // 0 * arg(-1) // Math.PI * arg(new Complex(1, 1)) // Math.PI / 4 * arg([1, -1, new Complex(0, 1)]) // [0, Math.PI, Math.PI / 2] * ``` */ export declare const arg: import("@danielsimonjr/mathts-core").TypedFunction; /** * Compute the complex conjugate of a value. * For a complex number `a + bi`, the conjugate is `a - bi`. * For real numbers (number, bigint, BigNumber), the value is returned as-is * (real numbers are self-conjugate). * * For arrays, the function is applied element-wise. * * @example * ```typescript * conj(5) // 5 * conj(new Complex(3, 4)) // Complex(3, -4) * conj([new Complex(1, 2), 3]) // [Complex(1, -2), 3] * ``` */ export declare const conj: import("@danielsimonjr/mathts-core").TypedFunction; /** * Get the imaginary part of a complex number. * For a complex number `a + bi`, the function returns `b`. * For real numbers (number, bigint, BigNumber), returns 0. * * For arrays, the function is applied element-wise. * * @example * ```typescript * im(new Complex(3, 4)) // 4 * im(5) // 0 * im([new Complex(1, 2), 3]) // [2, 0] * ``` */ export declare const im: import("@danielsimonjr/mathts-core").TypedFunction; /** * Get the real part of a complex number. * For a complex number `a + bi`, the function returns `a`. * For real numbers (number, bigint, BigNumber), returns the value itself. * * For arrays, the function is applied element-wise. * * @example * ```typescript * re(new Complex(3, 4)) // 3 * re(5) // 5 * re([new Complex(1, 2), 3]) // [1, 3] * ``` */ export declare const re: import("@danielsimonjr/mathts-core").TypedFunction; /** * All typed complex helper functions. */ export declare const typedComplex: { arg: import("@danielsimonjr/mathts-core").TypedFunction; conj: import("@danielsimonjr/mathts-core").TypedFunction; im: import("@danielsimonjr/mathts-core").TypedFunction; re: import("@danielsimonjr/mathts-core").TypedFunction; }; //# sourceMappingURL=complex.d.ts.map