BC高精準度函式庫

bccomp

(PHP3 , PHP4)

bccomp ---  比較二個高精準度數字

語法 : int bccomp(string left operand, string right operand [ , int scale] );

說明 : 

比較參數left operandright operand,且傳回值為整數。參數scale是非必需的,scale是用來設定傳回的值到小數點第幾位。若二個數相等則傳回值為0,若left operand大於right operand則傳回值為+1,若left operand小於right operand則傳回值為-1


上一頁 首頁 下一頁