xref: /PHP-7.4/ext/bcmath/tests/scale_ini.phpt (revision 870ed510)
1--TEST--
2BCMath functions return result with default scale
3--SKIPIF--
4<?php
5if (!extension_loaded('bcmath')) die('skip bcmath extension not available');
6?>
7--INI--
8bcmath.scale = 5
9--FILE--
10<?php
11echo
12    'bcadd:    ', bcadd('2', '1'), PHP_EOL,
13    'bcdiv:    ', bcdiv('2', '1'), PHP_EOL,
14    'bcmul:    ', bcmul('2', '1'), PHP_EOL,
15    'bcpow:    ', bcpow('2', '1'), PHP_EOL,
16    'bcpowmod: ', bcpowmod('2', '1', '3'), PHP_EOL,
17    'bcsqrt:   ', bcsqrt('4'), PHP_EOL,
18    'bcsub:    ', bcsub('2', '1'), PHP_EOL;
19?>
20===DONE===
21--EXPECT--
22bcadd:    3.00000
23bcdiv:    2.00000
24bcmul:    2.00000
25bcpow:    2.00000
26bcpowmod: 2.00000
27bcsqrt:   2.00000
28bcsub:    1.00000
29===DONE===
30