# Revision history [back]

### Bug in cos function in version 7.2

I have 'SageMath version 7.2, Release Date: 2016-05-15' and when I enter cos(pi(1+(5/63))) it returns cos(5/63pi) which is incorrect (there should be a negative sign in front). Entering cos(N(pi)(1+(5/63))) returns -0.969077286229078 which is correct, but entering N(cos(pi(1+(5/63)))) returns 0.969077286229078. Similar things happen when 5/63 is replaced with other fractions, but not always. Usually if the fraction is "nice", like 1/4 or 1/5 then it seems to get the right answer. I assume this has something to do with the exact answer being able to be expressed nicely with square roots, but I don't really know. Same happens with sin as far as I can tell. Anybody else having this problem?

 2 retagged tmonteil 27323 ●31 ●202 ●514 http://wiki.sagemath.o...

### Bug in cos function in version 7.2

I have 'SageMath version 7.2, Release Date: 2016-05-15' and when I enter cos(pi(1+(5/63))) it returns cos(5/63pi) which is incorrect (there should be a negative sign in front). Entering cos(N(pi)(1+(5/63))) returns -0.969077286229078 which is correct, but entering N(cos(pi(1+(5/63)))) returns 0.969077286229078. Similar things happen when 5/63 is replaced with other fractions, but not always. Usually if the fraction is "nice", like 1/4 or 1/5 then it seems to get the right answer. I assume this has something to do with the exact answer being able to be expressed nicely with square roots, but I don't really know. Same happens with sin as far as I can tell. Anybody else having this problem?

### Bug in cos function in version 7.2

I have 'SageMath version 7.2, Release Date: 2016-05-15' and when I enter cos(pi(1+(5/63))) it returns cos(5/63pi) which is incorrect (there should be a negative sign in front). Entering cos(N(pi)(1+(5/63))) cos(N(pi)*(1+(5/63))) returns -0.969077286229078 which is correct, but entering N(cos(pi(1+(5/63)))) N(cos(pi*(1+(5/63)))) returns 0.969077286229078. Similar things happen when 5/63 is replaced with other fractions, but not always. Usually if the fraction is "nice", like 1/4 or 1/5 then it seems to get the right answer. I assume this has something to do with the exact answer being able to be expressed nicely with square roots, but I don't really know. Same happens with sin as far as I can tell. Anybody else having this problem?

 4 No.4 Revision slelievre 17654 ●22 ●160 ●348 http://carva.org/samue...

### Bug in cos function in version 7.2

I have 'SageMath version 7.2, Release Date: 2016-05-15' and when I enter cos(pi(1+(5/63))) cos(pi*(1+(5/63))) it returns cos(5/63pi) cos(5/63*pi) which is incorrect (there should be a negative sign in front). Entering cos(N(pi)*(1+(5/63))) cos(N(pi)*(1+(5/63))) returns -0.969077286229078 -0.969077286229078 which is correct, but entering N(cos(pi*(1+(5/63)))) N(cos(pi\*(1+(5/63)))) returns 0.969077286229078. 0.969077286229078. Similar things happen when 5/63 5/63 is replaced with other fractions, but not always. Usually if the fraction is "nice", like 1/4 1/4 or 1/5 1/5 then it seems to get the right answer. I assume this has something to do with the exact answer being able to be expressed nicely with square roots, but I don't really know. Same happens with sin sin as far as I can tell. Anybody else having this problem?

 5 retagged tmonteil 27323 ●31 ●202 ●514 http://wiki.sagemath.o...

### Bug in cos function in version 7.2

I have 'SageMath version 7.2, Release Date: 2016-05-15' and when I enter cos(pi*(1+(5/63))) it returns cos(5/63*pi) which is incorrect (there should be a negative sign in front). Entering cos(N(pi)*(1+(5/63))) returns -0.969077286229078 which is correct, but entering N(cos(pi\*(1+(5/63)))) returns 0.969077286229078. Similar things happen when 5/63 is replaced with other fractions, but not always. Usually if the fraction is "nice", like 1/4 or 1/5 then it seems to get the right answer. I assume this has something to do with the exact answer being able to be expressed nicely with square roots, but I don't really know. Same happens with sin as far as I can tell. Anybody else having this problem?