dimensioned
dimensioned copied to clipboard
Add a dimension of "information"
A basic unit would be a bit
.
I just had a play with adding a 'information' system of units, and it can totally work. I defined a basic system with Bits and Seconds, with some constants for MB, MiB etc. This crate and the macros it provides makes that really easy to quickly implement.
However, I'm not sure this crate is the best fit - using floating point as a basis isn't really the right choice for arithmetic involving bits.
I started adding integer support. If you point to GitHub instead of the version on crates, it's there. I haven't pushed it to crates yet as it's not as documented and tested as I would like.
Edit: See this comment for an idea of how to use them.
Floating point could be useful for information if you're doing something like data compression, where you can have non-integer bits per symbol.
Also, units pixel, megapixel, and px/inch along with bit, byte, kB, MB, and GB might come in handy to predefined and bundled in system of units "information".
Pixels are unitless (much like e.g. radians) and you cannot convert between pixels and infirmation without knowledge of bit depth (bits per pixel).
On Fri, Jul 20, 2018, 06:25 Fahmi Akbar Wildana [email protected] wrote:
Also, units pixel, megapixel, and px/inch along with bit, byte, kB, MB, and GB might come in handy to predefined and bundled in system of units "information".
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/paholg/dimensioned/issues/37#issuecomment-406478174, or mute the thread https://github.com/notifications/unsubscribe-auth/AApc0tiOnazmeO7GyHwuyZGWQboNTibRks5uIU2OgaJpZM4SsM2m .
Qbit of some energy? The lowest energy nontrivial qbit would be a bit like a binary digit.