Calculate cube of a number (#830)