JordanRL / Fermat

A library providing math and statistics operations for numbers of arbitrary size.
GNU General Public License v2.0
65 stars 6 forks source link

Added Formatting Options for Import/Export #137

Closed JordanRL closed 1 year ago

JordanRL commented 1 year ago

Formatting is divided into Formats and Groupings. The Formats determine what combination of radix characters and grouping characters are used, as well as how positive and negative numbers are expressed.

The Groupings determine how number groups are structured.

The following formats are available:

Groupings

NumberGrouping::Standard

The integer part is grouped in 3s.

NumberGrouping::Indian

The integer part is grouped into 3 for the first group, and 2s for each subsequent group.

Formats

NumberFormat::English

Radix: . Delimeter: , Positive: Negative: -

NumberFormat::EnglishFinance

Radix: . Delimeter: , Positive: + Negative: (#)

NumberFormat::European

Radix: , Delimeter: . Positive: Negative: -

NumberFormat::EuropeanFinance

Radix: , Delimeter: . Positive: + Negative: (#)

NumberFormat::Technical

Radix: . Delimeter: ' ' Positive: Negative: -

NumberFormat::TechnicalFinance

Radix: . Delimeter: ' ' Positive: + Negative: (#)