@fable-org/fable-library-js
Version:
Core library used by F# projects compiled with fable.io
64 lines (63 loc) • 3.72 kB
TypeScript
import Decimal from "./lib/big.js";
import { FSharpRef } from "./Types.js";
import { int8, uint8, int16, uint16, int32, uint32, float16, float32, float64 } from "./Int32.js";
import { int64, uint64, int128, uint128, nativeint, unativeint } from "./BigInt.js";
export default Decimal;
export type decimal = Decimal;
export declare const get_Zero: Decimal;
export declare const get_One: Decimal;
export declare const get_MinusOne: Decimal;
export declare const get_MaxValue: Decimal;
export declare const get_MinValue: Decimal;
export declare function compare(x: Decimal, y: Decimal): import("./lib/big.js").Comparison;
export declare function equals(x: Decimal, y: Decimal): boolean;
export declare function abs(x: Decimal): Decimal;
export declare function sign(x: Decimal): number;
export declare function max(x: Decimal, y: Decimal): Decimal;
export declare function min(x: Decimal, y: Decimal): Decimal;
export declare function maxMagnitude(x: Decimal, y: Decimal): Decimal;
export declare function minMagnitude(x: Decimal, y: Decimal): Decimal;
export declare function clamp(x: Decimal, min: Decimal, max: Decimal): Decimal;
export declare function round(x: Decimal, digits?: number): Decimal;
export declare function truncate(x: Decimal): Decimal;
export declare function ceiling(x: Decimal): Decimal;
export declare function floor(x: Decimal): Decimal;
export declare function pow(x: Decimal, n: number): Decimal;
export declare function sqrt(x: Decimal): Decimal;
export declare function op_Addition(x: Decimal, y: Decimal): Decimal;
export declare function op_Subtraction(x: Decimal, y: Decimal): Decimal;
export declare function op_Multiply(x: Decimal, y: Decimal): Decimal;
export declare function op_Division(x: Decimal, y: Decimal): Decimal;
export declare function op_Modulus(x: Decimal, y: Decimal): Decimal;
export declare function op_UnaryNegation(x: Decimal): Decimal;
export declare function op_UnaryPlus(x: Decimal): Decimal;
export declare const add: typeof op_Addition;
export declare const subtract: typeof op_Subtraction;
export declare const multiply: typeof op_Multiply;
export declare const divide: typeof op_Division;
export declare const remainder: typeof op_Modulus;
export declare const negate: typeof op_UnaryNegation;
export declare function toString(x: Decimal): string;
export declare function tryParse(str: string, defValue: FSharpRef<Decimal>): boolean;
export declare function parse(str: string): Decimal;
export declare function toNumber(x: Decimal): number;
export declare function toChar(x: Decimal): string;
export declare function toInt8(x: Decimal): int8;
export declare function toUInt8(x: Decimal): uint8;
export declare function toInt16(x: Decimal): int16;
export declare function toUInt16(x: Decimal): uint16;
export declare function toInt32(x: Decimal): int32;
export declare function toUInt32(x: Decimal): uint32;
export declare function toInt64(x: Decimal): int64;
export declare function toUInt64(x: Decimal): uint64;
export declare function toInt128(x: Decimal): int128;
export declare function toUInt128(x: Decimal): uint128;
export declare function toNativeInt(x: Decimal): nativeint;
export declare function toUNativeInt(x: Decimal): unativeint;
export declare function toFloat16(x: Decimal): float16;
export declare function toFloat32(x: Decimal): float32;
export declare function toFloat64(x: Decimal): float64;
export declare function fromIntArray(bits: ArrayLike<number>): Decimal;
export declare function fromInts(low: number, mid: number, high: number, signExp: number): Decimal;
export declare function fromParts(low: number, mid: number, high: number, isNegative: boolean, scale: number): Decimal;
export declare function getBits(d: Decimal): number[];