ディースクエアード 水着 メンズ Dsquared2 Printed Swimming Trunks BlackvyOnwm8N0


-2 ディースクエアード 水着 メンズ Dsquared2 Printed Swimming Trunks BlackvyOnwm8N0 ルイ・ヴィトン ハンドバッグ ダミエ バークレー N52000 BランクI2EH9WDY

I try to make a very simple PHP script to calculate the exponential decay.

I tried some scripts around and they don't exactly address this matter in PHP (I'm not a math guy... just a programmer).

ストール 予約 上品シフォン切替花柄モチーフショールボレロ黒グレーベージュブラウン YJ 88068コンビニ受取対応商品送料無料AL34Rjq5

The initial curve I try to achieve is in the graph, I only use discrete values from 1 to 100.

m is the quantity, while t are the days

ディースクエアード 水着 メンズ Dsquared2 Printed Swimming Trunks BlackvyOnwm8N0

TOSCA BLU Sneakers レディースPuZiXk

The code I made so far was readapted and it's pretty useless because it's really specific. The code I try to achieve could be as simples as this pseudocode:

function getDays(, ) {
       #some formulas here
       return ;
}

function getCurve(, ) {
       #some formulas here
       return ;
}

//so, following the example graph...

 = getCurve(50, 25);
 = getDays(50, );

Thank you for any help!

php math logarithm exponential decay155

共有

作成 18 6月. 172017-06-18 12:37:14

-1
ディースクエアード 水着 メンズ Dsquared2 Printed Swimming Trunks BlackvyOnwm8N0 ディースクエアード 水着 メンズ Dsquared2 Printed Swimming Trunks BlackvyOnwm8N0

So for t=25 I read 50%. The general formula with 100% at t=0 is

val = exp(-C*t)

thus from that sample

log(0.5) = -C*25 => C = 0.027725887222397813

Alternatively,

val = pow(0.9726549474122855, t)

or with 2 parameters

val = pow(0.5, t/25.0) = exp(t*log(0.5)/25)

共有

作成 18 6月. 172017-06-18 13:11:41

  0

Thank you for the support. t = time so you should read 25 days. No percentage is applied. Is your formula still valid in this case? 18 6月. 172017-06-18 13:39:29

送料最安値東芝LEDダウンライト LEKD105915N LS9 軒下用 φ150 非調光EWDIH29Y ディースクエアード 水着 メンズ Dsquared2 Printed Swimming Trunks BlackvyOnwm8N0

ディースクエアード 水着 メンズ Dsquared2 Printed Swimming Trunks BlackvyOnwm8N0