bug-recutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-recutils] Negative number results of sum(field) return 184467440737


From: Paul Rankin
Subject: [bug-recutils] Negative number results of sum(field) return 18446744073709551615
Date: Tue, 5 May 2015 14:50:07 +1000

Selecting the sum of a field that results in a negative number will always 
print 18446744073709551615.

Minimal example...

$ recsel sum.rec
name: foo
n: 1

name: bar
n: -1

name: baz
n: -2

name: baz
n: 1
$ recsel sum.rec -p 'name,sum(n)'
name: foo
sum_n: 1

name: bar
sum_n: 18446744073709551615

name: baz
sum_n: 18446744073709551614

name: baz
sum_n: 1
$ recsel sum.rec -p 'name,sum(n)' -G name
name: bar
sum_n: 18446744073709551615

name: baz
sum_n: 18446744073709551615

name: foo
sum_n: 1
$




reply via email to

[Prev in Thread] Current Thread [Next in Thread]