brick / math

Arbitrary-precision arithmetic library for PHP
MIT License
1.78k stars 75 forks source link

Output a BigRational in decimal form with period #74

Open BenMorel opened 1 year ago

BenMorel commented 1 year ago

It could be nice to provide a way to output a BigRational as a decimal number with its decimal period.

For example, 10/3 could be output as 3.(3), while 171/70 could be output as 2.4(428571). (Not sure about the correct format here, is there a standard for this?)