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

7
LINES

< > BotCompany Repo | #1001952 // toM - convert bytes to (binary) megabytes

JavaX fragment (include)

static long toM(long l) {
  ret (l+1024*1024-1)/(1024*1024);
}

static S toM(long l, int digits) {
  ret formatDouble(toM_double(l), digits);
}

Author comment

Began life as a copy of #1001666

download  show line numbers  debug dex  old transpilations   

Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, odhhsrjjbcgr, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1001952
Snippet name: toM - convert bytes to (binary) megabytes
Eternal ID of this version: #1001952/1
Text MD5: ab109ca1452512857b4cdf4dad05f217
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-07-03 15:23:36
Source code size: 149 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 706 / 988
Referenced in: #1002035 - toM_double - convert bytes to (binary) megabytes
#1002427 - Accellerating 629 (SPIKE)
#1006460 - toMillions - convert to decimal millions
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1011536 - toMB - synonym of toM - convert bytes to (binary) megabytes
#1018949 - toG - convert bytes to (binary) gigabytes
#1036385 - toM_round - convert bytes to (binary) megabytes, round instead of ceil
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)