From: Richard Kreckel Date: Sun, 20 Dec 2015 03:44:01 +0000 (+0100) Subject: Add support for power::info(info_flags::real). X-Git-Tag: release_1-7-0~7^2~29 X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=commitdiff_plain;h=17cb07800bff4b032976f3ac93ef70f2fc0a85a6;p=ginac.git Add support for power::info(info_flags::real). (And, while at it, clean up the surrounding code a bit.) --- diff --git a/ginac/power.cpp b/ginac/power.cpp index 8e62af8b..b5feebe2 100644 --- a/ginac/power.cpp +++ b/ginac/power.cpp @@ -229,18 +229,18 @@ bool power::info(unsigned inf) const case info_flags::cinteger_polynomial: case info_flags::rational_polynomial: case info_flags::crational_polynomial: - return exponent.info(info_flags::nonnegint) && - basis.info(inf); + return basis.info(inf) && exponent.info(info_flags::nonnegint); case info_flags::rational_function: - return exponent.info(info_flags::integer) && - basis.info(inf); + return basis.info(inf) && exponent.info(info_flags::integer); + case info_flags::real: + return basis.info(inf) && exponent.info(info_flags::integer); case info_flags::expanded: return (flags & status_flags::expanded); case info_flags::positive: return basis.info(info_flags::positive) && exponent.info(info_flags::real); case info_flags::nonnegative: return (basis.info(info_flags::positive) && exponent.info(info_flags::real)) || - (basis.info(info_flags::real) && exponent.info(info_flags::integer) && exponent.info(info_flags::even)); + (basis.info(info_flags::real) && exponent.info(info_flags::even)); case info_flags::has_indices: { if (flags & status_flags::has_indices) return true;