eris.decimal.conv

Conversion of floating-point decimals to/from strings.

An implementation of the General Decimal Arithmetic Specification.

Members

Functions

abstractForm
string abstractForm(D num)

Returns an abstract string representation of a number. The abstract representation is described in the specification. (p. 9-12)

engForm
string engForm(D num)

Converts a decimal number to a string using "engineering" notation, per the spec.

fromBid
D fromBid(U bid)
Undocumented in source. Be warned that the author may not have intended to support it.
fromBinary
D fromBinary(U bin)
Undocumented in source. Be warned that the author may not have intended to support it.
fromString
D fromString(string inStr, bool round)

Converts a string into a decimal number. This departs from the specification in that the coefficient string may contain underscores. A leading or trailing "." is allowed by the specification even though not valid as a D language real.

fullForm
string fullForm(D num)

Returns a full, exact representation of a number. Similar to abstractForm, but it provides a valid string that can be converted back into a number.

sciForm
string sciForm(D num)

Converts a decimal number to a string using "scientific" notation, per the spec.

to
T to(BigInt x)

to!string(BigInt).

toBid
U toBid(D num)

binary integer decimal form

toString
string toString(D num, string fmStr)

Returns a string representing the value of the number, formatted as specified by the format string.

Manifest constants

DEFAULT_PRECISION
enum DEFAULT_PRECISION;
Undocumented in source.

Structs

BiD16Rep
struct BiD16Rep
Undocumented in source.
Bid32Rep
struct Bid32Rep
Undocumented in source.
RealRep
struct RealRep
Undocumented in source.

Meta

Authors

Paul D. Anderson

Standards

Conforms to the General Decimal Arithmetic Specification, Version 1.70, (25 March 2009).

License

<a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>