X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fpower.h;h=97072e2a4d3ad50ec11768c7d4a891b69f4f9460;hb=0c8c12f5393a7ca5f78233af5ee81593184c35fb;hp=175fea057c39fa12fb25388f478ff2a9b293eb6d;hpb=aa6281216091efd92dc5fcc3f96c7189114e80f1;p=ginac.git diff --git a/ginac/power.h b/ginac/power.h index 175fea05..97072e2a 100644 --- a/ginac/power.h +++ b/ginac/power.h @@ -90,13 +90,6 @@ protected: // utility functions -/** Return the power object handled by an ex. Deprecated: use ex_to(). - * This is unsafe: you need to check the type first. */ -inline const power &ex_to_power(const ex &e) -{ - return static_cast(*e.bp); -} - /** Efficient specialization of is_exactly_a(obj) for power objects. */ template<> inline bool is_exactly_a(const basic & obj) { @@ -120,7 +113,11 @@ inline ex pow(const T1 & b, const T2 & e) } /** Square root expression. Returns a power-object with exponent 1/2. */ -ex sqrt(const ex & a); +inline ex sqrt(const ex & a) +{ + extern const ex _ex1_2; + return power(a,_ex1_2); +} } // namespace GiNaC