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

3
LINES

< > BotCompany Repo | #1029060 // roundUpToPowerOfTen_double

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

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

static long roundUpToPowerOfTen_double(double d) {
  ret round(exp10(max(0, ceil(log10(d)))));
}

Author comment

Began life as a copy of #1029057

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1029060
Snippet name: roundUpToPowerOfTen_double
Eternal ID of this version: #1029060/5
Text MD5: 2428b35419df0e2c566a1f8bb4b394ad
Transpilation MD5: ac69d3cf2a610c800f34d22316d9cffd
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-18 18:40:06
Source code size: 98 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 195 / 298
Version history: 4 change(s)
Referenced in: [show references]