xref: /PHP-8.0/ext/bcmath/tests/scale_ini.phpt (revision a555cc0b)
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--EXPECT--
21bcadd:    3.00000
22bcdiv:    2.00000
23bcmul:    2.00000
24bcpow:    2.00000
25bcpowmod: 2.00000
26bcsqrt:   2.00000
27bcsub:    1.00000
28