Kingsway to Python: Arithmetics


ar00.py - integer arithmetics

ar01.py - strange arithmetics

ar02.py - input of integers

ar03.py - print in hex and octal presentations

ar04.py - intwithradix - transform string to integer in different base

ar05.py - integer in integer power

ar08.py - casting of strings to long

ar09.py - longs have unlimited precision: factorial

ar10.py - Mersenn numbers (2**n - 1)

ar14.py - floating point numbers arithmetics

ar15.py - input of floating point numbers

ar16.py - integers casting to floats

ar17.py - floating point number power

ar18.py - Euler's number e

ar19.py - rounding of floating point number: round(x, n)

ar20.py - functions min(x,y) and max(x,y)

ar22.py - hex() called for floating point number

ar23.py - function float.as_integer_ratio()

ar24.py - function float.fromhex(string)

ar25.py - comparing two floating numbers function cmp(x,y)

ar27.py - fractions: constructors and printing

ar28.py - fractions: arithmetics +,-,*,/

ar29.py - fractions: methods from_float and gcd

ar30.py - fractions: method limit_denominator

ar35.py - bit shifts: << and >>

ar36.py - bitwise operation NOT (~)

ar37.py - bitwise operation AND( & )

ar38.py - select separate bit: second from the left (small indian)

ar39.py - bitwise operation OR ( | )

ar40.py - set separate bit to 1 in a word

ar42.py - bitwise operation XOR ( ^ ) in development ...