id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
14416 weird conversion from QQ to RDF zimmerma AlexGhitza "the following is weird:
{{{
sage: RDF(1/10)-RDF(1)/RDF(10)
-1.38777878078e-17
}}}
One would expect that the conversion from 1/10 to RDF is done as follows:
- first convert 1 to RDF, which is exact
- then convert 10 to RDF, which is exact
- then divide RDF(1) by RDF(10)
For RR we get as a comparison:
{{{
sage: RR(1/10)-RR(1)/RR(10)
0.000000000000000
}}}
More examples:
{{{
sage: for p in [1..10]:
....: for q in [1..10]:
....: if RDF(p/q) <> RDF(p)/RDF(q):
....: print p, q
....:
1 5
1 10
2 5
2 10
4 5
4 10
5 3
5 6
5 7
5 9
7 3
7 6
7 9
8 5
8 10
9 5
9 7
9 10
10 3
10 6
10 7
10 9
}}}
and for RR:
{{{
sage: for p in [1..10]:
....: for q in [1..10]:
....: if RR(p/q) <> RR(p)/RR(q):
....: print p, q
....:
sage:
}}}
'''Apply''' [attachment:14416_QQ_to_RDF_v2.patch]" defect closed major sage-5.11 basic arithmetic fixed robertwb sage-5.11.beta0 Paul Zimmermann, Jeroen Demeyer Paul Zimmermann N/A #14335, #14336