* - Refactored Complex Engineering Functions to use external complex number library
- Added calculation engine support for the new complex number functions that were added in MS Excel 2013
    - IMCOSH()  Returns the hyperbolic cosine of a complex number
    - IMCOT()   Returns the cotangent of a complex number
    - IMCSC()   Returns the cosecant of a complex number
    - IMCSCH()  Returns the hyperbolic cosecant of a complex number
    - IMSEC()   Returns the secant of a complex number
    - IMSECH()  Returns the hyperbolic secant of a complex number
    - IMSINH()  Returns the hyperbolic sine of a complex number
    - IMTAN()   Returns the tangent of a complex number
* Simplified the parseComplex() method in the PhpOffice\PhpSpreadsheet\Calculation\Engineering class, using Complex\Complex; and docblock flagged as deprecated
		
	
			
		
			
				
	
	
		
			125 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			125 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| return [
 | |
|     [
 | |
|         12.34,
 | |
|         '12.34+5.67j',
 | |
|     ],
 | |
|     [
 | |
|         -1.234E-5,
 | |
|         '-1.234E-5+6.78E9i',
 | |
|     ],
 | |
|     [
 | |
|         3.5,
 | |
|         '3.5+2.5i',
 | |
|     ],
 | |
|     [
 | |
|         3.5,
 | |
|         '3.5+i',
 | |
|     ],
 | |
|     [
 | |
|         3.5,
 | |
|         '3.5',
 | |
|     ],
 | |
|     [
 | |
|         3.5,
 | |
|         3.5,
 | |
|     ],
 | |
|     [
 | |
|         3.5,
 | |
|         '3.5-i',
 | |
|     ],
 | |
|     [
 | |
|         3.5,
 | |
|         '3.5-2.5i',
 | |
|     ],
 | |
|     [
 | |
|         1,
 | |
|         '1+2.5i',
 | |
|     ],
 | |
|     [
 | |
|         1,
 | |
|         '1+i',
 | |
|     ],
 | |
|     [
 | |
|         1,
 | |
|         '1',
 | |
|     ],
 | |
|     [
 | |
|         1,
 | |
|         1,
 | |
|     ],
 | |
|     [
 | |
|         1,
 | |
|         '1-i',
 | |
|     ],
 | |
|     [
 | |
|         1,
 | |
|         '1-2.5i',
 | |
|     ],
 | |
|     [
 | |
|         0,
 | |
|         '2.5i',
 | |
|     ],
 | |
|     [
 | |
|         0,
 | |
|         'i',
 | |
|     ],
 | |
|     [
 | |
|         0,
 | |
|         '0',
 | |
|     ],
 | |
|     [
 | |
|         0,
 | |
|         0,
 | |
|     ],
 | |
|     [
 | |
|         0,
 | |
|         '-i',
 | |
|     ],
 | |
|     [
 | |
|         0,
 | |
|         '-2.5i',
 | |
|     ],
 | |
|     [
 | |
|         -1,
 | |
|         '-1+2.5i',
 | |
|     ],
 | |
|     [
 | |
|         -1,
 | |
|         '-1+i',
 | |
|     ],
 | |
|     [
 | |
|         -1,
 | |
|         '-1',
 | |
|     ],
 | |
|     [
 | |
|         -1,
 | |
|         '-1-i',
 | |
|     ],
 | |
|     [
 | |
|         -1,
 | |
|         '-1-2.5i',
 | |
|     ],
 | |
|     [
 | |
|         -3.5,
 | |
|         '-3.5+2.5i',
 | |
|     ],
 | |
|     [
 | |
|         -3.5,
 | |
|         '-3.5+i',
 | |
|     ],
 | |
|     [
 | |
|         -3.5,
 | |
|         '-3.5',
 | |
|     ],
 | |
|     [
 | |
|         -3.5,
 | |
|         '-3.5-i',
 | |
|     ],
 | |
|     [
 | |
|         -3.5,
 | |
|         '-3.5-2.5i',
 | |
|     ],
 | |
| ];
 |