wpdatatables
/
lib
/
phpoffice
/
phpspreadsheet
/
src
/
PhpSpreadsheet
/
Calculation
/
Engineering.php
Engineering.php in wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin 6.5.1.7, at lib/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php
| 1 | <?php |
| 2 | |
| 3 | namespace PhpOffice\PhpSpreadsheet\Calculation; |
| 4 | |
| 5 | use Complex\Complex; |
| 6 | use PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions; |
| 7 | use PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexOperations; |
| 8 | |
| 9 | /** |
| 10 | * @deprecated 1.18.0 |
| 11 | */ |
| 12 | class Engineering |
| 13 | { |
| 14 | /** |
| 15 | * EULER. |
| 16 | * |
| 17 | * @deprecated 1.18.0 |
| 18 | * Use Engineering\Constants::EULER instead |
| 19 | * @see Engineering\Constants::EULER |
| 20 | */ |
| 21 | public const EULER = 2.71828182845904523536; |
| 22 | |
| 23 | /** |
| 24 | * BESSELI. |
| 25 | * |
| 26 | * Returns the modified Bessel function In(x), which is equivalent to the Bessel function evaluated |
| 27 | * for purely imaginary arguments |
| 28 | * |
| 29 | * Excel Function: |
| 30 | * BESSELI(x,ord) |
| 31 | * |
| 32 | * @deprecated 1.17.0 |
| 33 | * Use the BESSELI() method in the Engineering\BesselI class instead |
| 34 | * @see Engineering\BesselI::BESSELI() |
| 35 | * |
| 36 | * @param float $x The value at which to evaluate the function. |
| 37 | * If x is nonnumeric, BESSELI returns the #VALUE! error value. |
| 38 | * @param int $ord The order of the Bessel function. |
| 39 | * If ord is not an integer, it is truncated. |
| 40 | * If $ord is nonnumeric, BESSELI returns the #VALUE! error value. |
| 41 | * If $ord < 0, BESSELI returns the #NUM! error value. |
| 42 | * |
| 43 | * @return array|float|string Result, or a string containing an error |
| 44 | */ |
| 45 | public static function BESSELI($x, $ord) |
| 46 | { |
| 47 | return Engineering\BesselI::BESSELI($x, $ord); |
| 48 | } |
| 49 | |
| 50 | /** |
| 51 | * BESSELJ. |
| 52 | * |
| 53 | * Returns the Bessel function |
| 54 | * |
| 55 | * Excel Function: |
| 56 | * BESSELJ(x,ord) |
| 57 | * |
| 58 | * @deprecated 1.17.0 |
| 59 | * Use the BESSELJ() method in the Engineering\BesselJ class instead |
| 60 | * @see Engineering\BesselJ::BESSELJ() |
| 61 | * |
| 62 | * @param float $x The value at which to evaluate the function. |
| 63 | * If x is nonnumeric, BESSELJ returns the #VALUE! error value. |
| 64 | * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated. |
| 65 | * If $ord is nonnumeric, BESSELJ returns the #VALUE! error value. |
| 66 | * If $ord < 0, BESSELJ returns the #NUM! error value. |
| 67 | * |
| 68 | * @return array|float|string Result, or a string containing an error |
| 69 | */ |
| 70 | public static function BESSELJ($x, $ord) |
| 71 | { |
| 72 | return Engineering\BesselJ::BESSELJ($x, $ord); |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * BESSELK. |
| 77 | * |
| 78 | * Returns the modified Bessel function Kn(x), which is equivalent to the Bessel functions evaluated |
| 79 | * for purely imaginary arguments. |
| 80 | * |
| 81 | * Excel Function: |
| 82 | * BESSELK(x,ord) |
| 83 | * |
| 84 | * @deprecated 1.17.0 |
| 85 | * Use the BESSELK() method in the Engineering\BesselK class instead |
| 86 | * @see Engineering\BesselK::BESSELK() |
| 87 | * |
| 88 | * @param float $x The value at which to evaluate the function. |
| 89 | * If x is nonnumeric, BESSELK returns the #VALUE! error value. |
| 90 | * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated. |
| 91 | * If $ord is nonnumeric, BESSELK returns the #VALUE! error value. |
| 92 | * If $ord < 0, BESSELK returns the #NUM! error value. |
| 93 | * |
| 94 | * @return array|float|string Result, or a string containing an error |
| 95 | */ |
| 96 | public static function BESSELK($x, $ord) |
| 97 | { |
| 98 | return Engineering\BesselK::BESSELK($x, $ord); |
| 99 | } |
| 100 | |
| 101 | /** |
| 102 | * BESSELY. |
| 103 | * |
| 104 | * Returns the Bessel function, which is also called the Weber function or the Neumann function. |
| 105 | * |
| 106 | * Excel Function: |
| 107 | * BESSELY(x,ord) |
| 108 | * |
| 109 | * @deprecated 1.17.0 |
| 110 | * Use the BESSELY() method in the Engineering\BesselY class instead |
| 111 | * @see Engineering\BesselY::BESSELY() |
| 112 | * |
| 113 | * @param float $x The value at which to evaluate the function. |
| 114 | * If x is nonnumeric, BESSELY returns the #VALUE! error value. |
| 115 | * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated. |
| 116 | * If $ord is nonnumeric, BESSELY returns the #VALUE! error value. |
| 117 | * If $ord < 0, BESSELY returns the #NUM! error value. |
| 118 | * |
| 119 | * @return array|float|string Result, or a string containing an error |
| 120 | */ |
| 121 | public static function BESSELY($x, $ord) |
| 122 | { |
| 123 | return Engineering\BesselY::BESSELY($x, $ord); |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * BINTODEC. |
| 128 | * |
| 129 | * Return a binary value as decimal. |
| 130 | * |
| 131 | * Excel Function: |
| 132 | * BIN2DEC(x) |
| 133 | * |
| 134 | * @deprecated 1.17.0 |
| 135 | * Use the toDecimal() method in the Engineering\ConvertBinary class instead |
| 136 | * @see Engineering\ConvertBinary::toDecimal() |
| 137 | * |
| 138 | * @param mixed $x The binary number (as a string) that you want to convert. The number |
| 139 | * cannot contain more than 10 characters (10 bits). The most significant |
| 140 | * bit of number is the sign bit. The remaining 9 bits are magnitude bits. |
| 141 | * Negative numbers are represented using two's-complement notation. |
| 142 | * If number is not a valid binary number, or if number contains more than |
| 143 | * 10 characters (10 bits), BIN2DEC returns the #NUM! error value. |
| 144 | * |
| 145 | * @return array|string |
| 146 | */ |
| 147 | public static function BINTODEC($x) |
| 148 | { |
| 149 | return Engineering\ConvertBinary::toDecimal($x); |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * BINTOHEX. |
| 154 | * |
| 155 | * Return a binary value as hex. |
| 156 | * |
| 157 | * Excel Function: |
| 158 | * BIN2HEX(x[,places]) |
| 159 | * |
| 160 | * @deprecated 1.17.0 |
| 161 | * Use the toHex() method in the Engineering\ConvertBinary class instead |
| 162 | * @see Engineering\ConvertBinary::toHex() |
| 163 | * |
| 164 | * @param mixed $x The binary number (as a string) that you want to convert. The number |
| 165 | * cannot contain more than 10 characters (10 bits). The most significant |
| 166 | * bit of number is the sign bit. The remaining 9 bits are magnitude bits. |
| 167 | * Negative numbers are represented using two's-complement notation. |
| 168 | * If number is not a valid binary number, or if number contains more than |
| 169 | * 10 characters (10 bits), BIN2HEX returns the #NUM! error value. |
| 170 | * @param mixed $places The number of characters to use. If places is omitted, BIN2HEX uses the |
| 171 | * minimum number of characters necessary. Places is useful for padding the |
| 172 | * return value with leading 0s (zeros). |
| 173 | * If places is not an integer, it is truncated. |
| 174 | * If places is nonnumeric, BIN2HEX returns the #VALUE! error value. |
| 175 | * If places is negative, BIN2HEX returns the #NUM! error value. |
| 176 | * |
| 177 | * @return array|string |
| 178 | */ |
| 179 | public static function BINTOHEX($x, $places = null) |
| 180 | { |
| 181 | return Engineering\ConvertBinary::toHex($x, $places); |
| 182 | } |
| 183 | |
| 184 | /** |
| 185 | * BINTOOCT. |
| 186 | * |
| 187 | * Return a binary value as octal. |
| 188 | * |
| 189 | * Excel Function: |
| 190 | * BIN2OCT(x[,places]) |
| 191 | * |
| 192 | * @deprecated 1.17.0 |
| 193 | * Use the toOctal() method in the Engineering\ConvertBinary class instead |
| 194 | * @see Engineering\ConvertBinary::toOctal() |
| 195 | * |
| 196 | * @param mixed $x The binary number (as a string) that you want to convert. The number |
| 197 | * cannot contain more than 10 characters (10 bits). The most significant |
| 198 | * bit of number is the sign bit. The remaining 9 bits are magnitude bits. |
| 199 | * Negative numbers are represented using two's-complement notation. |
| 200 | * If number is not a valid binary number, or if number contains more than |
| 201 | * 10 characters (10 bits), BIN2OCT returns the #NUM! error value. |
| 202 | * @param mixed $places The number of characters to use. If places is omitted, BIN2OCT uses the |
| 203 | * minimum number of characters necessary. Places is useful for padding the |
| 204 | * return value with leading 0s (zeros). |
| 205 | * If places is not an integer, it is truncated. |
| 206 | * If places is nonnumeric, BIN2OCT returns the #VALUE! error value. |
| 207 | * If places is negative, BIN2OCT returns the #NUM! error value. |
| 208 | * |
| 209 | * @return array|string |
| 210 | */ |
| 211 | public static function BINTOOCT($x, $places = null) |
| 212 | { |
| 213 | return Engineering\ConvertBinary::toOctal($x, $places); |
| 214 | } |
| 215 | |
| 216 | /** |
| 217 | * DECTOBIN. |
| 218 | * |
| 219 | * Return a decimal value as binary. |
| 220 | * |
| 221 | * Excel Function: |
| 222 | * DEC2BIN(x[,places]) |
| 223 | * |
| 224 | * @deprecated 1.17.0 |
| 225 | * Use the toBinary() method in the Engineering\ConvertDecimal class instead |
| 226 | * @see Engineering\ConvertDecimal::toBinary() |
| 227 | * |
| 228 | * @param mixed $x The decimal integer you want to convert. If number is negative, |
| 229 | * valid place values are ignored and DEC2BIN returns a 10-character |
| 230 | * (10-bit) binary number in which the most significant bit is the sign |
| 231 | * bit. The remaining 9 bits are magnitude bits. Negative numbers are |
| 232 | * represented using two's-complement notation. |
| 233 | * If number < -512 or if number > 511, DEC2BIN returns the #NUM! error |
| 234 | * value. |
| 235 | * If number is nonnumeric, DEC2BIN returns the #VALUE! error value. |
| 236 | * If DEC2BIN requires more than places characters, it returns the #NUM! |
| 237 | * error value. |
| 238 | * @param mixed $places The number of characters to use. If places is omitted, DEC2BIN uses |
| 239 | * the minimum number of characters necessary. Places is useful for |
| 240 | * padding the return value with leading 0s (zeros). |
| 241 | * If places is not an integer, it is truncated. |
| 242 | * If places is nonnumeric, DEC2BIN returns the #VALUE! error value. |
| 243 | * If places is zero or negative, DEC2BIN returns the #NUM! error value. |
| 244 | * |
| 245 | * @return array|string |
| 246 | */ |
| 247 | public static function DECTOBIN($x, $places = null) |
| 248 | { |
| 249 | return Engineering\ConvertDecimal::toBinary($x, $places); |
| 250 | } |
| 251 | |
| 252 | /** |
| 253 | * DECTOHEX. |
| 254 | * |
| 255 | * Return a decimal value as hex. |
| 256 | * |
| 257 | * Excel Function: |
| 258 | * DEC2HEX(x[,places]) |
| 259 | * |
| 260 | * @deprecated 1.17.0 |
| 261 | * Use the toHex() method in the Engineering\ConvertDecimal class instead |
| 262 | * @see Engineering\ConvertDecimal::toHex() |
| 263 | * |
| 264 | * @param mixed $x The decimal integer you want to convert. If number is negative, |
| 265 | * places is ignored and DEC2HEX returns a 10-character (40-bit) |
| 266 | * hexadecimal number in which the most significant bit is the sign |
| 267 | * bit. The remaining 39 bits are magnitude bits. Negative numbers |
| 268 | * are represented using two's-complement notation. |
| 269 | * If number < -549,755,813,888 or if number > 549,755,813,887, |
| 270 | * DEC2HEX returns the #NUM! error value. |
| 271 | * If number is nonnumeric, DEC2HEX returns the #VALUE! error value. |
| 272 | * If DEC2HEX requires more than places characters, it returns the |
| 273 | * #NUM! error value. |
| 274 | * @param mixed $places The number of characters to use. If places is omitted, DEC2HEX uses |
| 275 | * the minimum number of characters necessary. Places is useful for |
| 276 | * padding the return value with leading 0s (zeros). |
| 277 | * If places is not an integer, it is truncated. |
| 278 | * If places is nonnumeric, DEC2HEX returns the #VALUE! error value. |
| 279 | * If places is zero or negative, DEC2HEX returns the #NUM! error value. |
| 280 | * |
| 281 | * @return array|string |
| 282 | */ |
| 283 | public static function DECTOHEX($x, $places = null) |
| 284 | { |
| 285 | return Engineering\ConvertDecimal::toHex($x, $places); |
| 286 | } |
| 287 | |
| 288 | /** |
| 289 | * DECTOOCT. |
| 290 | * |
| 291 | * Return an decimal value as octal. |
| 292 | * |
| 293 | * Excel Function: |
| 294 | * DEC2OCT(x[,places]) |
| 295 | * |
| 296 | * @deprecated 1.17.0 |
| 297 | * Use the toOctal() method in the Engineering\ConvertDecimal class instead |
| 298 | * @see Engineering\ConvertDecimal::toOctal() |
| 299 | * |
| 300 | * @param mixed $x The decimal integer you want to convert. If number is negative, |
| 301 | * places is ignored and DEC2OCT returns a 10-character (30-bit) |
| 302 | * octal number in which the most significant bit is the sign bit. |
| 303 | * The remaining 29 bits are magnitude bits. Negative numbers are |
| 304 | * represented using two's-complement notation. |
| 305 | * If number < -536,870,912 or if number > 536,870,911, DEC2OCT |
| 306 | * returns the #NUM! error value. |
| 307 | * If number is nonnumeric, DEC2OCT returns the #VALUE! error value. |
| 308 | * If DEC2OCT requires more than places characters, it returns the |
| 309 | * #NUM! error value. |
| 310 | * @param mixed $places The number of characters to use. If places is omitted, DEC2OCT uses |
| 311 | * the minimum number of characters necessary. Places is useful for |
| 312 | * padding the return value with leading 0s (zeros). |
| 313 | * If places is not an integer, it is truncated. |
| 314 | * If places is nonnumeric, DEC2OCT returns the #VALUE! error value. |
| 315 | * If places is zero or negative, DEC2OCT returns the #NUM! error value. |
| 316 | * |
| 317 | * @return array|string |
| 318 | */ |
| 319 | public static function DECTOOCT($x, $places = null) |
| 320 | { |
| 321 | return Engineering\ConvertDecimal::toOctal($x, $places); |
| 322 | } |
| 323 | |
| 324 | /** |
| 325 | * HEXTOBIN. |
| 326 | * |
| 327 | * Return a hex value as binary. |
| 328 | * |
| 329 | * Excel Function: |
| 330 | * HEX2BIN(x[,places]) |
| 331 | * |
| 332 | * @deprecated 1.17.0 |
| 333 | * Use the toBinary() method in the Engineering\ConvertHex class instead |
| 334 | * @see Engineering\ConvertHex::toBinary() |
| 335 | * |
| 336 | * @param mixed $x the hexadecimal number (as a string) that you want to convert. |
| 337 | * Number cannot contain more than 10 characters. |
| 338 | * The most significant bit of number is the sign bit (40th bit from the right). |
| 339 | * The remaining 9 bits are magnitude bits. |
| 340 | * Negative numbers are represented using two's-complement notation. |
| 341 | * If number is negative, HEX2BIN ignores places and returns a 10-character binary number. |
| 342 | * If number is negative, it cannot be less than FFFFFFFE00, |
| 343 | * and if number is positive, it cannot be greater than 1FF. |
| 344 | * If number is not a valid hexadecimal number, HEX2BIN returns the #NUM! error value. |
| 345 | * If HEX2BIN requires more than places characters, it returns the #NUM! error value. |
| 346 | * @param mixed $places The number of characters to use. If places is omitted, |
| 347 | * HEX2BIN uses the minimum number of characters necessary. Places |
| 348 | * is useful for padding the return value with leading 0s (zeros). |
| 349 | * If places is not an integer, it is truncated. |
| 350 | * If places is nonnumeric, HEX2BIN returns the #VALUE! error value. |
| 351 | * If places is negative, HEX2BIN returns the #NUM! error value. |
| 352 | * |
| 353 | * @return array|string |
| 354 | */ |
| 355 | public static function HEXTOBIN($x, $places = null) |
| 356 | { |
| 357 | return Engineering\ConvertHex::toBinary($x, $places); |
| 358 | } |
| 359 | |
| 360 | /** |
| 361 | * HEXTODEC. |
| 362 | * |
| 363 | * Return a hex value as decimal. |
| 364 | * |
| 365 | * Excel Function: |
| 366 | * HEX2DEC(x) |
| 367 | * |
| 368 | * @deprecated 1.17.0 |
| 369 | * Use the toDecimal() method in the Engineering\ConvertHex class instead |
| 370 | * @see Engineering\ConvertHex::toDecimal() |
| 371 | * |
| 372 | * @param mixed $x The hexadecimal number (as a string) that you want to convert. This number cannot |
| 373 | * contain more than 10 characters (40 bits). The most significant |
| 374 | * bit of number is the sign bit. The remaining 39 bits are magnitude |
| 375 | * bits. Negative numbers are represented using two's-complement |
| 376 | * notation. |
| 377 | * If number is not a valid hexadecimal number, HEX2DEC returns the |
| 378 | * #NUM! error value. |
| 379 | * |
| 380 | * @return array|string |
| 381 | */ |
| 382 | public static function HEXTODEC($x) |
| 383 | { |
| 384 | return Engineering\ConvertHex::toDecimal($x); |
| 385 | } |
| 386 | |
| 387 | /** |
| 388 | * HEXTOOCT. |
| 389 | * |
| 390 | * Return a hex value as octal. |
| 391 | * |
| 392 | * Excel Function: |
| 393 | * HEX2OCT(x[,places]) |
| 394 | * |
| 395 | * @deprecated 1.17.0 |
| 396 | * Use the toOctal() method in the Engineering\ConvertHex class instead |
| 397 | * @see Engineering\ConvertHex::toOctal() |
| 398 | * |
| 399 | * @param mixed $x The hexadecimal number (as a string) that you want to convert. Number cannot |
| 400 | * contain more than 10 characters. The most significant bit of |
| 401 | * number is the sign bit. The remaining 39 bits are magnitude |
| 402 | * bits. Negative numbers are represented using two's-complement |
| 403 | * notation. |
| 404 | * If number is negative, HEX2OCT ignores places and returns a |
| 405 | * 10-character octal number. |
| 406 | * If number is negative, it cannot be less than FFE0000000, and |
| 407 | * if number is positive, it cannot be greater than 1FFFFFFF. |
| 408 | * If number is not a valid hexadecimal number, HEX2OCT returns |
| 409 | * the #NUM! error value. |
| 410 | * If HEX2OCT requires more than places characters, it returns |
| 411 | * the #NUM! error value. |
| 412 | * @param mixed $places The number of characters to use. If places is omitted, HEX2OCT |
| 413 | * uses the minimum number of characters necessary. Places is |
| 414 | * useful for padding the return value with leading 0s (zeros). |
| 415 | * If places is not an integer, it is truncated. |
| 416 | * If places is nonnumeric, HEX2OCT returns the #VALUE! error |
| 417 | * value. |
| 418 | * If places is negative, HEX2OCT returns the #NUM! error value. |
| 419 | * |
| 420 | * @return array|string |
| 421 | */ |
| 422 | public static function HEXTOOCT($x, $places = null) |
| 423 | { |
| 424 | return Engineering\ConvertHex::toOctal($x, $places); |
| 425 | } |
| 426 | |
| 427 | /** |
| 428 | * OCTTOBIN. |
| 429 | * |
| 430 | * Return an octal value as binary. |
| 431 | * |
| 432 | * Excel Function: |
| 433 | * OCT2BIN(x[,places]) |
| 434 | * |
| 435 | * @deprecated 1.17.0 |
| 436 | * Use the toBinary() method in the Engineering\ConvertOctal class instead |
| 437 | * @see Engineering\ConvertOctal::toBinary() |
| 438 | * |
| 439 | * @param mixed $x The octal number you want to convert. Number may not |
| 440 | * contain more than 10 characters. The most significant |
| 441 | * bit of number is the sign bit. The remaining 29 bits |
| 442 | * are magnitude bits. Negative numbers are represented |
| 443 | * using two's-complement notation. |
| 444 | * If number is negative, OCT2BIN ignores places and returns |
| 445 | * a 10-character binary number. |
| 446 | * If number is negative, it cannot be less than 7777777000, |
| 447 | * and if number is positive, it cannot be greater than 777. |
| 448 | * If number is not a valid octal number, OCT2BIN returns |
| 449 | * the #NUM! error value. |
| 450 | * If OCT2BIN requires more than places characters, it |
| 451 | * returns the #NUM! error value. |
| 452 | * @param mixed $places The number of characters to use. If places is omitted, |
| 453 | * OCT2BIN uses the minimum number of characters necessary. |
| 454 | * Places is useful for padding the return value with |
| 455 | * leading 0s (zeros). |
| 456 | * If places is not an integer, it is truncated. |
| 457 | * If places is nonnumeric, OCT2BIN returns the #VALUE! |
| 458 | * error value. |
| 459 | * If places is negative, OCT2BIN returns the #NUM! error |
| 460 | * value. |
| 461 | * |
| 462 | * @return array|string |
| 463 | */ |
| 464 | public static function OCTTOBIN($x, $places = null) |
| 465 | { |
| 466 | return Engineering\ConvertOctal::toBinary($x, $places); |
| 467 | } |
| 468 | |
| 469 | /** |
| 470 | * OCTTODEC. |
| 471 | * |
| 472 | * Return an octal value as decimal. |
| 473 | * |
| 474 | * Excel Function: |
| 475 | * OCT2DEC(x) |
| 476 | * |
| 477 | * @deprecated 1.17.0 |
| 478 | * Use the toDecimal() method in the Engineering\ConvertOctal class instead |
| 479 | * @see Engineering\ConvertOctal::toDecimal() |
| 480 | * |
| 481 | * @param mixed $x The octal number you want to convert. Number may not contain |
| 482 | * more than 10 octal characters (30 bits). The most significant |
| 483 | * bit of number is the sign bit. The remaining 29 bits are |
| 484 | * magnitude bits. Negative numbers are represented using |
| 485 | * two's-complement notation. |
| 486 | * If number is not a valid octal number, OCT2DEC returns the |
| 487 | * #NUM! error value. |
| 488 | * |
| 489 | * @return array|string |
| 490 | */ |
| 491 | public static function OCTTODEC($x) |
| 492 | { |
| 493 | return Engineering\ConvertOctal::toDecimal($x); |
| 494 | } |
| 495 | |
| 496 | /** |
| 497 | * OCTTOHEX. |
| 498 | * |
| 499 | * Return an octal value as hex. |
| 500 | * |
| 501 | * Excel Function: |
| 502 | * OCT2HEX(x[,places]) |
| 503 | * |
| 504 | * @deprecated 1.17.0 |
| 505 | * Use the toHex() method in the Engineering\ConvertOctal class instead |
| 506 | * @see Engineering\ConvertOctal::toHex() |
| 507 | * |
| 508 | * @param mixed $x The octal number you want to convert. Number may not contain |
| 509 | * more than 10 octal characters (30 bits). The most significant |
| 510 | * bit of number is the sign bit. The remaining 29 bits are |
| 511 | * magnitude bits. Negative numbers are represented using |
| 512 | * two's-complement notation. |
| 513 | * If number is negative, OCT2HEX ignores places and returns a |
| 514 | * 10-character hexadecimal number. |
| 515 | * If number is not a valid octal number, OCT2HEX returns the |
| 516 | * #NUM! error value. |
| 517 | * If OCT2HEX requires more than places characters, it returns |
| 518 | * the #NUM! error value. |
| 519 | * @param mixed $places The number of characters to use. If places is omitted, OCT2HEX |
| 520 | * uses the minimum number of characters necessary. Places is useful |
| 521 | * for padding the return value with leading 0s (zeros). |
| 522 | * If places is not an integer, it is truncated. |
| 523 | * If places is nonnumeric, OCT2HEX returns the #VALUE! error value. |
| 524 | * If places is negative, OCT2HEX returns the #NUM! error value. |
| 525 | * |
| 526 | * @return array|string |
| 527 | */ |
| 528 | public static function OCTTOHEX($x, $places = null) |
| 529 | { |
| 530 | return Engineering\ConvertOctal::toHex($x, $places); |
| 531 | } |
| 532 | |
| 533 | /** |
| 534 | * COMPLEX. |
| 535 | * |
| 536 | * Converts real and imaginary coefficients into a complex number of the form x +/- yi or x +/- yj. |
| 537 | * |
| 538 | * Excel Function: |
| 539 | * COMPLEX(realNumber,imaginary[,suffix]) |
| 540 | * |
| 541 | * @deprecated 1.18.0 |
| 542 | * Use the COMPLEX() method in the Engineering\Complex class instead |
| 543 | * @see Engineering\Complex::COMPLEX() |
| 544 | * |
| 545 | * @param array|float $realNumber the real coefficient of the complex number |
| 546 | * @param array|float $imaginary the imaginary coefficient of the complex number |
| 547 | * @param array|string $suffix The suffix for the imaginary component of the complex number. |
| 548 | * If omitted, the suffix is assumed to be "i". |
| 549 | * |
| 550 | * @return array|string |
| 551 | */ |
| 552 | public static function COMPLEX($realNumber = 0.0, $imaginary = 0.0, $suffix = 'i') |
| 553 | { |
| 554 | return Engineering\Complex::COMPLEX($realNumber, $imaginary, $suffix); |
| 555 | } |
| 556 | |
| 557 | /** |
| 558 | * IMAGINARY. |
| 559 | * |
| 560 | * Returns the imaginary coefficient of a complex number in x + yi or x + yj text format. |
| 561 | * |
| 562 | * Excel Function: |
| 563 | * IMAGINARY(complexNumber) |
| 564 | * |
| 565 | * @deprecated 1.18.0 |
| 566 | * Use the IMAGINARY() method in the Engineering\Complex class instead |
| 567 | * @see Engineering\Complex::IMAGINARY() |
| 568 | * |
| 569 | * @param string $complexNumber the complex number for which you want the imaginary |
| 570 | * coefficient |
| 571 | * |
| 572 | * @return array|float|string |
| 573 | */ |
| 574 | public static function IMAGINARY($complexNumber) |
| 575 | { |
| 576 | return Engineering\Complex::IMAGINARY($complexNumber); |
| 577 | } |
| 578 | |
| 579 | /** |
| 580 | * IMREAL. |
| 581 | * |
| 582 | * Returns the real coefficient of a complex number in x + yi or x + yj text format. |
| 583 | * |
| 584 | * Excel Function: |
| 585 | * IMREAL(complexNumber) |
| 586 | * |
| 587 | * @deprecated 1.18.0 |
| 588 | * Use the IMREAL() method in the Engineering\Complex class instead |
| 589 | * @see Engineering\Complex::IMREAL() |
| 590 | * |
| 591 | * @param string $complexNumber the complex number for which you want the real coefficient |
| 592 | * |
| 593 | * @return array|float|string |
| 594 | */ |
| 595 | public static function IMREAL($complexNumber) |
| 596 | { |
| 597 | return Engineering\Complex::IMREAL($complexNumber); |
| 598 | } |
| 599 | |
| 600 | /** |
| 601 | * IMABS. |
| 602 | * |
| 603 | * Returns the absolute value (modulus) of a complex number in x + yi or x + yj text format. |
| 604 | * |
| 605 | * Excel Function: |
| 606 | * IMABS(complexNumber) |
| 607 | * |
| 608 | * @deprecated 1.18.0 |
| 609 | * Use the IMABS() method in the Engineering\ComplexFunctions class instead |
| 610 | * @see ComplexFunctions::IMABS() |
| 611 | * |
| 612 | * @param string $complexNumber the complex number for which you want the absolute value |
| 613 | * |
| 614 | * @return array|float|string |
| 615 | */ |
| 616 | public static function IMABS($complexNumber) |
| 617 | { |
| 618 | return ComplexFunctions::IMABS($complexNumber); |
| 619 | } |
| 620 | |
| 621 | /** |
| 622 | * IMARGUMENT. |
| 623 | * |
| 624 | * Returns the argument theta of a complex number, i.e. the angle in radians from the real |
| 625 | * axis to the representation of the number in polar coordinates. |
| 626 | * |
| 627 | * Excel Function: |
| 628 | * IMARGUMENT(complexNumber) |
| 629 | * |
| 630 | * @deprecated 1.18.0 |
| 631 | * Use the IMARGUMENT() method in the Engineering\ComplexFunctions class instead |
| 632 | * @see ComplexFunctions::IMARGUMENT() |
| 633 | * |
| 634 | * @param array|string $complexNumber the complex number for which you want the argument theta |
| 635 | * |
| 636 | * @return array|float|string |
| 637 | */ |
| 638 | public static function IMARGUMENT($complexNumber) |
| 639 | { |
| 640 | return ComplexFunctions::IMARGUMENT($complexNumber); |
| 641 | } |
| 642 | |
| 643 | /** |
| 644 | * IMCONJUGATE. |
| 645 | * |
| 646 | * Returns the complex conjugate of a complex number in x + yi or x + yj text format. |
| 647 | * |
| 648 | * Excel Function: |
| 649 | * IMCONJUGATE(complexNumber) |
| 650 | * |
| 651 | * @deprecated 1.18.0 |
| 652 | * Use the IMCONJUGATE() method in the Engineering\ComplexFunctions class instead |
| 653 | * @see ComplexFunctions::IMCONJUGATE() |
| 654 | * |
| 655 | * @param array|string $complexNumber the complex number for which you want the conjugate |
| 656 | * |
| 657 | * @return array|string |
| 658 | */ |
| 659 | public static function IMCONJUGATE($complexNumber) |
| 660 | { |
| 661 | return ComplexFunctions::IMCONJUGATE($complexNumber); |
| 662 | } |
| 663 | |
| 664 | /** |
| 665 | * IMCOS. |
| 666 | * |
| 667 | * Returns the cosine of a complex number in x + yi or x + yj text format. |
| 668 | * |
| 669 | * Excel Function: |
| 670 | * IMCOS(complexNumber) |
| 671 | * |
| 672 | * @deprecated 1.18.0 |
| 673 | * Use the IMCOS() method in the Engineering\ComplexFunctions class instead |
| 674 | * @see ComplexFunctions::IMCOS() |
| 675 | * |
| 676 | * @param array|string $complexNumber the complex number for which you want the cosine |
| 677 | * |
| 678 | * @return array|float|string |
| 679 | */ |
| 680 | public static function IMCOS($complexNumber) |
| 681 | { |
| 682 | return ComplexFunctions::IMCOS($complexNumber); |
| 683 | } |
| 684 | |
| 685 | /** |
| 686 | * IMCOSH. |
| 687 | * |
| 688 | * Returns the hyperbolic cosine of a complex number in x + yi or x + yj text format. |
| 689 | * |
| 690 | * Excel Function: |
| 691 | * IMCOSH(complexNumber) |
| 692 | * |
| 693 | * @deprecated 1.18.0 |
| 694 | * Use the IMCOSH() method in the Engineering\ComplexFunctions class instead |
| 695 | * @see ComplexFunctions::IMCOSH() |
| 696 | * |
| 697 | * @param array|string $complexNumber the complex number for which you want the hyperbolic cosine |
| 698 | * |
| 699 | * @return array|float|string |
| 700 | */ |
| 701 | public static function IMCOSH($complexNumber) |
| 702 | { |
| 703 | return ComplexFunctions::IMCOSH($complexNumber); |
| 704 | } |
| 705 | |
| 706 | /** |
| 707 | * IMCOT. |
| 708 | * |
| 709 | * Returns the cotangent of a complex number in x + yi or x + yj text format. |
| 710 | * |
| 711 | * Excel Function: |
| 712 | * IMCOT(complexNumber) |
| 713 | * |
| 714 | * @deprecated 1.18.0 |
| 715 | * Use the IMCOT() method in the Engineering\ComplexFunctions class instead |
| 716 | * @see ComplexFunctions::IMCOT() |
| 717 | * |
| 718 | * @param array|string $complexNumber the complex number for which you want the cotangent |
| 719 | * |
| 720 | * @return array|float|string |
| 721 | */ |
| 722 | public static function IMCOT($complexNumber) |
| 723 | { |
| 724 | return ComplexFunctions::IMCOT($complexNumber); |
| 725 | } |
| 726 | |
| 727 | /** |
| 728 | * IMCSC. |
| 729 | * |
| 730 | * Returns the cosecant of a complex number in x + yi or x + yj text format. |
| 731 | * |
| 732 | * Excel Function: |
| 733 | * IMCSC(complexNumber) |
| 734 | * |
| 735 | * @deprecated 1.18.0 |
| 736 | * Use the IMCSC() method in the Engineering\ComplexFunctions class instead |
| 737 | * @see ComplexFunctions::IMCSC() |
| 738 | * |
| 739 | * @param array|string $complexNumber the complex number for which you want the cosecant |
| 740 | * |
| 741 | * @return array|float|string |
| 742 | */ |
| 743 | public static function IMCSC($complexNumber) |
| 744 | { |
| 745 | return ComplexFunctions::IMCSC($complexNumber); |
| 746 | } |
| 747 | |
| 748 | /** |
| 749 | * IMCSCH. |
| 750 | * |
| 751 | * Returns the hyperbolic cosecant of a complex number in x + yi or x + yj text format. |
| 752 | * |
| 753 | * Excel Function: |
| 754 | * IMCSCH(complexNumber) |
| 755 | * |
| 756 | * @deprecated 1.18.0 |
| 757 | * Use the IMCSCH() method in the Engineering\ComplexFunctions class instead |
| 758 | * @see ComplexFunctions::IMCSCH() |
| 759 | * |
| 760 | * @param array|string $complexNumber the complex number for which you want the hyperbolic cosecant |
| 761 | * |
| 762 | * @return array|float|string |
| 763 | */ |
| 764 | public static function IMCSCH($complexNumber) |
| 765 | { |
| 766 | return ComplexFunctions::IMCSCH($complexNumber); |
| 767 | } |
| 768 | |
| 769 | /** |
| 770 | * IMSIN. |
| 771 | * |
| 772 | * Returns the sine of a complex number in x + yi or x + yj text format. |
| 773 | * |
| 774 | * Excel Function: |
| 775 | * IMSIN(complexNumber) |
| 776 | * |
| 777 | * @deprecated 1.18.0 |
| 778 | * Use the IMSIN() method in the Engineering\ComplexFunctions class instead |
| 779 | * @see ComplexFunctions::IMSIN() |
| 780 | * |
| 781 | * @param string $complexNumber the complex number for which you want the sine |
| 782 | * |
| 783 | * @return array|float|string |
| 784 | */ |
| 785 | public static function IMSIN($complexNumber) |
| 786 | { |
| 787 | return ComplexFunctions::IMSIN($complexNumber); |
| 788 | } |
| 789 | |
| 790 | /** |
| 791 | * IMSINH. |
| 792 | * |
| 793 | * Returns the hyperbolic sine of a complex number in x + yi or x + yj text format. |
| 794 | * |
| 795 | * Excel Function: |
| 796 | * IMSINH(complexNumber) |
| 797 | * |
| 798 | * @deprecated 1.18.0 |
| 799 | * Use the IMSINH() method in the Engineering\ComplexFunctions class instead |
| 800 | * @see ComplexFunctions::IMSINH() |
| 801 | * |
| 802 | * @param string $complexNumber the complex number for which you want the hyperbolic sine |
| 803 | * |
| 804 | * @return array|float|string |
| 805 | */ |
| 806 | public static function IMSINH($complexNumber) |
| 807 | { |
| 808 | return ComplexFunctions::IMSINH($complexNumber); |
| 809 | } |
| 810 | |
| 811 | /** |
| 812 | * IMSEC. |
| 813 | * |
| 814 | * Returns the secant of a complex number in x + yi or x + yj text format. |
| 815 | * |
| 816 | * Excel Function: |
| 817 | * IMSEC(complexNumber) |
| 818 | * |
| 819 | * @deprecated 1.18.0 |
| 820 | * Use the IMSEC() method in the Engineering\ComplexFunctions class instead |
| 821 | * @see ComplexFunctions::IMSEC() |
| 822 | * |
| 823 | * @param string $complexNumber the complex number for which you want the secant |
| 824 | * |
| 825 | * @return array|float|string |
| 826 | */ |
| 827 | public static function IMSEC($complexNumber) |
| 828 | { |
| 829 | return ComplexFunctions::IMSEC($complexNumber); |
| 830 | } |
| 831 | |
| 832 | /** |
| 833 | * IMSECH. |
| 834 | * |
| 835 | * Returns the hyperbolic secant of a complex number in x + yi or x + yj text format. |
| 836 | * |
| 837 | * Excel Function: |
| 838 | * IMSECH(complexNumber) |
| 839 | * |
| 840 | * @deprecated 1.18.0 |
| 841 | * Use the IMSECH() method in the Engineering\ComplexFunctions class instead |
| 842 | * @see ComplexFunctions::IMSECH() |
| 843 | * |
| 844 | * @param string $complexNumber the complex number for which you want the hyperbolic secant |
| 845 | * |
| 846 | * @return array|float|string |
| 847 | */ |
| 848 | public static function IMSECH($complexNumber) |
| 849 | { |
| 850 | return ComplexFunctions::IMSECH($complexNumber); |
| 851 | } |
| 852 | |
| 853 | /** |
| 854 | * IMTAN. |
| 855 | * |
| 856 | * Returns the tangent of a complex number in x + yi or x + yj text format. |
| 857 | * |
| 858 | * Excel Function: |
| 859 | * IMTAN(complexNumber) |
| 860 | * |
| 861 | * @deprecated 1.18.0 |
| 862 | * Use the IMTAN() method in the Engineering\ComplexFunctions class instead |
| 863 | * @see ComplexFunctions::IMTAN() |
| 864 | * |
| 865 | * @param string $complexNumber the complex number for which you want the tangent |
| 866 | * |
| 867 | * @return array|float|string |
| 868 | */ |
| 869 | public static function IMTAN($complexNumber) |
| 870 | { |
| 871 | return ComplexFunctions::IMTAN($complexNumber); |
| 872 | } |
| 873 | |
| 874 | /** |
| 875 | * IMSQRT. |
| 876 | * |
| 877 | * Returns the square root of a complex number in x + yi or x + yj text format. |
| 878 | * |
| 879 | * Excel Function: |
| 880 | * IMSQRT(complexNumber) |
| 881 | * |
| 882 | * @deprecated 1.18.0 |
| 883 | * Use the IMSQRT() method in the Engineering\ComplexFunctions class instead |
| 884 | * @see ComplexFunctions::IMSQRT() |
| 885 | * |
| 886 | * @param string $complexNumber the complex number for which you want the square root |
| 887 | * |
| 888 | * @return array|string |
| 889 | */ |
| 890 | public static function IMSQRT($complexNumber) |
| 891 | { |
| 892 | return ComplexFunctions::IMSQRT($complexNumber); |
| 893 | } |
| 894 | |
| 895 | /** |
| 896 | * IMLN. |
| 897 | * |
| 898 | * Returns the natural logarithm of a complex number in x + yi or x + yj text format. |
| 899 | * |
| 900 | * Excel Function: |
| 901 | * IMLN(complexNumber) |
| 902 | * |
| 903 | * @deprecated 1.18.0 |
| 904 | * Use the IMLN() method in the Engineering\ComplexFunctions class instead |
| 905 | * @see ComplexFunctions::IMLN() |
| 906 | * |
| 907 | * @param string $complexNumber the complex number for which you want the natural logarithm |
| 908 | * |
| 909 | * @return array|string |
| 910 | */ |
| 911 | public static function IMLN($complexNumber) |
| 912 | { |
| 913 | return ComplexFunctions::IMLN($complexNumber); |
| 914 | } |
| 915 | |
| 916 | /** |
| 917 | * IMLOG10. |
| 918 | * |
| 919 | * Returns the common logarithm (base 10) of a complex number in x + yi or x + yj text format. |
| 920 | * |
| 921 | * Excel Function: |
| 922 | * IMLOG10(complexNumber) |
| 923 | * |
| 924 | * @deprecated 1.18.0 |
| 925 | * Use the IMLOG10() method in the Engineering\ComplexFunctions class instead |
| 926 | * @see ComplexFunctions::IMLOG10() |
| 927 | * |
| 928 | * @param string $complexNumber the complex number for which you want the common logarithm |
| 929 | * |
| 930 | * @return array|string |
| 931 | */ |
| 932 | public static function IMLOG10($complexNumber) |
| 933 | { |
| 934 | return ComplexFunctions::IMLOG10($complexNumber); |
| 935 | } |
| 936 | |
| 937 | /** |
| 938 | * IMLOG2. |
| 939 | * |
| 940 | * Returns the base-2 logarithm of a complex number in x + yi or x + yj text format. |
| 941 | * |
| 942 | * Excel Function: |
| 943 | * IMLOG2(complexNumber) |
| 944 | * |
| 945 | * @deprecated 1.18.0 |
| 946 | * Use the IMLOG2() method in the Engineering\ComplexFunctions class instead |
| 947 | * @see ComplexFunctions::IMLOG2() |
| 948 | * |
| 949 | * @param string $complexNumber the complex number for which you want the base-2 logarithm |
| 950 | * |
| 951 | * @return array|string |
| 952 | */ |
| 953 | public static function IMLOG2($complexNumber) |
| 954 | { |
| 955 | return ComplexFunctions::IMLOG2($complexNumber); |
| 956 | } |
| 957 | |
| 958 | /** |
| 959 | * IMEXP. |
| 960 | * |
| 961 | * Returns the exponential of a complex number in x + yi or x + yj text format. |
| 962 | * |
| 963 | * Excel Function: |
| 964 | * IMEXP(complexNumber) |
| 965 | * |
| 966 | * @deprecated 1.18.0 |
| 967 | * Use the IMEXP() method in the Engineering\ComplexFunctions class instead |
| 968 | * @see ComplexFunctions::IMEXP() |
| 969 | * |
| 970 | * @param string $complexNumber the complex number for which you want the exponential |
| 971 | * |
| 972 | * @return array|string |
| 973 | */ |
| 974 | public static function IMEXP($complexNumber) |
| 975 | { |
| 976 | return ComplexFunctions::IMEXP($complexNumber); |
| 977 | } |
| 978 | |
| 979 | /** |
| 980 | * IMPOWER. |
| 981 | * |
| 982 | * Returns a complex number in x + yi or x + yj text format raised to a power. |
| 983 | * |
| 984 | * Excel Function: |
| 985 | * IMPOWER(complexNumber,realNumber) |
| 986 | * |
| 987 | * @deprecated 1.18.0 |
| 988 | * Use the IMPOWER() method in the Engineering\ComplexFunctions class instead |
| 989 | * @see ComplexFunctions::IMPOWER() |
| 990 | * |
| 991 | * @param string $complexNumber the complex number you want to raise to a power |
| 992 | * @param float $realNumber the power to which you want to raise the complex number |
| 993 | * |
| 994 | * @return array|string |
| 995 | */ |
| 996 | public static function IMPOWER($complexNumber, $realNumber) |
| 997 | { |
| 998 | return ComplexFunctions::IMPOWER($complexNumber, $realNumber); |
| 999 | } |
| 1000 | |
| 1001 | /** |
| 1002 | * IMDIV. |
| 1003 | * |
| 1004 | * Returns the quotient of two complex numbers in x + yi or x + yj text format. |
| 1005 | * |
| 1006 | * Excel Function: |
| 1007 | * IMDIV(complexDividend,complexDivisor) |
| 1008 | * |
| 1009 | * @deprecated 1.18.0 |
| 1010 | * Use the IMDIV() method in the Engineering\ComplexOperations class instead |
| 1011 | * @see ComplexOperations::IMDIV() |
| 1012 | * |
| 1013 | * @param string $complexDividend the complex numerator or dividend |
| 1014 | * @param string $complexDivisor the complex denominator or divisor |
| 1015 | * |
| 1016 | * @return array|string |
| 1017 | */ |
| 1018 | public static function IMDIV($complexDividend, $complexDivisor) |
| 1019 | { |
| 1020 | return ComplexOperations::IMDIV($complexDividend, $complexDivisor); |
| 1021 | } |
| 1022 | |
| 1023 | /** |
| 1024 | * IMSUB. |
| 1025 | * |
| 1026 | * Returns the difference of two complex numbers in x + yi or x + yj text format. |
| 1027 | * |
| 1028 | * Excel Function: |
| 1029 | * IMSUB(complexNumber1,complexNumber2) |
| 1030 | * |
| 1031 | * @deprecated 1.18.0 |
| 1032 | * Use the IMSUB() method in the Engineering\ComplexOperations class instead |
| 1033 | * @see ComplexOperations::IMSUB() |
| 1034 | * |
| 1035 | * @param string $complexNumber1 the complex number from which to subtract complexNumber2 |
| 1036 | * @param string $complexNumber2 the complex number to subtract from complexNumber1 |
| 1037 | * |
| 1038 | * @return array|string |
| 1039 | */ |
| 1040 | public static function IMSUB($complexNumber1, $complexNumber2) |
| 1041 | { |
| 1042 | return ComplexOperations::IMSUB($complexNumber1, $complexNumber2); |
| 1043 | } |
| 1044 | |
| 1045 | /** |
| 1046 | * IMSUM. |
| 1047 | * |
| 1048 | * Returns the sum of two or more complex numbers in x + yi or x + yj text format. |
| 1049 | * |
| 1050 | * Excel Function: |
| 1051 | * IMSUM(complexNumber[,complexNumber[,...]]) |
| 1052 | * |
| 1053 | * @deprecated 1.18.0 |
| 1054 | * Use the IMSUM() method in the Engineering\ComplexOperations class instead |
| 1055 | * @see ComplexOperations::IMSUM() |
| 1056 | * |
| 1057 | * @param string ...$complexNumbers Series of complex numbers to add |
| 1058 | * |
| 1059 | * @return string |
| 1060 | */ |
| 1061 | public static function IMSUM(...$complexNumbers) |
| 1062 | { |
| 1063 | return ComplexOperations::IMSUM(...$complexNumbers); |
| 1064 | } |
| 1065 | |
| 1066 | /** |
| 1067 | * IMPRODUCT. |
| 1068 | * |
| 1069 | * Returns the product of two or more complex numbers in x + yi or x + yj text format. |
| 1070 | * |
| 1071 | * Excel Function: |
| 1072 | * IMPRODUCT(complexNumber[,complexNumber[,...]]) |
| 1073 | * |
| 1074 | * @deprecated 1.18.0 |
| 1075 | * Use the IMPRODUCT() method in the Engineering\ComplexOperations class instead |
| 1076 | * @see ComplexOperations::IMPRODUCT() |
| 1077 | * |
| 1078 | * @param string ...$complexNumbers Series of complex numbers to multiply |
| 1079 | * |
| 1080 | * @return string |
| 1081 | */ |
| 1082 | public static function IMPRODUCT(...$complexNumbers) |
| 1083 | { |
| 1084 | return ComplexOperations::IMPRODUCT(...$complexNumbers); |
| 1085 | } |
| 1086 | |
| 1087 | /** |
| 1088 | * DELTA. |
| 1089 | * |
| 1090 | * Tests whether two values are equal. Returns 1 if number1 = number2; returns 0 otherwise. |
| 1091 | * Use this function to filter a set of values. For example, by summing several DELTA |
| 1092 | * functions you calculate the count of equal pairs. This function is also known as the |
| 1093 | * Kronecker Delta function. |
| 1094 | * |
| 1095 | * Excel Function: |
| 1096 | * DELTA(a[,b]) |
| 1097 | * |
| 1098 | * @deprecated 1.17.0 |
| 1099 | * Use the DELTA() method in the Engineering\Compare class instead |
| 1100 | * @see Engineering\Compare::DELTA() |
| 1101 | * |
| 1102 | * @param float $a the first number |
| 1103 | * @param float $b The second number. If omitted, b is assumed to be zero. |
| 1104 | * |
| 1105 | * @return array|int|string (string in the event of an error) |
| 1106 | */ |
| 1107 | public static function DELTA($a, $b = 0) |
| 1108 | { |
| 1109 | return Engineering\Compare::DELTA($a, $b); |
| 1110 | } |
| 1111 | |
| 1112 | /** |
| 1113 | * GESTEP. |
| 1114 | * |
| 1115 | * Excel Function: |
| 1116 | * GESTEP(number[,step]) |
| 1117 | * |
| 1118 | * Returns 1 if number >= step; returns 0 (zero) otherwise |
| 1119 | * Use this function to filter a set of values. For example, by summing several GESTEP |
| 1120 | * functions you calculate the count of values that exceed a threshold. |
| 1121 | * |
| 1122 | * @deprecated 1.17.0 |
| 1123 | * Use the GESTEP() method in the Engineering\Compare class instead |
| 1124 | * @see Engineering\Compare::GESTEP() |
| 1125 | * |
| 1126 | * @param float $number the value to test against step |
| 1127 | * @param float $step The threshold value. If you omit a value for step, GESTEP uses zero. |
| 1128 | * |
| 1129 | * @return array|int|string (string in the event of an error) |
| 1130 | */ |
| 1131 | public static function GESTEP($number, $step = 0) |
| 1132 | { |
| 1133 | return Engineering\Compare::GESTEP($number, $step); |
| 1134 | } |
| 1135 | |
| 1136 | /** |
| 1137 | * BITAND. |
| 1138 | * |
| 1139 | * Returns the bitwise AND of two integer values. |
| 1140 | * |
| 1141 | * Excel Function: |
| 1142 | * BITAND(number1, number2) |
| 1143 | * |
| 1144 | * @deprecated 1.17.0 |
| 1145 | * Use the BITAND() method in the Engineering\BitWise class instead |
| 1146 | * @see Engineering\BitWise::BITAND() |
| 1147 | * |
| 1148 | * @param int $number1 |
| 1149 | * @param int $number2 |
| 1150 | * |
| 1151 | * @return array|int|string |
| 1152 | */ |
| 1153 | public static function BITAND($number1, $number2) |
| 1154 | { |
| 1155 | return Engineering\BitWise::BITAND($number1, $number2); |
| 1156 | } |
| 1157 | |
| 1158 | /** |
| 1159 | * BITOR. |
| 1160 | * |
| 1161 | * Returns the bitwise OR of two integer values. |
| 1162 | * |
| 1163 | * Excel Function: |
| 1164 | * BITOR(number1, number2) |
| 1165 | * |
| 1166 | * @deprecated 1.17.0 |
| 1167 | * Use the BITOR() method in the Engineering\BitWise class instead |
| 1168 | * @see Engineering\BitWise::BITOR() |
| 1169 | * |
| 1170 | * @param int $number1 |
| 1171 | * @param int $number2 |
| 1172 | * |
| 1173 | * @return array|int|string |
| 1174 | */ |
| 1175 | public static function BITOR($number1, $number2) |
| 1176 | { |
| 1177 | return Engineering\BitWise::BITOR($number1, $number2); |
| 1178 | } |
| 1179 | |
| 1180 | /** |
| 1181 | * BITXOR. |
| 1182 | * |
| 1183 | * Returns the bitwise XOR of two integer values. |
| 1184 | * |
| 1185 | * Excel Function: |
| 1186 | * BITXOR(number1, number2) |
| 1187 | * |
| 1188 | * @deprecated 1.17.0 |
| 1189 | * Use the BITXOR() method in the Engineering\BitWise class instead |
| 1190 | * @see Engineering\BitWise::BITXOR() |
| 1191 | * |
| 1192 | * @param int $number1 |
| 1193 | * @param int $number2 |
| 1194 | * |
| 1195 | * @return array|int|string |
| 1196 | */ |
| 1197 | public static function BITXOR($number1, $number2) |
| 1198 | { |
| 1199 | return Engineering\BitWise::BITXOR($number1, $number2); |
| 1200 | } |
| 1201 | |
| 1202 | /** |
| 1203 | * BITLSHIFT. |
| 1204 | * |
| 1205 | * Returns the number value shifted left by shift_amount bits. |
| 1206 | * |
| 1207 | * Excel Function: |
| 1208 | * BITLSHIFT(number, shift_amount) |
| 1209 | * |
| 1210 | * @deprecated 1.17.0 |
| 1211 | * Use the BITLSHIFT() method in the Engineering\BitWise class instead |
| 1212 | * @see Engineering\BitWise::BITLSHIFT() |
| 1213 | * |
| 1214 | * @param int $number |
| 1215 | * @param int $shiftAmount |
| 1216 | * |
| 1217 | * @return array|float|int|string |
| 1218 | */ |
| 1219 | public static function BITLSHIFT($number, $shiftAmount) |
| 1220 | { |
| 1221 | return Engineering\BitWise::BITLSHIFT($number, $shiftAmount); |
| 1222 | } |
| 1223 | |
| 1224 | /** |
| 1225 | * BITRSHIFT. |
| 1226 | * |
| 1227 | * Returns the number value shifted right by shift_amount bits. |
| 1228 | * |
| 1229 | * Excel Function: |
| 1230 | * BITRSHIFT(number, shift_amount) |
| 1231 | * |
| 1232 | * @deprecated 1.17.0 |
| 1233 | * Use the BITRSHIFT() method in the Engineering\BitWise class instead |
| 1234 | * @see Engineering\BitWise::BITRSHIFT() |
| 1235 | * |
| 1236 | * @param int $number |
| 1237 | * @param int $shiftAmount |
| 1238 | * |
| 1239 | * @return array|float|int|string |
| 1240 | */ |
| 1241 | public static function BITRSHIFT($number, $shiftAmount) |
| 1242 | { |
| 1243 | return Engineering\BitWise::BITRSHIFT($number, $shiftAmount); |
| 1244 | } |
| 1245 | |
| 1246 | /** |
| 1247 | * ERF. |
| 1248 | * |
| 1249 | * Returns the error function integrated between the lower and upper bound arguments. |
| 1250 | * |
| 1251 | * Note: In Excel 2007 or earlier, if you input a negative value for the upper or lower bound arguments, |
| 1252 | * the function would return a #NUM! error. However, in Excel 2010, the function algorithm was |
| 1253 | * improved, so that it can now calculate the function for both positive and negative ranges. |
| 1254 | * PhpSpreadsheet follows Excel 2010 behaviour, and accepts negative arguments. |
| 1255 | * |
| 1256 | * Excel Function: |
| 1257 | * ERF(lower[,upper]) |
| 1258 | * |
| 1259 | * @deprecated 1.17.0 |
| 1260 | * Use the ERF() method in the Engineering\Erf class instead |
| 1261 | * @see Engineering\Erf::ERF() |
| 1262 | * |
| 1263 | * @param float $lower lower bound for integrating ERF |
| 1264 | * @param float $upper upper bound for integrating ERF. |
| 1265 | * If omitted, ERF integrates between zero and lower_limit |
| 1266 | * |
| 1267 | * @return array|float|string |
| 1268 | */ |
| 1269 | public static function ERF($lower, $upper = null) |
| 1270 | { |
| 1271 | return Engineering\Erf::ERF($lower, $upper); |
| 1272 | } |
| 1273 | |
| 1274 | /** |
| 1275 | * ERFPRECISE. |
| 1276 | * |
| 1277 | * Returns the error function integrated between the lower and upper bound arguments. |
| 1278 | * |
| 1279 | * Excel Function: |
| 1280 | * ERF.PRECISE(limit) |
| 1281 | * |
| 1282 | * @deprecated 1.17.0 |
| 1283 | * Use the ERFPRECISE() method in the Engineering\Erf class instead |
| 1284 | * @see Engineering\Erf::ERFPRECISE() |
| 1285 | * |
| 1286 | * @param float $limit bound for integrating ERF |
| 1287 | * |
| 1288 | * @return array|float|string |
| 1289 | */ |
| 1290 | public static function ERFPRECISE($limit) |
| 1291 | { |
| 1292 | return Engineering\Erf::ERFPRECISE($limit); |
| 1293 | } |
| 1294 | |
| 1295 | /** |
| 1296 | * ERFC. |
| 1297 | * |
| 1298 | * Returns the complementary ERF function integrated between x and infinity |
| 1299 | * |
| 1300 | * Note: In Excel 2007 or earlier, if you input a negative value for the lower bound argument, |
| 1301 | * the function would return a #NUM! error. However, in Excel 2010, the function algorithm was |
| 1302 | * improved, so that it can now calculate the function for both positive and negative x values. |
| 1303 | * PhpSpreadsheet follows Excel 2010 behaviour, and accepts nagative arguments. |
| 1304 | * |
| 1305 | * Excel Function: |
| 1306 | * ERFC(x) |
| 1307 | * |
| 1308 | * @deprecated 1.17.0 |
| 1309 | * Use the ERFC() method in the Engineering\ErfC class instead |
| 1310 | * @see Engineering\ErfC::ERFC() |
| 1311 | * |
| 1312 | * @param float $x The lower bound for integrating ERFC |
| 1313 | * |
| 1314 | * @return array|float|string |
| 1315 | */ |
| 1316 | public static function ERFC($x) |
| 1317 | { |
| 1318 | return Engineering\ErfC::ERFC($x); |
| 1319 | } |
| 1320 | |
| 1321 | /** |
| 1322 | * getConversionGroups |
| 1323 | * Returns a list of the different conversion groups for UOM conversions. |
| 1324 | * |
| 1325 | * @deprecated 1.16.0 |
| 1326 | * Use the getConversionCategories() method in the Engineering\ConvertUOM class instead |
| 1327 | * @see Engineering\ConvertUOM::getConversionCategories() |
| 1328 | * |
| 1329 | * @return array |
| 1330 | */ |
| 1331 | public static function getConversionGroups() |
| 1332 | { |
| 1333 | return Engineering\ConvertUOM::getConversionCategories(); |
| 1334 | } |
| 1335 | |
| 1336 | /** |
| 1337 | * getConversionGroupUnits |
| 1338 | * Returns an array of units of measure, for a specified conversion group, or for all groups. |
| 1339 | * |
| 1340 | * @deprecated 1.16.0 |
| 1341 | * Use the getConversionCategoryUnits() method in the ConvertUOM class instead |
| 1342 | * @see Engineering\ConvertUOM::getConversionCategoryUnits() |
| 1343 | * |
| 1344 | * @param null|mixed $category |
| 1345 | * |
| 1346 | * @return array |
| 1347 | */ |
| 1348 | public static function getConversionGroupUnits($category = null) |
| 1349 | { |
| 1350 | return Engineering\ConvertUOM::getConversionCategoryUnits($category); |
| 1351 | } |
| 1352 | |
| 1353 | /** |
| 1354 | * getConversionGroupUnitDetails. |
| 1355 | * |
| 1356 | * @deprecated 1.16.0 |
| 1357 | * Use the getConversionCategoryUnitDetails() method in the ConvertUOM class instead |
| 1358 | * @see Engineering\ConvertUOM::getConversionCategoryUnitDetails() |
| 1359 | * |
| 1360 | * @param null|mixed $category |
| 1361 | * |
| 1362 | * @return array |
| 1363 | */ |
| 1364 | public static function getConversionGroupUnitDetails($category = null) |
| 1365 | { |
| 1366 | return Engineering\ConvertUOM::getConversionCategoryUnitDetails($category); |
| 1367 | } |
| 1368 | |
| 1369 | /** |
| 1370 | * getConversionMultipliers |
| 1371 | * Returns an array of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM(). |
| 1372 | * |
| 1373 | * @deprecated 1.16.0 |
| 1374 | * Use the getConversionMultipliers() method in the ConvertUOM class instead |
| 1375 | * @see Engineering\ConvertUOM::getConversionMultipliers() |
| 1376 | * |
| 1377 | * @return mixed[] |
| 1378 | */ |
| 1379 | public static function getConversionMultipliers() |
| 1380 | { |
| 1381 | return Engineering\ConvertUOM::getConversionMultipliers(); |
| 1382 | } |
| 1383 | |
| 1384 | /** |
| 1385 | * getBinaryConversionMultipliers. |
| 1386 | * |
| 1387 | * Returns an array of the additional Multiplier prefixes that can be used with Information Units of Measure |
| 1388 | * in CONVERTUOM(). |
| 1389 | * |
| 1390 | * @deprecated 1.16.0 |
| 1391 | * Use the getBinaryConversionMultipliers() method in the ConvertUOM class instead |
| 1392 | * @see Engineering\ConvertUOM::getBinaryConversionMultipliers() |
| 1393 | * |
| 1394 | * @return mixed[] |
| 1395 | */ |
| 1396 | public static function getBinaryConversionMultipliers() |
| 1397 | { |
| 1398 | return Engineering\ConvertUOM::getBinaryConversionMultipliers(); |
| 1399 | } |
| 1400 | |
| 1401 | /** |
| 1402 | * CONVERTUOM. |
| 1403 | * |
| 1404 | * Converts a number from one measurement system to another. |
| 1405 | * For example, CONVERT can translate a table of distances in miles to a table of distances |
| 1406 | * in kilometers. |
| 1407 | * |
| 1408 | * Excel Function: |
| 1409 | * CONVERT(value,fromUOM,toUOM) |
| 1410 | * |
| 1411 | * @deprecated 1.16.0 |
| 1412 | * Use the CONVERT() method in the ConvertUOM class instead |
| 1413 | * @see Engineering\ConvertUOM::CONVERT() |
| 1414 | * |
| 1415 | * @param float|int $value the value in fromUOM to convert |
| 1416 | * @param string $fromUOM the units for value |
| 1417 | * @param string $toUOM the units for the result |
| 1418 | * |
| 1419 | * @return array|float|string |
| 1420 | */ |
| 1421 | public static function CONVERTUOM($value, $fromUOM, $toUOM) |
| 1422 | { |
| 1423 | return Engineering\ConvertUOM::CONVERT($value, $fromUOM, $toUOM); |
| 1424 | } |
| 1425 | } |
| 1426 |