Libraryless. Click here for Pure Java version (3809L/22K).
static double doubleMultiRatio(Iterable<Double> l) { var it = iterator(l); if (!it.hasNext()) ret 0; double x = it.next(); while (it.hasNext()) x = doubleRatio(x, it.next()); ret x; } static double doubleMultiRatio(double... l) { int n = l(l); if (n == 0) ret 0; double x = l[0]; for (int i = 1; i < n; i++) x -= doubleRatio(x, l[i]); ret x; }
Began life as a copy of #1032656
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1032657 |
Snippet name: | doubleMultiRatio |
Eternal ID of this version: | #1032657/1 |
Text MD5: | 5e76b7f626c0e8ad52c73b0e24b4447d |
Transpilation MD5: | f72b09320c25e65a8b5fc5113679af8c |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-09-30 05:16:44 |
Source code size: | 388 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 188 / 268 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |