On Tue, Oct 30, 2012 at 2:58 PM, David Roe <roed.m...@gmail.com> wrote: > I think this is a bug: the type of the result should be consistent. > David > > > On Tue, Oct 30, 2012 at 3:54 PM, mmarco <mma...@unizar.es> wrote: >> >> There is an inconsistency in the behaviour of the cosine function >> sage: type(cos(1)) >> <type 'sage.symbolic.expression.Expression'> >> sage: type(cos(pi)) >> <type 'sage.symbolic.expression.Expression'> >> sage: type(cos(0)) >> <type 'int'> >> >> It also happens with the sine: >> >> sage: type(sin(0)) >> <type 'int'> >> sage: type(sin(pi)) >> <type 'sage.symbolic.expression.Expression'> >> >> and the exponential: >> sage: type(exp(0)) >> <type 'int'> >> sage: type(exp(1)) >> <type 'sage.symbolic.expression.Expression'> >> >> the logarithm: >> >> sage: type(log(1)) >> <type 'int'> >> sage: type(log(2)) >> <type 'sage.symbolic.expression.Expression'> >> sage: type(log(0)) >> <type 'sage.symbolic.expression.Expression'> >> >> >> >> Is there some reason for this or is it a bug? Shouldn't the answer be, >> at least, a sage Integer and not a python int? >>
There is a ticket for this on trac somewhere.. can't locate its number ATM. -- Benjamin Jones -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To post to this group, send email to sage-devel@googlegroups.com. To unsubscribe from this group, send email to sage-devel+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel?hl=en.