On Friday, October 7, 2016 at 1:00:08 PM UTC+2, Clemens Heuberger wrote:
>
>
> I was surprised by the following behaviour: 
>
> sage: gamma(QQbar(sqrt(2))) 
> 0.886581428719259 
> sage: gamma(QQbar(sqrt(2))).parent() 
> Complex Field with 53 bits of precision 
>
> (I would have preferred to have some symbolic answer or at least an answer 
> in 
> CIF, but not in CC) 
>

There seems to be no way to effectively guarantee "What goes in goes out (at
least nearly)" except writing a dedicated QQbar.gamma() member function.
OTOH as soon as you return something other than QQbar from such a member
purists will roast you.

CIF doesn't have gamma() either but usage of CIF should be rethought in the 
light of
sage: ComplexBallField(100)(sqrt(2)).gamma()
[0.8865814287192591250809176124 +/- 2.00e-29]

Really, arb functionality and integration does not leave much to desire, so 
use it.

As to a possible symbolic result (is there one?) this could be added to the
symbolic gamma().


> Furthermore: 
>
> sage: gamma(QQbar(1/2)) 
> Traceback (most recent call last): 
> ... 
> TypeError: no canonical coercion from Algebraic Field to Rational Field 
>

That seems a genuine bug.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to