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

13
LINES

< > BotCompany Repo | #1028081 // doubleProduct

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

Libraryless. Click here for Pure Java version (2527L/16K).

static double doubleProduct(Iterable<Double> l) {
  double prod = 1;
  fOr (Double i : l)
    if (i != null) prod *= i;
  ret prod;
}

static double doubleProduct(double... l) {
  double prod = 1;
  if (l != null) for (double i : l)
    prod *= i;
  ret prod;
}

Author comment

Began life as a copy of #1019131

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: #1028081
Snippet name: doubleProduct
Eternal ID of this version: #1028081/1
Text MD5: 24f33289fa2eb1290680d8e5616f866e
Transpilation MD5: 39ba1e8443879ad42d9db5a5b32c4518
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-05-17 15:39:42
Source code size: 273 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 109 / 185
Referenced in: [show references]