On 23 February 2015 at 09:23, Julien Puydt <[email protected]> wrote:
> Hi,
>
> Le 18/02/2015 13:53, Julien Puydt a écrit :
>>
>> I'm having strange numerical behaviour with my experimental sage using
>> debian packages, with two failing doctests in the src/sage/libs/pari/
>> directory (both in gen.pyx) :
>>
>> Failed example:
>>      (s*z)^5
>> Expected:
>>      2.00000000000000 - 1.08420217248550 E-19*I
>> Got:
>>      2.00000000000000 + 0.E-19*I
>>
>> Failed example:
>>      e.ellztopoint(1+i)
>> Expected:
>>      [0.E-19 - 1.02152286795670*I, -0.149072813701096 -
>> 0.149072813701096*I]
>> Got:
>>      [0.E-18 - 1.02152286795670*I, -0.149072813701096 -
>> 0.149072813701096*I]
>
>
> If those are indeed more numerical noise than serious issues, how can one
> relax the doctests so they don't fail at each pari upgrade, but still detect
> big problems ?
>

These ones are certainly numerical noise.  We always get these with
pari upgrades.

The other thing which happens a lot after pari upgrades is that
computations for which there is more than one correct answer (e.g.
fundamental units of a number field, which are generators for a group
and so never unique except in special cases) give a different correct
answer, which at the moment requires a human to verify are still OK.
These things propogate of course.  It is rather hard to write all such
doctests to be invariant under such things, especially as doctests
also serve as examples for the reference manual, so you really do want
such an example which computes fundamental units *and displays them*
as a user would expect.  (For that example, we could put a #random tag
on the units output, while also adding an assertion that the regulator
-- an invariant real number associated to units -- was correct to
within some tolerance.  Doing this everywhere would take alot of
effort, though it may save in the long term.

John

> I don't think a simple "# tol 1e-15" will do the trick here, will it ?
>
>
> Snark on #sagemath
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

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

Reply via email to