/** * High-Precision Math Primitives for Vedic Astrology * * All planetary longitude, Ayanamsa, and divisional chart arithmetic * MUST flow through these functions. Native JS Number is only permitted * at WASM/external API boundaries. * * Precision: 34 significant digits (exceeds IEEE-754 double by ~18 digits). * Rounding: ROUND_HALF_EVEN (banker's rounding — minimises statistical bias). */ import { Decimal } from 'decimal.js'; export { Decimal }; export declare const D360: Decimal; export declare const D180: Decimal; export declare const D90: Decimal; export declare const D30: Decimal; export declare const D27: Decimal; export declare const D12: Decimal; export declare const D6: Decimal; export declare const D0: Decimal; export declare const D1: Decimal; /** Exact Nakshatra span: 360/27 = 13.333...° */ export declare const NAKSHATRA_SPAN_D: Decimal; /** Nakshatra span as number (display only — do NOT use in calculations). */ export declare const NAKSHATRA_SPAN_N: number; /** Dasha year: Tropical Year = 365.242189623 days (pyjhora standard). */ export declare const DASHA_YEAR_DAYS: Decimal; /** Dasha year in milliseconds. */ export declare const DASHA_YEAR_MS: Decimal; /** Normalise a Decimal angle to [0, 360). Handles negatives and values > 360. */ export declare function normalize360D(angle: Decimal): Decimal; /** Normalise a number angle to [0, 360) via Decimal — eliminates IEEE-754 drift. */ export declare function normalize360N(angle: number): number; /** Shortest arc between two angles (always ≥ 0, ≤ 180). */ export declare function shortestArcD(a: Decimal, b: Decimal): Decimal; /** * Degrees-Minutes-Seconds → Decimal degrees. * Sign is inferred from the first non-zero signed component. */ export declare function dmsToDecimalD(d: number, m: number, s: number): Decimal; /** * Decimal degrees → { d, m, s }. * `s` is returned as a Decimal to preserve sub-arc-second resolution. */ export declare function decimalToDmsD(deg: Decimal): { d: number; m: number; s: Decimal; }; /** * Midpoint of two angles on a circle — always takes the shorter arc. * Correctly handles the 350°/10° wraparound. */ export declare function midpointD(a: Decimal, b: Decimal): Decimal; /** Construct a Decimal from number or string. Alias: keeps calling code brief. */ export declare function D(value: number | string): Decimal; /** Convert Decimal to number at an output/API boundary. */ export declare function toNum(d: Decimal): number;