fuzzylogician / gmpy

Automatically exported from code.google.com/p/gmpy
GNU Lesser General Public License v3.0
0 stars 0 forks source link

lucas2 #81

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The doc-string for lucas2  states that is should return the n-1 th and n th 
Lucas numbers, but it appears to return something else. E.g.

>>> from gmpy2 import lucas, lucas2

>>> lucas(15)
mpz(1364)

>>> lucas(14)
mpz(843)

>>> lucas2(15)  # we expect (mpz(1364), mpz(843))
(mpz(610), mpz(377))

These aren't even Lucas numbers[1]. Is this a bug or am I just misinterpreting 
the docstring?

[1] http://oeis.org/A000032

Original issue reported on code.google.com by 16sn...@gmail.com on 22 Nov 2013 at 3:51

GoogleCodeExporter commented 8 years ago
It's a bug. :-( I called fib2 instead of luc2...

I'll release 2.03 with the fix in a couple of days (after 3.4b1 is released).

Thanks for the report.

Original comment by casevh on 23 Nov 2013 at 3:14

GoogleCodeExporter commented 8 years ago
I've released version 2.0.3 with this fix.

Original comment by casevh on 29 Nov 2013 at 6:59