Create arithmetic algorithm