Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1032145 // growFactorXinYDays

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3985L/22K).

static IF1<Double> growFactorXinYDays(double x, double y, double valueAtDayZero default 1.0) {
  ret new IF1<Double> {
    public Double get(Double day) {
      ret valueAtDayZero*pow(x, day/y);
    }
    
    toString {
      ret jreplace_multi_withModifier formatDouble_noDotZero_gen(
        "valueAtDayZero*(x^(day/y))",
        +valueAtDayZero, +x, +y);
    }
  };
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1032145
Snippet name: growFactorXinYDays
Eternal ID of this version: #1032145/4
Text MD5: 71db3a4e386b92843800768cffceb302
Transpilation MD5: ab75f0769f751f5a9dd13c76cc59a65e
Author: stefan
Category: javax / forecasting
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-14 11:07:40
Source code size: 383 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 84 / 127
Version history: 3 change(s)
Referenced in: [show references]