Package: num-utils
Version: 0.5-6
Severity: normal

Hi,
consider the following example:

$ cat matrix.time
3.09 3.09 3.08 2.77 3.09 3.07 3.09 3.09 3.08 3.08
6.10 6.09 6.10 5.78 6.10 6.09 6.10 6.12 6.10 6.09
5.10 5.09 5.10 4.78 5.10 5.09 5.10 5.11 5.09 5.09
4.09 4.09 4.10 3.78 4.09 4.08 4.10 4.10 4.09 4.08

numsum is confused by those decimals:

$ numsum -c matrix.time
0 0 0 0 0 0 0 0 0 0

$ numsum -r matrix.time
0
0
0
0

while the same matrix with . substituted by 0 works as expected:

$ cat matrix.test
3009 3009 3008 2077 3009 3007 3009 3009 3008 3008
6010 6009 6010 5078 6010 6009 6010 6012 6010 6009
5010 5009 5010 4078 5010 5009 5010 5011 5009 5009
4009 4009 4010 3078 4009 4008 4010 4010 4009 4008

$ numsum -c matrix.test
18038 18036 18038 14311 18038 18033 18039 18042 18036 18034
$ numsum -r matrix.test
29153
59167
49165
39160

side note: while it is intuitive that numsum -c returns a single line it
isn't very useful if you have to do more processing with num-utils,
unless you transpose the line with tr ' ' '\n'

thanks for num-utils!
filippo

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (600, 'unstable'), (1, 'experimental')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17.14-susp2
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages num-utils depends on:
ii  perl                          5.8.8-7    Larry Wall's Practical Extraction 

num-utils recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to