algebraic number package?

158 views
Skip to first unread message

Ralf Stephan

unread,
May 26, 2017, 9:20:00 AM5/26/17
to sage-devel
Hello,

The qqbar source does not use a lower-level library. My question:
is there a stand-alone open-source fast version of such a package?
Reason I'm asking is linkage with Pynac.

Regards,

John Cremona

unread,
May 26, 2017, 10:06:38 AM5/26/17
to SAGE devel
As far as I know the only other software offering a similar
functionality is Magma's AlgebraicallyClosedFIeld system, which was a
groundbreaking idea when first proposed and implemented there by Allan
Steele.

That's a "no" from me, but I would be very interested to be proved wrong!

John

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

Fredrik Johansson

unread,
May 26, 2017, 12:04:15 PM5/26/17
to sage-devel

There are immediate plans to implement embedded number fields and qqbar in Flint/Antic (https://github.com/wbhart/antic). In fact, there will be a workshop and coding sprint in Kaiserslautern, 31 July - 4 August partially dedicated to this topic. The workshop hasn't been formally announced yet, but here is a wiki page: https://github.com/Nemocas/Nemo.jl/wiki/OSCAR-:-Antic-Workshop--and--coding-sprint

Anyone who is interested is welcome to attend.

Fredrik

Ralf Stephan

unread,
May 27, 2017, 2:15:28 AM5/27/17
to sage-devel
On Friday, May 26, 2017 at 6:04:15 PM UTC+2, Fredrik Johansson wrote:
There are immediate plans to implement embedded number fields and qqbar in Flint/Antic (https://github.com/wbhart/antic). In fact, there will be a workshop and coding sprint in Kaiserslautern, 31 July - 4 August partially dedicated to this topic. The workshop hasn't been formally announced yet, but here is a wiki page: https://github.com/Nemocas/Nemo.jl/wiki/OSCAR-:-Antic-Workshop--and--coding-sprint

Great news! 

Jeroen Demeyer

unread,
May 28, 2017, 5:40:08 PM5/28/17
to sage-...@googlegroups.com
On 2017-05-26 15:19, Ralf Stephan wrote:
> The qqbar source does not use a lower-level library.

What do you mean with this? It actually uses quite a large fraction of
Sage (number fields, polynomials, interval arithmetic, ...)

Ralf Stephan

unread,
May 29, 2017, 1:09:33 AM5/29/17
to sage-devel
Make that "lower-language-level" i.e. C/C++. There was also
the words "one" and "fast" in my original post.

Dima Pasechnik

unread,
May 29, 2017, 2:39:59 AM5/29/17
to sage-devel
Is qqbar really so slow? Perhaps you could point out particularly slow for your purposes parts ?
 

Ralf Stephan

unread,
May 29, 2017, 2:59:25 AM5/29/17
to sage-devel
The case that started me was
sage: a=SR(1/2)
sage: b=SR(3)
sage: %timeit _=a^b
The slowest run took 9.38 times longer than the fastest. This could mean that an intermediate result is being cached.
100000 loops, best of 3: 2.14 µs per loop
sage: %timeit _=b^a
10000 loops, best of 3: 62.1 µs per loop
but I think I can shortcut Python/Cython usage here.
I also wanted to scout the software landscape before any other decisions.

John Cremona

unread,
May 29, 2017, 4:12:29 AM5/29/17
to SAGE devel


On 29 May 2017 07:59, "Ralf Stephan" <gtr...@gmail.com> wrote:
The case that started me was
sage: a=SR(1/2)
sage: b=SR(3)
sage: %timeit _=a^b
The slowest run took 9.38 times longer than the fastest. This could mean that an intermediate result is being cached.
100000 loops, best of 3: 2.14 µs per loop
sage: %timeit _=b^a
10000 loops, best of 3: 62.1 µs per loop
but I think I can shortcut

Your example does not use QQbar at all!  It uses SR (Symbolic Ring) which is quite different.



Python/Cython usage here.
I also wanted to scout the software landscape before any other decisions.


On Monday, May 29, 2017 at 8:39:59 AM UTC+2, Dima Pasechnik wrote:


On Monday, May 29, 2017 at 6:09:33 AM UTC+1, Ralf Stephan wrote:
On Sunday, May 28, 2017 at 11:40:08 PM UTC+2, Jeroen Demeyer wrote:
On 2017-05-26 15:19, Ralf Stephan wrote:
> The qqbar source does not use a lower-level library.

What do you mean with this? It actually uses quite a large fraction of
Sage (number fields, polynomials, interval arithmetic, ...)

Make that "lower-language-level" i.e. C/C++. There was also
the words "one" and "fast" in my original post.

Is qqbar really so slow? Perhaps you could point out particularly slow for your purposes parts ?
 

--
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+unsubscribe@googlegroups.com.

Ralf Stephan

unread,
May 29, 2017, 7:03:59 AM5/29/17
to SAGE devel

Yes but if Pynac had such a type, and fast, the operations with any roots (as parts of expressions) would be much simplified. Relying on Python/Cython code from the C++ end is always tedious and slow.


To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.

To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://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 a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/3cSPt18Fv7Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.

Dima Pasechnik

unread,
May 31, 2017, 2:57:32 AM5/31/17
to sage-devel


On Monday, May 29, 2017 at 12:03:59 PM UTC+1, Ralf Stephan wrote:

Yes but if Pynac had such a type, and fast, the operations with any roots (as parts of expressions) would be much simplified. Relying on Python/Cython code from the C++ end is always tedious and slow.


I don't know a library like this that allows you to directly manipulate non-integer powers of (real, or not) algebraic
numbers.
I am aware of GAP packages Alnuth and Radiroot (Radiroot can show you roots of polynomial equations with solvable
Galois group, expressed via radicals, so this seems to come close to what you'd like to have)
that provide some functionality to deal with roots of algebraic numbers; they interface Pari/GP for this purpose.
(they use a simple and slow interface via files, AFAIK, but that's beside the point).


Pari/GP has a C library interface, which is a part of Sage. 
Reply all
Reply to author
Forward
0 new messages