How does XY calculate terabytes?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
zer0
Posts: 2676
Joined: 19 Jan 2009 20:11

How does XY calculate terabytes?

Post by zer0 »

As per picture below, XY seems to be more generous than Explorer (and also suggest that total drive capacity is higher than what Explorer thinks it is), hence the question: why?

Image

I have a sneaky suspicion that XY rounds things up, but haven't been able to find any documentary evidence to such.
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build

admin
Site Admin
Posts: 66324
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: How does XY calculate terabytes?

Post by admin »

Explorer is wrong. Of course.

Code: Select all

echo formatbytes("2892522504192", "TB", 14); 
How is it done?

Code: Select all

TB = bytes / 1099511627776

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: How does XY calculate terabytes?

Post by bdeshi »

to be completely independent of XYplorer:

Code: Select all

 b  = 2892522504192
 kb = b/1024
 mb = kb/1024
 gb = mb/1024
 tb = gb/1024
To be also completely independent of MS: https://www.google.com/search?q=2892522 ... +tebibytes
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply