[sage-devel] Re: Multivariate polynomial factoring and bug(?)

2016-11-11 Thread 'Bill Hart' via sage-devel


On Saturday, 12 November 2016 08:14:25 UTC+1, Bill Hart wrote:
>
>
> I wonder if it is sometimes worth taking the gcd G of the leading 
> coefficients of the original primitive polynomials and then taking the gcd 
> of that with the leading coefficient L of the result of the psr process, 
> and then trying L/G as the possible content. Of course one would only want 
> to try that if other tricks have failed to find the content.
>
>
Sorry,  meant:

I wonder if it is sometimes worth taking the gcd G of the leading 
coefficients of the original primitive polynomials and then taking the gcd 
H of that with the leading coefficient L of the result of the psr process, 
and then trying L/H as the possible content.

-- 
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.


[sage-devel] Re: Multivariate polynomial factoring and bug(?)

2016-11-11 Thread 'Bill Hart' via sage-devel


On Saturday, 12 November 2016 07:42:53 UTC+1, parisse wrote:
>
>
>
> Le samedi 12 novembre 2016 06:50:45 UTC+1, Bill Hart a écrit :
>>
>>
>>
>> Looking how the content (188 monomials) is computed, it's done by exact 
>>> divisions only (it's the leading coefficient up to trivial coefficients).
>>>
>>
>> Can you give me a hint where this is implemented. I didn't find this 
>> yesterday. It's a nice trick.
>>
>>
> It's in gausspol.cc, around line 4100 "Trying p/lgcd(p)) as gcd". If the 
> degree of the gcd of the evaluation is the same as the degree of one of the 
> arguments, then there is a very good chance that the gcd itself is one of 
> the argument.
> I think it's a good idea to look at sources, most papers do not describe 
> tricks, and some papers/books are written by people that did not really 
> implement, which means they miss some points.
>

Thanks. I agree, sometimes source code is extremely useful to have. I've 
implemented something similar now and it works!

By the way, the times I reported the other day are not correct. At the time 
I didn't have code implemented for removing content at the end, and I also 
had some bugs in my exact division code. Once I implemented code to remove 
the final content, I was horrified to discover it was almost all of the 
runtime.

I wonder if it is sometimes worth taking the gcd G of the leading 
coefficients of the original primitive polynomials and then taking the gcd 
of that with the leading coefficient L of the result of the psr process, 
and then trying L/G as the possible content. Of course one would only want 
to try that if other tricks have failed to find the content.

Bill.
 

-- 
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.


[sage-devel] Re: Multivariate polynomial factoring and bug(?)

2016-11-11 Thread parisse


Le samedi 12 novembre 2016 06:50:45 UTC+1, Bill Hart a écrit :
>
>
>
> Looking how the content (188 monomials) is computed, it's done by exact 
>> divisions only (it's the leading coefficient up to trivial coefficients).
>>
>
> Can you give me a hint where this is implemented. I didn't find this 
> yesterday. It's a nice trick.
>
>
It's in gausspol.cc, around line 4100 "Trying p/lgcd(p)) as gcd". If the 
degree of the gcd of the evaluation is the same as the degree of one of the 
arguments, then there is a very good chance that the gcd itself is one of 
the argument.
I think it's a good idea to look at sources, most papers do not describe 
tricks, and some papers/books are written by people that did not really 
implement, which means they miss some points.

-- 
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.


[sage-devel] Re: Multivariate polynomial factoring and bug(?)

2016-11-11 Thread 'Bill Hart' via sage-devel
By the way, yesterday I implemented algorithm 3 in Brown's paper on psrgcd. 
I didn't notice any improvement, so I abandoned it. I wasn't able to decide 
whether algorithm 4 is actually an algorithm, let alone whether it would be 
worth implementing, so I didn't bother with that.

Bill.

-- 
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.


[sage-devel] Re: Multivariate polynomial factoring and bug(?)

2016-11-11 Thread 'Bill Hart' via sage-devel


On Friday, 11 November 2016 21:00:49 UTC+1, parisse wrote:
>
>
>
> Le vendredi 11 novembre 2016 07:03:46 UTC+1, Bill Hart a écrit :
>>
>> I assume you are using the modular algorithm to remove the final lot of 
>> content at the end of the psr algorithm. Otherwise the algorithm takes 
>> quite a long time, since even if we remove the known factors of the content 
>> along the way, as specified by the algorithm, the result is far from 
>> primitive, and so computing the content in the final step of the algorithm 
>> takes a long time.
>>
>> Bill.
>>
>
> I'm using a trick for the last step of psrgcd: since the gcd should be of 
> degree 6 wrt y (obtained by evaluation of other variables), when I have the 
> remainder of degree 6 (1276 monomials), I check that the division from the 
> previous remainder (102 monomials) with the primitive part of this 
> remainder is exact, this saves one pseudo-division.
>

I was looking at the source code yesterday and noticed that you figure out 
the likely degree of the gcd, but I couldn't figure out where it was 
actually used. But now I think I see where you are using it.
 

> Looking how the content (188 monomials) is computed, it's done by exact 
> divisions only (it's the leading coefficient up to trivial coefficients).
>

Can you give me a hint where this is implemented. I didn't find this 
yesterday. It's a nice trick.

Bill.

-- 
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.


[sage-devel] Re: Multivariate polynomial factoring and bug(?)

2016-11-11 Thread parisse


Le vendredi 11 novembre 2016 07:03:46 UTC+1, Bill Hart a écrit :
>
> I assume you are using the modular algorithm to remove the final lot of 
> content at the end of the psr algorithm. Otherwise the algorithm takes 
> quite a long time, since even if we remove the known factors of the content 
> along the way, as specified by the algorithm, the result is far from 
> primitive, and so computing the content in the final step of the algorithm 
> takes a long time.
>
> Bill.
>

I'm using a trick for the last step of psrgcd: since the gcd should be of 
degree 6 wrt y (obtained by evaluation of other variables), when I have the 
remainder of degree 6 (1276 monomials), I check that the division from the 
previous remainder (102 monomials) with the primitive part of this 
remainder is exact, this saves one pseudo-division. Looking how the content 
(188 monomials) is computed, it's done by exact divisions only (it's the 
leading coefficient up to trivial coefficients).

-- 
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.


[sage-devel] Re: sage 7.4 does not build on Ubuntu 16.10

2016-11-11 Thread Pam Satterthwaite
Thanks for all helpful advice! I tried to patch, but still couldn't get 
past the error. Then I noticed a lovely Sage environment variable and 
voila! It's building!

So all I did was:

export SAGE_INSTALL_GCC=no

make


That's it!

hopefully that will save somebody some time in the future!

that is all

pam

oh yeah:

installing on Ubuntu Gnome 16.10.
my log was basically identical to the OP.

 

 

 

-- 
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.


[sage-devel] Re: Error building sage devel: package: singular-4.0.3p4

2016-11-11 Thread Simon Brandhorst
Seems I posted too fast. Sorry for the spam. They error is due to a work 
around which I forgot to delete before building. Now it seems to work. 
(still building)

On Friday, November 11, 2016 at 2:36:15 PM UTC+1, Simon Brandhorst wrote:
>
> See the log file.
>
> Best
>
> Simon
>

-- 
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.


[sage-devel] Error building sage devel: package: singular-4.0.3p4

2016-11-11 Thread Simon Brandhorst
See the log file.

Best

Simon

-- 
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.
Found local metadata for singular-4.0.3p4
Attempting to download package singular-4.0.3p4.tar.bz2 from mirrors
http://ftp.riken.jp/sagemath/spkg/upstream/singular/singular-4.0.3p4.tar.bz2
[..]
singular-4.0.3p4

Setting up build directory for singular-4.0.3p4
Finished extraction

Host system:
Linux Quadrator 4.7.9-200.fc24.x86_64 #1 SMP Thu Oct 20 14:26:16 UTC 2016 
x86_64 x86_64 x86_64 GNU/Linux

C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/6.2.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap 
--enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr 
--mandir=/usr/share/man --infodir=/usr/share/info 
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared 
--enable-threads=posix --enable-checking=release --enable-multilib 
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions 
--enable-gnu-unique-object --enable-linker-build-id 
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array 
--disable-libgcj --with-isl --enable-libmpx --enable-gnu-indirect-function 
--with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 6.2.1 20160916 (Red Hat 6.2.1-2) (GCC) 

patching file latest/factory/NTLconvert.cc
(Stripping trailing CRs from patch; use --binary to disable.)
patching file latest/configure
Hunk #1 FAILED at 2328.
1 out of 1 hunk FAILED -- saving rejects to file latest/configure.rej
Error applying '../patches/work_around_size_of_long_0.patch'

real0m0.009s
user0m0.005s
sys 0m0.004s

Error installing package singular-4.0.3p4

Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the relevant part of the log file
  /home/simon/sage/logs/pkgs/singular-4.0.3p4.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/home/simon/sage/local/var/tmp/sage/build/singular-4.0.3p4 and type 'make' or 
whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
  (cd '/home/simon/sage/local/var/tmp/sage/build/singular-4.0.3p4' && 
'/home/simon/sage/sage' --sh)
When you are done debugging, you can type "exit" to leave the subshell.