binaryFixedPointToString
Returns the canonical decimal string representation of a BinaryFixedPoint.
Because 1 / 2 ** fractionalBits has a finite decimal expansion, the
default output is always exact. This means that values with many
fractionalBits can produce long strings — pass options.decimals to
cap the output at a desired precision, optionally with a
RoundingMode. Use options.padTrailingZeros to emit exactly as
many fractional digits as requested; when decimals is omitted, this
pads to value.fractionalBits (the full exact expansion length).
Throws SOLANA_ERROR__FIXED_POINTS__STRICT_MODE_PRECISION_LOSS when
options.decimals forces a lossy rescale under the default 'strict'
rounding mode.
Parameters
| Parameter | Type |
|---|---|
value | BinaryFixedPoint<Signedness, number, number> |
options? | FixedPointToStringOptions |
Returns
string