You are here

public static function PHPExcel_Calculation_Engineering::IMLOG10 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::IMLOG10()

* IMLOG10 * * Returns the common logarithm (base 10) of a complex number in x + yi or x + yj text format. * * Excel Function: * IMLOG10(complexNumber) * *

Parameters

string $complexNumber The complex number for which you want the common logarithm.: * @return string

File

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

Class

PHPExcel_Calculation_Engineering
PHPExcel_Calculation_Engineering

Code

public static function IMLOG10($complexNumber) {
  $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber);
  $parsedComplex = self::_parseComplex($complexNumber);
  if ($parsedComplex['real'] == 0.0 && $parsedComplex['imaginary'] == 0.0) {
    return PHPExcel_Calculation_Functions::NaN();
  }
  elseif ($parsedComplex['real'] > 0.0 && $parsedComplex['imaginary'] == 0.0) {
    return log10($parsedComplex['real']);
  }
  return self::IMPRODUCT(log10(EULER), self::IMLN($complexNumber));
}