BC Math Functions
PHP Manual

bcdiv

(PHP 4, PHP 5)

bcdivتقسیم دو عدد با دقت دلخواه

Description

string bcdiv ( string $left_operand , string $right_operand [, int $scale ] )

تقسیم left_operand بر right_operand.

Parameters

left_operand

عملگر چپ به عنوان رشته.

right_operand

عملگر راست به عنوان رشته.

scale

This optional parameter is used to set the number of digits after the decimal place in the result. You can also set the global default scale for all functions by using bcscale().

Return Values

بازگرداندن نتیجه به عنوان رشته یا NULL اگر right_operand برابر با 0 باشد.

Examples

Example #1 مثال bcdiv()

<?php

echo bcdiv('105''6.55957'3);  // 16.007

?>

See Also


BC Math Functions
PHP Manual