Get value of formula
@param array $equation
@return int|float
502064
protected function getValue($equation)
    {
        if ($this->fixedVerifyCode !== null) {
            return $this->fixedVerifyCode;
        }
		
		return eval('return '. $equation['first'] . $equation['operator'] . $equation['second'] .';');
    }
241272
public static function valueTrim(array $data)
    {
        if (is_scalar($data)) {
            return trim($data);
        }

        array_walk_recursive($data, function (&$value) {
            $value = trim($value);
        });

        return $data;
    }
50898
public function getValue($nullValue = null, $calculateFormulas = false, $formatData = true)
    {
        $value = $nullValue;
        if ($this->cell->getValue() !== null) {
            if ($this->cell->getValue() instanceof RichText) {
                $value = $this->cell->getValue()->getPlainText();
            } elseif ($calculateFormulas) {
                $value = $this->cell->getCalculatedValue();
            } else {
                $value = $this->cell->getValue();
            }

            if ($formatData) {
                $style = $this->cell->getWorksheet()->getParent()->getCellXfByIndex($this->cell->getXfIndex());
                $value = NumberFormat::toFormattedString(
                    $value,
                    ($style && $style->getNumberFormat()) ? $style->getNumberFormat()->getFormatCode() : NumberFormat::FORMAT_GENERAL
                );
            }
        }

        return $value;
    }
466181
private function getValue(array $data, $property)
    {
        if (isset($data[$property])) {
            return $data[$property];
        }

        $property = strtolower(preg_replace('@([A-Z])@', '_\1', $property));
        if (isset($data[$property])) {
            return $data[$property];
        }

        throw new \OutOfBoundsException('');
    }
964012
public boolean getBooleanResult(final CharSequence equation) {
        final Element result = new ValueElement(getResult(equation), null, null);
        if (result.isBoolean()) {
            return result.getBoolean();
        } else if (result.isInt()) {
            return result.getInt() > 0;
        } else if (result.isFloat()) {
            return result.getFloat() > 0f;
        }
        return !isNullOrFalse(result.getString());
    }
72407
protected function _getElementY($h)
    {
        if ($this->_subPart || $this->_isSubPart || !$this->_currentH || $this->_currentH<$h) {
            return 0;
        }

        return ($this->_currentH-$h)*0.8;
    }
402384
public function get($column)
    {
        foreach ($this->expressions as $expr) {
            if ($expr->getColumn() == $column) {
                return $expr;
            }
        }

        return null;
    }
739721
public Formula get(final int i) {
    if (i < 0 || i >= this.formulas.length)
      throw new IllegalArgumentException("Illegal formula index: " + i);
    return this.formulas[i];
  }
832560
public static function getValues($array)
    {
        settype($array, 'array');
        $values = array();
        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $values = array_merge($values, self::getValues($value));
            } else {
                $values[] = $value;
            }
        }

        return $values;
    }
752766
public function search($expression)
    {
        $results = [];

        foreach ($this->providers as $provider) {
            $results = array_merge($results, $provider->search($expression));
        }

        usort($results, function (Result $a, Result $b) {
            if ($a->getScore() == $b->getScore()) {
                return 0;
            }
            return $a->getScore() > $b->getScore() ? -1 : 1;
        });

        return $results;
    }
1054415
private function calculate1(array $array)
    {
        for ($i=count($array)-1; $i>=0; $i--) {
            if (isset($array[$i]) && isset($array[$i-1]) && isset($array[$i+1])
            && $array[$i] === '^') {
                $otp = 1;
                $this->checkInf($array[$i-1], $array[$i+1]);
                if (is_numeric($array[$i-1]) && is_numeric($array[$i+1])) {
                    if ($array[$i-1] < 0) {
                        $a = pow($array[$i-1]*-1, $array[$i+1]);
                        $otp = 2;
                    } else {
                        $a = pow($array[$i-1], $array[$i+1]);
                    }
                } else {
                    $this->correct = 0;
                    break;
                }
                unset($array[$i-1], $array[$i+1]);
                $array[$i] = ($otp == 1) ? $a : $a*-1;
                $array = array_values($array);
                $i = count($array)-1;
            }
        }
        return $array;
    }
49373
protected function getValue($attribute)
    {
        if (!is_null($value = array_get($this->data, $attribute))) {
            return $value;
        } elseif (!is_null($value = array_get($this->files, $attribute))) {
            return $value;
        }
    }
