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

7
LINES

< > BotCompany Repo | #1035744 // safeMul

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

Libraryless. Click here for Pure Java version (37L/1K).

1  
static int safeMul(int a, int b, int c) {
2  
  ret safeMul(safeMul(a, b), c);
3  
}
4  
5  
static int safeMul(int a, int b) {
6  
  ret Math.multiplyExact(a, b);
7  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035744
Snippet name: safeMul
Eternal ID of this version: #1035744/1
Text MD5: 28cfba65e29a2229885fe62bc4b8d01c
Transpilation MD5: 7c716eaa5168033c7771a43638810be5
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-07-17 22:59:48
Source code size: 152 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 110 / 156
Referenced in: [show references]