Preparation of a function, even to the importation of n, the function call seeking +1/n 1/2+1/4+ .... When n is odd input, the function call 1/1+1/3+ ... +1/n (using function pointer)
假定已經(jīng)有許多應(yīng)用采用了程序1 - 1 5中所定義的C u r r e n c y類(lèi),現(xiàn)在我們想要對(duì)C u r r e n c y類(lèi)
的描述進(jìn)行修改,使其應(yīng)用頻率最高的兩個(gè)函數(shù)A d d和I n c r e m e n t可以運(yùn)行得更快,從而提高應(yīng)
用程序的執(zhí)行速度。由于用戶(hù)僅能通過(guò)p u b l i c部分所提供的接口與C u r r e n c y類(lèi)進(jìn)行交互,