Added some Prolog arithmetic functions