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