Previous Page Next Page Contents

numlib::sumdivisors -- sum of divisors of an integer

Introduction

numlib::sumdivisors(n) returns the sum of the positive divisors of the integer n.

Call(s)

numlib::sumdivisors(n)

Parameters

n - an integer

Returns

numlib::sumdivisors(n) returns a nonnegative integer.

Related Functions

numlib::sigma, numlib::divisors, numlib::numdivisors

Details

Example 1

The sum of the positive divisors of 120 is 360:

>> numlib::sumdivisors(120)
                                    360

Example 2

The sum of the positive divisors of -63 is 104:

>> numlib::sumdivisors(-63)
                                    104

Background

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000