A
A
Amarg02015-12-20 21:38:35
C++ / C#
Amarg0, 2015-12-20 21:38:35

How to display the period of a BigInteger?

There is a BigInteger numerator and a BigInteger denominator, i.e. fraction in its usual form. How to display as a decimal fraction, taking into account the fact that the fraction can be with an infinite period?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kovalsky, 2015-12-20
@dmitryKovalskiy

Rounding via Math.Round or Output Formatting - String.Format("{0:0.00}",x); where x is the result of the calculation. If you need it for further calculations, then the first option, and if just for output to the interface - the second.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question