primitive calculator