* Interface to GiNaC's symbolic exponentiation (basis^exponent). */
/*
- * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2002 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// utility functions
-/** Return the power object handled by an ex. Deprecated: use ex_to<power>().
- * This is unsafe: you need to check the type first. */
-inline const power &ex_to_power(const ex &e)
-{
- return static_cast<const power &>(*e.bp);
-}
-
/** Efficient specialization of is_exactly_a<power>(obj) for power objects. */
template<> inline bool is_exactly_a<power>(const basic & obj)
{
}
/** 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