You are here

private static function PHPExcel_Calculation_Engineering::_Bessely0 in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Engineering.php \PHPExcel_Calculation_Engineering::_Bessely0()
1 call to PHPExcel_Calculation_Engineering::_Bessely0()
PHPExcel_Calculation_Engineering::BESSELY in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Engineering.php
* BESSELY * * Returns the Bessel function, which is also called the Weber function or the Neumann function. * * Excel Function: * BESSELY(x,ord) * * @access public * @category Engineering Functions *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Engineering.php, line 966

Class

PHPExcel_Calculation_Engineering
PHPExcel_Calculation_Engineering

Code

private static function _Bessely0($fNum) {
  if ($fNum < 8.0) {
    $y = $fNum * $fNum;
    $f1 = -2957821389.0 + $y * (7062834065.0 + $y * (-512359803.6 + $y * (10879881.29 + $y * (-86327.92757 + $y * 228.4622733))));
    $f2 = 40076544269.0 + $y * (745249964.8 + $y * (7189466.438 + $y * (47447.2647 + $y * (226.1030244 + $y))));
    $fRet = $f1 / $f2 + 0.636619772 * self::BESSELJ($fNum, 0) * log($fNum);
  }
  else {
    $z = 8.0 / $fNum;
    $y = $z * $z;
    $xx = $fNum - 0.785398164;
    $f1 = 1 + $y * (-0.001098628627 + $y * (2.734510407E-5 + $y * (-2.073370639E-6 + $y * 2.093887211E-7)));
    $f2 = -0.01562499995 + $y * (0.0001430488765 + $y * (-6.911147651E-6 + $y * (7.621095161000001E-7 + $y * -9.34945152E-8)));
    $fRet = sqrt(0.636619772 / $fNum) * (sin($xx) * $f1 + $z * cos($xx) * $f2);
  }
  return $fRet;
}