PhpSpreadsheet/tests/data/Calculation/Engineering
oleibman 30c880b5e6
Bitwise Functions and 32-bit (#1900)
* Bitwise Functions and 32-bit

When running the test suite with 32-bit PHP, a failure was reported in BITLSHIFT.
In fact, all of the following are vulnerable to problems, and didn't report
any failures only because of a scarcity of tests:
- BITAND
- BITOR
- BITXOR
- BITRSHIFT
- BITLSHIFT

Those last 2 can be resolved fairly easily by using multiplication by a power of 2
rather than shifting. The first 3 are a tougher nut to crack, and I will continue
to think how they might best be approached. For now, I have added skippable tests
for each of them, which at least documents the problem.

Aside from adding many new tests, some bugs were correctd:
- The function list in Calculation.php pointed BITXOR to BITOR.
- All 5 functions allow null/false/true parameters.
- BIT*SHIFT shift amount must be numeric, can be negative, allows decimal portion
(which is truncated to integer), and has an absolute value limit of 53.
- Because BITRSHIFT allows negative shift amount, its result can overflow
(in which case return NAN).
- All 5 functions disallow negative parameters (except ...SHIFT second parameter).
This was coded, but the code had been thwarted by an earlier is_int test.

* Full Support for AND/OR/XOR on 32-bit

Previous version did not support operands 2**32 through 2**48.
2021-03-14 20:05:31 +01:00
..
BESSELI.php Refactor engineering tests (#1106) 2019-07-25 21:02:41 +02:00
BESSELJ.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
BESSELK.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
BESSELY.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
BIN2DEC.php Improve Coverage of BIN2DEC etc. (#1902) 2021-03-14 20:04:50 +01:00
BIN2HEX.php Improve Coverage of BIN2DEC etc. (#1902) 2021-03-14 20:04:50 +01:00
BIN2OCT.php Improve Coverage of BIN2DEC etc. (#1902) 2021-03-14 20:04:50 +01:00
BITAND.php Bitwise Functions and 32-bit (#1900) 2021-03-14 20:05:31 +01:00
BITLSHIFT.php Bitwise Functions and 32-bit (#1900) 2021-03-14 20:05:31 +01:00
BITOR.php Bitwise Functions and 32-bit (#1900) 2021-03-14 20:05:31 +01:00
BITRSHIFT.php Bitwise Functions and 32-bit (#1900) 2021-03-14 20:05:31 +01:00
BITXOR.php Bitwise Functions and 32-bit (#1900) 2021-03-14 20:05:31 +01:00
COMPLEX.php Refactor engineering tests (#1106) 2019-07-25 21:02:41 +02:00
CONVERTUOM.php Additional Unit Test Cases for Convert UoM (#1864) 2021-02-19 08:41:26 +01:00
DEC2BIN.php Improve Coverage of BIN2DEC etc. (#1902) 2021-03-14 20:04:50 +01:00
DEC2HEX.php Improve Coverage of BIN2DEC etc. (#1902) 2021-03-14 20:04:50 +01:00
DEC2OCT.php Improve Coverage of BIN2DEC etc. (#1902) 2021-03-14 20:04:50 +01:00
DELTA.php Extract DELTA() and GESTEP() functions from the Engineering class into a dedicated Comparison classes (#1853) 2021-02-13 20:52:20 +01:00
ERF.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
ERFC.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
ERFPRECISE.php Add further new Functions introduced in MS Excel 2013 and 2016 (#608) 2018-07-22 19:17:04 +01:00
GESTEP.php Extract DELTA() and GESTEP() functions from the Engineering class into a dedicated Comparison classes (#1853) 2021-02-13 20:52:20 +01:00
HEX2BIN.php Improve Coverage of BIN2DEC etc. (#1902) 2021-03-14 20:04:50 +01:00
HEX2DEC.php Improve Coverage of BIN2DEC etc. (#1902) 2021-03-14 20:04:50 +01:00
HEX2OCT.php Improve Coverage of BIN2DEC etc. (#1902) 2021-03-14 20:04:50 +01:00
IMABS.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
IMAGINARY.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
IMARGUMENT.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
IMCONJUGATE.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
IMCOS.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
IMCOSH.php Add new Complex Number Functions introduced in MS Excel 2013 (#601) 2018-07-25 14:38:44 +01:00
IMCOT.php Add new Complex Number Functions introduced in MS Excel 2013 (#601) 2018-07-25 14:38:44 +01:00
IMCSC.php Add new Complex Number Functions introduced in MS Excel 2013 (#601) 2018-07-25 14:38:44 +01:00
IMCSCH.php Add new Complex Number Functions introduced in MS Excel 2013 (#601) 2018-07-25 14:38:44 +01:00
IMDIV.php Add new Complex Number Functions introduced in MS Excel 2013 (#601) 2018-07-25 14:38:44 +01:00
IMEXP.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
IMLN.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
IMLOG2.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
IMLOG10.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
IMPOWER.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
IMPRODUCT.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
IMREAL.php Add new Complex Number Functions introduced in MS Excel 2013 (#601) 2018-07-25 14:38:44 +01:00
IMSEC.php Add new Complex Number Functions introduced in MS Excel 2013 (#601) 2018-07-25 14:38:44 +01:00
IMSECH.php Add new Complex Number Functions introduced in MS Excel 2013 (#601) 2018-07-25 14:38:44 +01:00
IMSIN.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
IMSINH.php Add new Complex Number Functions introduced in MS Excel 2013 (#601) 2018-07-25 14:38:44 +01:00
IMSQRT.php Add new Complex Number Functions introduced in MS Excel 2013 (#601) 2018-07-25 14:38:44 +01:00
IMSUB.php Add new Complex Number Functions introduced in MS Excel 2013 (#601) 2018-07-25 14:38:44 +01:00
IMSUM.php Use proper syntax for variadic functions 2017-01-23 15:01:20 +09:00
IMTAN.php Add new Complex Number Functions introduced in MS Excel 2013 (#601) 2018-07-25 14:38:44 +01:00
OCT2BIN.php Improve Coverage of BIN2DEC etc. (#1902) 2021-03-14 20:04:50 +01:00
OCT2DEC.php Improve Coverage of BIN2DEC etc. (#1902) 2021-03-14 20:04:50 +01:00
OCT2HEX.php Improve Coverage of BIN2DEC etc. (#1902) 2021-03-14 20:04:50 +01:00