2016-08-16 12:00:19 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
return [
|
|
|
|
[
|
|
|
|
'101100101',
|
2017-01-23 05:49:10 +00:00
|
|
|
357,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// Too large
|
|
|
|
[
|
|
|
|
'#NUM!',
|
2017-01-23 05:49:10 +00:00
|
|
|
512,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// Too small
|
|
|
|
[
|
|
|
|
'#NUM!',
|
2017-01-23 05:49:10 +00:00
|
|
|
-513,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'1001',
|
2016-08-16 12:00:19 +00:00
|
|
|
9,
|
|
|
|
4,
|
|
|
|
],
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'00001001',
|
2016-08-16 12:00:19 +00:00
|
|
|
9,
|
|
|
|
8,
|
|
|
|
],
|
|
|
|
// Leading places as a float
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'001001',
|
2016-08-16 12:00:19 +00:00
|
|
|
9,
|
|
|
|
6.75,
|
|
|
|
],
|
|
|
|
// Leading places negative
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'#NUM!',
|
2016-08-16 12:00:19 +00:00
|
|
|
9,
|
|
|
|
-1,
|
|
|
|
],
|
|
|
|
// Leading places non-numeric
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'#VALUE!',
|
2016-08-16 12:00:19 +00:00
|
|
|
9,
|
|
|
|
'ABC',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'11110110',
|
2017-01-23 05:49:10 +00:00
|
|
|
246,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'#NUM!',
|
2017-01-23 05:49:10 +00:00
|
|
|
12345,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'#NUM!',
|
2017-01-23 05:49:10 +00:00
|
|
|
123456789,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'1111011',
|
2017-01-23 05:49:10 +00:00
|
|
|
123.45,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'0',
|
2017-01-23 05:49:10 +00:00
|
|
|
0,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// Invalid decimal
|
|
|
|
[
|
|
|
|
'#VALUE!',
|
2017-01-23 05:49:10 +00:00
|
|
|
'3579A',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// Non string
|
|
|
|
[
|
|
|
|
'#VALUE!',
|
2017-01-23 05:49:10 +00:00
|
|
|
true,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// 2's Complement
|
|
|
|
[
|
|
|
|
'1110011100',
|
2017-01-23 05:49:10 +00:00
|
|
|
-100,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// 2's Complement
|
|
|
|
[
|
|
|
|
'1110010101',
|
2017-01-23 05:49:10 +00:00
|
|
|
-107,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// 2's Complement
|
|
|
|
[
|
|
|
|
'1000000000',
|
2017-01-23 05:49:10 +00:00
|
|
|
-512,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
];
|