UNPKG

@stellar/stellar-sdk

Version:

A library for working with the Stellar network, including communication with the Horizon and Soroban RPC servers.

10 lines (9 loc) 416 B
import type { BigNumber } from "./bignumber.js"; /** * Calculates and returns the best rational approximation of the given real * number as `[n, d]` where `n` is the numerator and `d` is the denominator. * * @param rawNumber - real number to approximate * @throws when the best rational approximation cannot be found */ export declare function best_r(rawNumber: BigNumber | number | string): [number, number];