diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2018-11-11 22:44:57 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2018-11-11 22:44:57 +0530 |
commit | 5d4bb70fb46e0a187f1945882e2782a71c4b00d2 (patch) | |
tree | 9fb16ff78905adbd95aeb37a81f252cc37827b39 | |
parent | e317e0c6ab2c6551ac552dff1bbc2a387601e069 (diff) |
Update docs
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | bcal.1 | 13 |
2 files changed, 8 insertions, 9 deletions
@@ -147,11 +147,11 @@ prompt keys: #### Operational notes - **Interactive mode**: `bcal` enters the REPL mode if no arguments are provided. Storage unit conversion, base conversion and expression evaluation are supported in this mode. The last valid result is stored in the variable **r**. -- **Expression**: Expression passed as argument in one-shot mode must be within double quotes. Inner spaces are ignored. Supported operators: +, -, *, /, % and C bitwise operators (except ~ due to storage width dependency). +- **Expression**: Expression passed as argument in one-shot mode must be within double quotes. Inner spaces are ignored. Supported operators: `+`, `-`, `*`, `/`, `%` and C bitwise operators (except `~` due to storage width dependency). - **N [unit]**: `N` can be a decimal or '0x' prefixed hex value. `unit` can be B/KiB/MiB/GiB/TiB/kB/MB/GB/TB following Ubuntu policy. Default is byte. As all of these tokens are unique, `unit` is case-insensitive. - **Numeric representation**: Decimal and hex are recognized in expressions and unit conversions. Binary is also recognized in other operations. - **Syntax**: Prefix hex inputs with `0x`, binary inputs with `0b`. -- **Precision**: 128 bits if `__uint128_t` is available or 64 bits for numerical conversions. Floating point operations use `long double`. Negative arguments are unsupported. +- **Precision**: 128 bits if `__uint128_t` is available or 64 bits for numerical conversions. Floating point operations use `long double`. Negative arguments are unsupported. Only 64-bit operating systems are supported. - **Fractional bytes do not exist** because they can't be addressed. `bcal` shows the floor value of non-integer _bytes_. - **CHS and LBA syntax**: - LBA: `lLBA-MAX_HEAD-MAX_SECTOR` [NOTE: LBA starts with `l` (case ignored)] @@ -7,7 +7,11 @@ bcal \- Storage expression calculator. .B bcal (Byte CALculator) is a command-line utility to help with numerical calculations and expressions involving data storage units, addressing, base conversion etc. It invokes GNU \fBbc\fR for non-storage expressions. .PP -.B Features +\fBbcal\fR follows Ubuntu's standard unit conversion and notation policy: +.br +.I https://wiki.ubuntu.com/UnitsPolicy +.PP +.SH FEATURES .PP * evaluate arithmetic expressions involving storage units * perform general purpose calculations (using bc) @@ -19,11 +23,6 @@ bcal \- Storage expression calculator. * base conversion to binary, decimal and hex * custom sector size, max heads/cylinder and max sectors/track * minimal dependencies -.PP -\fBbcal\fR follows Ubuntu's standard unit conversion and notation policy. Only 64-bit operating systems are supported. - -Refer to: -.I https://wiki.ubuntu.com/UnitsPolicy .SH OPERATIONAL NOTES .PP .IP 1. 4 @@ -42,7 +41,7 @@ Refer to: \fBSyntax\fR: Prefix hex inputs with '0x', binary inputs with '0b'. .PP .IP 6. 4 -\fBPrecision\fR: 128 bits if \fI__uint128_t\fR is available or 64 bits for numerical conversions. Floating point operations use \fIlong double\fR. Negative arguments are unsupported. +\fBPrecision\fR: 128 bits if \fI__uint128_t\fR is available or 64 bits for numerical conversions. Floating point operations use \fIlong double\fR. Negative arguments are unsupported. Only 64-bit operating systems are supported. .PP .IP 7. 4 \fBFractional bytes do not exist\fR, because they can't be addressed. \fBbcal\fR shows the floor value of non-integer \fIbytes\fR. |