src/Alg/Math/Finance/CompoundInterest.php
protected static function root( $amount, $periods )
	{
		Deprecation::getInstance()
			->setErrorVersion( '0.8.5' )
			->setExceptionVersion( '0.9' )
			->message( sprintf(
				'Please use %s (%s) instead',
				'public library "CeusMedia/Math"',
			 	'https://packagist.org/packages/ceus-media/math'
			) );
		$sign	= ( $amount < 0 && $periods % 2 > 0 ) ? -1 : 1;
		$value	= pow( abs( $amount ), 1 / $periods );
		return $sign * $value;
	}
protected static function root( $amount, $periods )
	{
		Deprecation::getInstance()
			->setErrorVersion( '0.8.5' )
			->setExceptionVersion( '0.9' )
			->message( sprintf(
				'Please use %s (%s) instead',
				'public library "CeusMedia/Math"',
			 	'https://packagist.org/packages/ceus-media/math'
			) );
		$sign	= ( $amount < 0 && $periods % 2 > 0 ) ? -1 : 1;
		$value	= pow( abs( $amount ), 1 / $periods );
		return $sign * $value;
	}
protected static function root ( $ amount , $ periods ) { Deprecation :: getInstance ( ) -> setErrorVersion ( '0.8.5' ) -> setExceptionVersion ( '0.9' ) -> message ( sprintf ( 'Please use %s (%s) instead' , 'public library "CeusMedia/Math"' , 'https://packagist.org/packages/ceus-media/math' ) ) ; $ sign = ( $ amount < 0 && $ periods % 2 > 0 ) ? - 1 : 1 ; $ value = pow ( abs ( $ amount ) , 1 / $ periods ) ; return $ sign * $ value ; }
Calculates Root of Period Dimension.
@access		protected
@static
@param		float		$amount			Amount
@param		int			$periods		Number of Periods
@return		float
Calculates Root of Period Dimension .