Discussion:
[sage-devel] Wrong result of rational logarithm
Manfred Paul
2018-12-05 21:33:09 UTC
Permalink
Hi,

with sage version 8.4, Release Date: 2018-10-17 (on latest 64bit Arch
Linux), I get the following bug:

sage: log(25/2, base=5/2)
2
sage: (25/2).log(5/2)
2
sage: (5/2).log(5/4)
1/2

The problematic code seems to be in sage/rings/rational.pyx:
if nu_ratio == ZZ.one():
return de_ratio
if de_ratio == ZZ.one():
return nu_ratio
The code disregards the nominator (or denominator) when the denomiators
(or nominators) match.

Is this a known bug? Should I open a ticket (if yes, what is the correct
value for the "component" field)?

Manfred
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...