From 47295e1e73d54bf6cf8953ecc0ce2a848c1fb5b3 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Sun, 20 Dec 2015 04:36:42 +0100 Subject: [PATCH] Remove info_flags::algebraic. It doesn't work, never has, and it is quire unclear how to fix it. --- doc/tutorial/ginac.texi | 2 -- ginac/add.cpp | 9 --------- ginac/flags.h | 1 - ginac/inifcns.cpp | 1 - ginac/mul.cpp | 7 ------- ginac/numeric.cpp | 2 -- ginac/power.cpp | 3 --- 7 files changed, 25 deletions(-) diff --git a/doc/tutorial/ginac.texi b/doc/tutorial/ginac.texi index fd5550fb..4f7e4b0f 100644 --- a/doc/tutorial/ginac.texi +++ b/doc/tutorial/ginac.texi @@ -3969,8 +3969,6 @@ table: @tab @dots{}a polynomial with (possibly complex) rational coefficients (such as @math{2/3+7/2*I}) @item @code{rational_function} @tab @dots{}a rational function (@math{x+y}, @math{z/(x+y)}) -@item @code{algebraic} -@tab @dots{}an algebraic object (@math{sqrt(2)}, @math{sqrt(x)-1}) @end multitable @end cartouche diff --git a/ginac/add.cpp b/ginac/add.cpp index 62c02d24..7f7818bc 100644 --- a/ginac/add.cpp +++ b/ginac/add.cpp @@ -247,15 +247,6 @@ bool add::info(unsigned inf) const return true; return overall_coeff.info(inf); } - case info_flags::algebraic: { - epvector::const_iterator i = seq.begin(), end = seq.end(); - while (i != end) { - if ((recombine_pair_to_ex(*i).info(inf))) - return true; - ++i; - } - return false; - } } return inherited::info(inf); } diff --git a/ginac/flags.h b/ginac/flags.h index 41965e50..b200e314 100644 --- a/ginac/flags.h +++ b/ginac/flags.h @@ -250,7 +250,6 @@ public: rational_polynomial, crational_polynomial, rational_function, - algebraic, // answered by class indexed indexed, // class can carry indices diff --git a/ginac/inifcns.cpp b/ginac/inifcns.cpp index 89a3bcbf..6ac1b471 100644 --- a/ginac/inifcns.cpp +++ b/ginac/inifcns.cpp @@ -109,7 +109,6 @@ static bool func_arg_info(const ex & arg, unsigned inf) case info_flags::prime: case info_flags::crational_polynomial: case info_flags::rational_function: - case info_flags::algebraic: case info_flags::positive: case info_flags::negative: case info_flags::nonnegative: diff --git a/ginac/mul.cpp b/ginac/mul.cpp index 3f2d5cdb..eef287ca 100644 --- a/ginac/mul.cpp +++ b/ginac/mul.cpp @@ -292,13 +292,6 @@ bool mul::info(unsigned inf) const return true; return overall_coeff.info(inf); } - case info_flags::algebraic: { - for (auto & it : seq) { - if (recombine_pair_to_ex(it).info(inf)) - return true; - } - return false; - } case info_flags::positive: case info_flags::negative: { if ((inf==info_flags::positive) && (flags & status_flags::is_positive)) diff --git a/ginac/numeric.cpp b/ginac/numeric.cpp index 9b23214b..e3eec932 100644 --- a/ginac/numeric.cpp +++ b/ginac/numeric.cpp @@ -714,8 +714,6 @@ bool numeric::info(unsigned inf) const return is_odd(); case info_flags::prime: return is_prime(); - case info_flags::algebraic: - return !is_real(); } return false; } diff --git a/ginac/power.cpp b/ginac/power.cpp index 3baa3c6f..8e62af8b 100644 --- a/ginac/power.cpp +++ b/ginac/power.cpp @@ -234,9 +234,6 @@ bool power::info(unsigned inf) const case info_flags::rational_function: return exponent.info(info_flags::integer) && basis.info(inf); - case info_flags::algebraic: - return !exponent.info(info_flags::integer) || - basis.info(inf); case info_flags::expanded: return (flags & status_flags::expanded); case info_flags::positive: -- 2.34.3