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).

1  
static IF1<Double> growFactorXinYDays(double x, double y, double valueAtDayZero default 1.0) {
2  
  ret new IF1<Double> {
3  
    public Double get(Double day) {
4  
      ret valueAtDayZero*pow(x, day/y);
5  
    }
6  
    
7  
    toString {
8  
      ret jreplace_multi_withModifier formatDouble_noDotZero_gen(
9  
        "valueAtDayZero*(x^(day/y))",
10  
        +valueAtDayZero, +x, +y);
11  
    }
12  
  };
13  
}

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: 89 / 133
Version history: 3 change(s)
Referenced in: [show references]