From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sci-mathematics/pari/files/pari-2.5.1-1304.patch | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sci-mathematics/pari/files/pari-2.5.1-1304.patch (limited to 'sci-mathematics/pari/files/pari-2.5.1-1304.patch') diff --git a/sci-mathematics/pari/files/pari-2.5.1-1304.patch b/sci-mathematics/pari/files/pari-2.5.1-1304.patch new file mode 100644 index 000000000000..3da2e8558dac --- /dev/null +++ b/sci-mathematics/pari/files/pari-2.5.1-1304.patch @@ -0,0 +1,39 @@ +commit ff707a3f2ba2d5c555434ba50547453833a7570f +Author: Karim Belabas +Date: Sun Mar 18 23:54:02 2012 +0100 + + 71- issquarefree(0) => error [#1304] + +diff --git a/src/basemath/ifactor1.c b/src/basemath/ifactor1.c +index 046491f..8f9fbaa 100644 +--- a/src/basemath/ifactor1.c ++++ b/src/basemath/ifactor1.c +@@ -3493,7 +3493,11 @@ moebius(GEN n) + GEN + gissquarefree(GEN x) { return map_proto_lG(issquarefree,x); } + long +-Z_issquarefree(GEN n) { return moebius(n)? 1: 0; } ++Z_issquarefree(GEN n) ++{ ++ if (!signe(n)) return 0; ++ return moebius(n)? 1: 0; ++} + long + issquarefree(GEN x) + { +diff --git a/src/test/32/arith b/src/test/32/arith +new file mode 100644 +index 0000000..3c5981a +--- /dev/null ++++ b/src/test/32/arith +@@ -0,0 +1,2 @@ ++0 ++Total time spent: 8 +diff --git a/src/test/in/arith b/src/test/in/arith +new file mode 100644 +index 0000000..fb92bed +--- /dev/null ++++ b/src/test/in/arith +@@ -0,0 +1,2 @@ ++\\#1304 ++issquarefree(0) -- cgit v1.2.3