*From*: Jean Bréfort <jean brefort normalesup org>*To*: avkalb <avkalb panix com>*Cc*: gnumeric-list gnome org*Subject*: Re: Number Theory Functions*Date*: Wed, 17 Mar 2010 12:03:46 +0100

15 has actually 4 divisors: 1, 3, 5 and 15. What's wrong there? Le lundi 15 mars 2010 à 11:27 -0500, avkalb a écrit :

Using Gnumeric Spreadsheet 1.10.1 and 64-bit Sidux. The Gnumeric Manual, Version 1.10, section A13 indicates some number theory calculations are available. I have briefly examined a few: Some functions give me reasonable outputs for simple test inputs: Isprime, ithprime, nt_pi, nt_sigma, and pfactor. But nt_d doesn't seem to work as I expected. nt_d(n) is supposed to calculate the number of divisors of n according to function reference A13 in The Gnumeric Manual, Version 1.10 If you select the insert function from the menu bar and then select nt_d from the listing, an example is given that nt_d(4096) = 13. In actuality, 2^12 = 4096 i.e there are 12 divisors of 2 in 4096. If 1 also is included as a divisor then 13 would be correct. But that doesn't explain the following results: nt_d(15) = 4 nt_d(21) = 4 nt_d(70) = 8 though it would explain these: n 7 11 31 16 nt_d(n) 2 2 2 5 What's wrong? Am I misinterpreting what the function is supposed to do? Any suggestions? _______________________________________________ gnumeric-list mailing list gnumeric-list gnome org http://mail.gnome.org/mailman/listinfo/gnumeric-list

**Follow-Ups**:**Re: Number Theory Functions***From:*avkalb

**References**:**Number Theory Functions***From:*avkalb

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