bcscale

(PHP 3, PHP 4, PHP 5)

bcscale -- Set default scale parameter for all bc math functions

Description

bool bcscale ( int scale )

Sets the default scale parameter for all subsequent bc math functions that do not explicitly specify a scale parameter.

Parameters

scale

The scale factor.

Return Values

Returns TRUE on success or FALSE on failure.

Examples

Example 1. bcscale() example

<?php

// default scale : 3
bcscale(3);
echo
bcdiv('105', '6.55957'); // 16.007

// this is the same without bcscale()
echo bcdiv('105', '6.55957', 3); // 16.007

?>


Follow phpf1 on Twitter




F1 Site Family
AJAX F1
CSS F1
Database F1
Flash F1
HTML F1
Java F1
JavaScript F1
PhotoShop F1
PHP F1
Scripts F1
Tutorial F1
Windows F1

Total time: 0.4181