Updated: Jun 20 2006

Index Return to Main Contents

Example:

echo -e "10000 10\n1000 10\n5000 20\n" | naddi

84.4%

**-a**,**--average**- Print the total value, the number of elements, and the element value average (in that order).
**-d***DIVIDE*[**%**],**--divide=***DIVIDE*[**%**]- Use another fraction for --extreme, --extreme-index and --share then the default 50%. With `%' assumes a percentage, without `%' a fraction between 0 and 1.
**-e**,**--extreme**-
Print the minimum, the
*DIVIDE%*, and maximum element values.The

*DIVIDE%*element is the first element encountered in the input, which makes the number of elements so far encountered, larger or equal then*DIVIDE%*of the total number of elements.*DIVIDE%*is 50% unless otherwise specified by --divide=*DIVIDE*. Sort(1) input on numerical value. **-E**,**--extreme-index**-
Print element distribution minimum,
*DIVIDE%*and maximum, as fractions. (See --divide.) Sort(1) input on numerical value. **-f**,**--fraction**- Print distribution index as fraction.
**--formula**- Print distribution algorithm.
**--fizz**- Print --share in `The top ...% corresponds to ...', give 2 times for `The bottom ...% ...'.
**-h**,**--help**- Print usage.
**-o***VALUE*,**--offset=***VALUE*-
Give an offset for all values before computing the distribution index.
--offset=0 is special: it adjusts all values equally, so that the minimum element value is 0.

**-p***N*,**--precision=***N*- Set the precision (program uses `long double' data type, which is not infinite).
**-s**,**--share**-
Total value encountered in the input stream, until the
*DIVIDE%*value, which is added to the share proportionally. Prints in the same format (fraction or percentage) as the --divide argument was given in. Sort(1) input on numerical value. **--version**- Print version.
**-v**[*N*],**--verbose**[**=***N*]- Verbose level, max 4.

If a value is negative, all values are adjusted upwards until the minimum value is 0 when computing the distribution index (the formula does not handle negative numbers properly). The negative adjustment is determined before --offset has taken effect.

This utility comes without any warranty whatsoever.

Anomaly when using --offset:

Usually the index is expected to be closer to 100% if all values are adjusted upwards. However, relatively close to --offset=0, sometimes the index falls first slightly (up to about 1%) for an increased --offset, reaches a minimum, and then increases as expected. This is probably because slight increases of values near zero and therefore their element-distribution indexes also near zero, do not have any effect on the outcome with a higher --offset yet, whereas the changes of larger values takes an effect immediately for a rising offset. This will make the high indexes go up while the low indexes remain practically `near zero', resulting in a greater disparity between high and low element indexes, which results in a "less equal" distribution index (lower index).

- NAME
- SYNOPSIS
- OVERVIEW
- OPTIONS
- DETAIL
- RETURN VALUE
- COPYRIGHT
- BUGS
- AUTHOR

This document was created by man2html, using the manual pages.

Time: 09:02:52 GMT, November 28, 2007