308207
public function getFilterValue($val)
    {
        $formatter = $this->getFormatter();

        if (strlen($this->getPrefix()) > 0 && strpos($val, $this->getPrefix()) === 0) {
            $val = substr($val, strlen($this->getPrefix()));
        }
        if (strlen($this->getSuffix()) > 0 && strpos($val, $this->getSuffix()) > 0) {
            $val = substr($val, 0, -strlen($this->getSuffix()));
        }

        try {
            $formattedValue = $formatter->parse($val);
        } catch (\Exception $e) {
            return $val;
        }

        if (false === $formattedValue) {
            return $val;
        }

        return $formattedValue;
    }
1040383
public function getFloatValue($name):?float
    {
        $value = $this->offsetGet($name);
        if (is_null($value)) {
            return null;
        }

        return (float)$value;
    }
645416
protected function Eq( $val )
	{
		$result = $this->_value == $val->getValue();

		if ( $result ||
			 is_infinite( $this->_value ) ||
			 is_nan( $this->_value ) ||
			 is_infinite( $val->getValue() ) ||
			 is_nan( $val->getValue() ) )
		{
			return $result;
		}

		$a = $this->_value;
		$b = $val->getValue();
		$limit = pow( 2, 31 );

		if ( abs( $a ) < $limit && abs( $b ) < $limit )
		{
			return $a == $b;
		}

		$expectedDecimal = DecimalValue::FromFloat( $a, false );
		$actualDecimal   = DecimalValue::FromFloat( $b, false );

		$expectedDecimalLength = $expectedDecimal->getIsDecimal() ? strlen( $expectedDecimal->getDecimalPart() ) : 0;
		$actualDecimalLength = $actualDecimal->getIsDecimal() ? strlen( $actualDecimal->getDecimalPart() ) : 0;

		$expectedDigitsLength = strlen( $expectedDecimal->getIntegerPart() );
		$actualDigitsLength = strlen( $actualDecimal->getIntegerPart() );

		// Make sure they have the same number of decimals
		if ( $expectedDecimalLength != $actualDecimalLength )
		{
			if ( $expectedDecimalLength > $actualDecimalLength )
			{
				$expectedDecimal = $expectedDecimal->getRound( $actualDecimalLength );
			}
			else
			{
				$actualDecimal = $actualDecimal->getRound( $expectedDecimalLength );
			}
		}

		if ( ! $expectedDecimal->getIsDecimal() && $expectedDigitsLength == $actualDigitsLength )
		{
			// Make sure they are the same length after removing trailing zeros. This will required when
			// the values are say 1.23E6 (which will be decimal 123000) and 1.234E6 (123400).  OK these are
			// simplified examples.  A concrete example is 1.234567890123456E38 and 1.2345678901235E38
			$expectedDigits = rtrim( $expectedDecimal->getIntegerPart(), "0" );
			if ( strlen( $expectedDigits ) == 0 ) $expectedDigits = "0";
			$actualDigits = rtrim( $actualDecimal->getIntegerPart(), "0" );
			if ( strlen( $actualDigits ) == 0 ) $actualDigits = "0";

			if ( strlen( $expectedDigits ) > strlen( $actualDigits ) )
			{
				$expectedDecimal = DecimalValue::FromValue( $expectedDigits )->getRound( strlen( $actualDigits ) - strlen( $expectedDigits ) );
				$factor = DecimalValue::FromValue( 10 )->Pow( $actualDigitsLength - strlen( $expectedDigits ) );
				$expectedDecimal = $expectedDecimal->Mul( $factor );
			}
			else if ( strlen( $expectedDigits ) < strlen( $actualDigits ) )
			{
				$actualDecimal = DecimalValue::FromValue( $actualDigits )->getRound( strlen( $expectedDigits ) - strlen( $actualDigits ), PHP_ROUND_HALF_DOWN );
				$factor = DecimalValue::FromValue( 10 )->Pow( $expectedDigitsLength - strlen( $actualDigits ) );
				$actualDecimal = $actualDecimal->Mul( $factor );
			}
		}
		else
		{
			// If the digits are not the same length ???
		}

		$result = $expectedDecimal->Equals( $actualDecimal );

		return $result;
	}
274906
public function value( $column )
	{
		$result = $this->first( [$column] );

		return $result ? $result->{$column} : null;
	}
30807
private int getOthers(IMolecularFormula formula) {
        int number = 0;
        String[] elements = {"Co", "Hg", "Pt", "As"};
        for (int i = 0; i < elements.length; i++)
            number += MolecularFormulaManipulator.getElementCount(formula,
                    formula.getBuilder().newInstance(IElement.class, elements[i]));

        return number;
    }