2008/10/20 Willem Jan Palenstijn <[EMAIL PROTECTED]>:
>
> Hi,
>
> I traced this down to integral_elements_with_trace not handling the
> signs in pari's output of qfminim properly. It will only return a single
> element from each pair of conjugates, and depending on
> F.reduced_basis(), it might miss elements in ZZ with the required trace
> entirely.
>
> sage: F.<t> = NumberField(x^2-5)
> sage: F.integral_elements_with_trace([8.0,12.0])
> [3/2*t + 9/2, t + 5, t + 4, 1/2*t + 11/2, 1/2*t + 9/2, 6, 5, 4]
> sage: (-1/2*t + 9/2).trace()
> 9
> sage: F.integral_elements_with_trace([8.0,8.0])
> [4]
>
> On the machine where the doctest failed, I got an empty [] with this
> final command.
>
> Any opinions on if integral_elements_with_trace() should return both
> conjugates, or only one?

Well done:  there is definitely a bug here, since in your example:
sage: (t+4).trace()
8
sage:  F.integral_elements_with_trace([7.9,8.1])
[]

On your second question, I think the user would expect to see all
elements with trace in the range, not just one of a set of conjugates,
though one might want to add a parameter flag to list only one.

Someone will need to fix this and see if the original problem them
goes away.  Meanwhile I'll add this discussion to the ticket (though
perhaps it should be a differetnt icket?)

John

>
> -Willem Jan
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to