]> www.ginac.de Git - ginac.git/commitdiff
Power with a real base and even exponent reports that it's non-negative
authorVladimir V. Kisil <kisilv@maths.leeds.ac.uk>
Thu, 1 Aug 2013 13:37:45 +0000 (14:37 +0100)
committerAlexei Sheplyakov <Alexei.Sheplyakov@gmail.com>
Wed, 16 Oct 2013 05:20:30 +0000 (08:20 +0300)
Signed-off-by: Vladimir V. Kisil <kisilv@maths.leeds.ac.uk>
ginac/power.cpp

index b815d17a9e6e07f716748ff909c81dc080835994..87792b922099215e6b00b9744724eef7ca481ab6 100644 (file)
@@ -242,6 +242,8 @@ bool power::info(unsigned inf) const
                        return (flags & status_flags::expanded);
                case info_flags::positive:
                        return basis.info(info_flags::positive) && exponent.info(info_flags::real);
                        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::real) && exponent.info(info_flags::integer) && exponent.info(info_flags::even);
                case info_flags::has_indices: {
                        if (flags & status_flags::has_indices)
                                return true;
                case info_flags::has_indices: {
                        if (flags & status_flags::has_indices)
                                return true;