@@ 2094-2107 (lines=14) @@ | ||
2091 | * |
|
2092 | * @return string |
|
2093 | */ |
|
2094 | public static function IMLOG10($complexNumber) |
|
2095 | { |
|
2096 | $complexNumber = Functions::flattenSingleValue($complexNumber); |
|
2097 | ||
2098 | $parsedComplex = self::parseComplex($complexNumber); |
|
2099 | ||
2100 | if (($parsedComplex['real'] == 0.0) && ($parsedComplex['imaginary'] == 0.0)) { |
|
2101 | return Functions::NAN(); |
|
2102 | } elseif (($parsedComplex['real'] > 0.0) && ($parsedComplex['imaginary'] == 0.0)) { |
|
2103 | return log10($parsedComplex['real']); |
|
2104 | } |
|
2105 | ||
2106 | return self::IMPRODUCT(log10(EULER), self::IMLN($complexNumber)); |
|
2107 | } |
|
2108 | ||
2109 | /** |
|
2110 | * IMLOG2. |
|
@@ 2121-2134 (lines=14) @@ | ||
2118 | * |
|
2119 | * @return string |
|
2120 | */ |
|
2121 | public static function IMLOG2($complexNumber) |
|
2122 | { |
|
2123 | $complexNumber = Functions::flattenSingleValue($complexNumber); |
|
2124 | ||
2125 | $parsedComplex = self::parseComplex($complexNumber); |
|
2126 | ||
2127 | if (($parsedComplex['real'] == 0.0) && ($parsedComplex['imaginary'] == 0.0)) { |
|
2128 | return Functions::NAN(); |
|
2129 | } elseif (($parsedComplex['real'] > 0.0) && ($parsedComplex['imaginary'] == 0.0)) { |
|
2130 | return log($parsedComplex['real'], 2); |
|
2131 | } |
|
2132 | ||
2133 | return self::IMPRODUCT(log(EULER, 2), self::IMLN($complexNumber)); |
|
2134 | } |
|
2135 | ||
2136 | /** |
|
2137 | * IMEXP. |