# improve round article

    

diff --git a/notes-en/python-round.md b/notes-en/python-round.md
index 57d0fe5..2a8a53f 100644
--- a/notes-en/python-round.md
+++ b/notes-en/python-round.md
@@ -1,6 +1,10 @@
+
+(This post was originally published in [@pythonetc](https://t.me/pythonetc/325) telegram channel)
+
round function rounds a number to a given precision in decimal digits.

-
+python
>>> round(1.2)
1
>>> round(1.8)
@@ -11,16 +15,16 @@

Also you can set up negative precision:

-
+python
>>> round(413.77, -1)
410.0
>>> round(413.77, -2)
400.0


-round returns value of type of input number:
+round returns value of input number's type:

-
+python
>>> type(round(2, 1))

@@ -34,10 +38,9 @@ Also you can set up negative precision:



-
For your own classes you can define round processing with __round__ method:

-
+python
>>> class Number(int):
...   def __round__(self, p=-1000):
...     return p
@@ -50,7 +53,7 @@ For your own classes you can define round processing with __round__ method:

Values are rounded to the closest multiple of 10 ** (-precision). For example, for precision=1 value will be rounded to multiple of 0.1 (round(0.63, 1) returns 0.6). If two multiples are equally close, rounding is done toward the even choice:

-
+python
>>> round(0.5)
0
>>> round(1.5)
@@ -59,21 +62,21 @@ Values are rounded to the closest multiple of 10 ** (-precision). For example,

Sometimes rounding of floats can be a little bit surprising:

-
+python
>>> round(2.85, 1)
2.9


This is because most decimal fractions [can't be represented exactly as a float](https://docs.python.org/3.7/tutorial/floatingpoint.html):

-
+python
>>> format(2.85, '.64f')
'2.8500000000000000888178419700125232338905334472656250000000000000'


If you want to round half up you can use decimal.Decimal:

-
+python
>>> from decimal import Decimal, ROUND_HALF_UP
>>> Decimal(1.5).quantize(0, ROUND_HALF_UP)
Decimal('2')