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

9
LINES

< > BotCompany Repo | #1027284 // sqrt2progression_int_dropFirst (divide by sqrt(2) repeatedly)

JavaX fragment (include)

static L<Int> sqrt2progression_int_dropFirst(int n, double startValue) {
  L<Int> l = emptyList(n);
  double x = startValue;
  for i to n: {
    x /= sqrt(2);
    l.add(iround(x));
  }
  ret l;
}

Author comment

Began life as a copy of #1027283

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027284
Snippet name: sqrt2progression_int_dropFirst (divide by sqrt(2) repeatedly)
Eternal ID of this version: #1027284/2
Text MD5: 48c3e1067ce10a761cd517d35e9a6111
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-29 16:44:07
Source code size: 203 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 164 / 203
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)