@ -563,7 +563,7 @@ to_exclusive = <range>.stop
< / code > < / pre > < / div >
< div > < h2 id = "numbers" > < a href = "#numbers" name = "numbers" > #< / a > Numbers< / h2 > < div > < h3 id = "types" > Types< / h3 > < pre > < code class = "python language-python hljs" > < int> = int(< float/str/bool> ) < span class = "hljs-comment" > # Or: math.floor(< float> )< / span >
< float> = float(< int/str/bool> )
< float> = float(< int/str/bool> ) < span class = "hljs-comment" > # Or: < real> ±e< int> < / span >
< complex> = complex(real=< span class = "hljs-number" > 0< / span > , imag=< span class = "hljs-number" > 0< / span > ) < span class = "hljs-comment" > # Or: < real> + < real> j< / span >
< Fraction> = fractions.Fraction(numerator=< span class = "hljs-number" > 0< / span > , denominator=< span class = "hljs-number" > 1< / span > )
< Decimal> = decimal.Decimal(< str/int/float> )
@ -576,9 +576,8 @@ to_exclusive = <range>.stop
< li > < strong > Precision of decimal operations is set with: < code class = "python hljs" > < span class = "hljs-string" > 'decimal.getcontext().prec = < int> '< / span > < / code > .< / strong > < / li >
< / ul >
< div > < h3 id = "basicfunctions" > Basic Functions< / h3 > < pre > < code class = "python language-python hljs" > < num> = pow(< num> , < num> ) < span class = "hljs-comment" > # Or: < num> ** < num> < / span >
< num> = abs(< num> )
< int> = round(< num> )
< num> = round(< num> , ±ndigits) < span class = "hljs-comment" > # `round(126, -1) == 130`< / span >
< num> = abs(< num> ) < span class = "hljs-comment" > # < float> = abs(< complex> )< / span >
< num> = round(< num> [, ±ndigits]) < span class = "hljs-comment" > # `round(126, -1) == 130`< / span >
< / code > < / pre > < / div >
< div > < h3 id = "math" > Math< / h3 > < pre > < code class = "python language-python hljs" > < span class = "hljs-keyword" > from< / span > math < span class = "hljs-keyword" > import< / span > e, pi, inf, nan