X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/restate/vendor/markbaker/complex/classes/src/functions
home
/
gfecatvj
/
sites
/
restate
/
vendor
/
markbaker
/
complex
/
classes
/
src
/
functions
/
📁
..
📄
abs.php
(828 B)
📄
acos.php
(1.04 KB)
📄
acosh.php
(920 B)
📄
acot.php
(756 B)
📄
acoth.php
(781 B)
📄
acsc.php
(854 B)
📄
acsch.php
(879 B)
📄
argument.php
(828 B)
📄
asec.php
(850 B)
📄
asech.php
(875 B)
📄
asin.php
(1.01 KB)
📄
asinh.php
(936 B)
📄
atan.php
(1.34 KB)
📄
atanh.php
(1.08 KB)
📄
conjugate.php
(760 B)
📄
cos.php
(938 B)
📄
cosh.php
(922 B)
📄
cot.php
(850 B)
📄
coth.php
(761 B)
📄
csc.php
(835 B)
📄
csch.php
(860 B)
📄
exp.php
(941 B)
📄
inverse.php
(895 B)
📄
ln.php
(963 B)
📄
log10.php
(1.08 KB)
📄
log2.php
(1.06 KB)
📄
negative.php
(781 B)
📄
pow.php
(1.27 KB)
📄
rho.php
(857 B)
📄
sec.php
(731 B)
📄
sech.php
(756 B)
📄
sin.php
(893 B)
📄
sinh.php
(918 B)
📄
sqrt.php
(825 B)
📄
tan.php
(1.21 KB)
📄
tanh.php
(1.11 KB)
📄
theta.php
(1.25 KB)
Editing: tan.php
<?php /** * * Function code for the complex tan() function * * @copyright Copyright (c) 2013-2018 Mark Baker (https://github.com/MarkBaker/PHPComplex) * @license https://opensource.org/licenses/MIT MIT */ namespace Complex; /** * Returns the tangent of a complex number. * * @param Complex|mixed $complex Complex number or a numeric value. * @return Complex The tangent of the complex argument. * @throws Exception If argument isn't a valid real or complex number. * @throws \InvalidArgumentException If function would result in a division by zero */ function tan($complex) { $complex = Complex::validateComplexArgument($complex); if ($complex->isReal()) { return new Complex(\tan($complex->getReal())); } $real = $complex->getReal(); $imaginary = $complex->getImaginary(); $divisor = 1 + \pow(\tan($real), 2) * \pow(\tanh($imaginary), 2); if ($divisor == 0.0) { throw new \InvalidArgumentException('Division by zero'); } return new Complex( \pow(sech($imaginary)->getReal(), 2) * \tan($real) / $divisor, \pow(sec($real)->getReal(), 2) * \tanh($imaginary) / $divisor, $complex->getSuffix() ); }
Upload File
Create Folder