/* * call-seq: * dvector.sum -> number * * Returns the sum of the entries in _dvector_. Returns 0.0 if * _dvector_ is empty. * * a = Dvector[ 1, 2, 3, 4 ] * a.sum -> 10 * Dvector[].sum -> 0 */ VALUE dvector_sum(VALUE ary) {