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