cube math function