mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-29 01:18:40 +00:00
Added calculation
This commit is contained in:
parent
e85164c986
commit
2fade7f4dc
|
|
@ -754,6 +754,20 @@ class FinanceFormulas
|
||||||
return log(2) / log(1 + $r);
|
return log(2) / log(1 + $r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get rate to dobule
|
||||||
|
*
|
||||||
|
* @param float $t Time in which to double investment
|
||||||
|
*
|
||||||
|
* @return float
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public static function getDoublingRate(float $t) : float
|
||||||
|
{
|
||||||
|
return exp(log(2) / $t) - 1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Doubling Time - Continuous Compounding
|
* Doubling Time - Continuous Compounding
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user