1 | static L<Int> sqrt2progression_int_dropFirst(int n, double startValue) { |
2 | L<Int> l = emptyList(n); |
3 | double x = startValue; |
4 | for i to n: { |
5 | x /= sqrt(2); |
6 | l.add(iround(x)); |
7 | } |
8 | ret l; |
9 | } |
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: | 163 / 202 |
Version history: | 1 change(s) |
Referenced in: | [show references] |