dimensioned icon indicating copy to clipboard operation
dimensioned copied to clipboard

Add a dimension of "information"

Open nagisa opened this issue 6 years ago • 6 comments

A basic unit would be a bit.

nagisa avatar Mar 15 '18 13:03 nagisa

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.

tismith avatar Jun 05 '18 07:06 tismith

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.

paholg avatar Jun 05 '18 14:06 paholg

Floating point could be useful for information if you're doing something like data compression, where you can have non-integer bits per symbol.

droundy avatar Jun 19 '18 18:06 droundy

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".

DrSensor avatar Jul 20 '18 03:07 DrSensor

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 .

nagisa avatar Jul 20 '18 04:07 nagisa

Qbit of some energy? The lowest energy nontrivial qbit would be a bit like a binary digit.

wetlife avatar Aug 01 '18 13:08 wetlife