xref: /PHP-8.2/ext/bcmath/tests/scale_ini.phpt (revision 56f90492)
1--TEST--
2BCMath functions return result with default scale
3--EXTENSIONS--
4bcmath
5--INI--
6bcmath.scale = 5
7--FILE--
8<?php
9echo
10    'bcadd:    ', bcadd('2', '1'), PHP_EOL,
11    'bcdiv:    ', bcdiv('2', '1'), PHP_EOL,
12    'bcmul:    ', bcmul('2', '1'), PHP_EOL,
13    'bcpow:    ', bcpow('2', '1'), PHP_EOL,
14    'bcpowmod: ', bcpowmod('2', '1', '3'), PHP_EOL,
15    'bcsqrt:   ', bcsqrt('4'), PHP_EOL,
16    'bcsub:    ', bcsub('2', '1'), PHP_EOL;
17?>
18--EXPECT--
19bcadd:    3.00000
20bcdiv:    2.00000
21bcmul:    2.00000
22bcpow:    2.00000
23bcpowmod: 2.00000
24bcsqrt:   2.00000
25bcsub:    1.00000
26