Skip to content
Snippets Groups Projects
Commit ed5b2475 authored by Martin Nolte's avatar Martin Nolte
Browse files

also implement std::abs for GMPField

[[Imported from SVN: r5963]]
parent ca89a8ce
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,6 @@ namespace Dune
{
return static_cast<const mpf_class&>(*this);
}
};
......@@ -109,14 +108,23 @@ namespace Dune
namespace std
{
template< unsigned int precision >
inline Dune::GMPField< precision >
sqrt ( const Dune::GMPField< precision > &a )
{
return Dune::GMPField< precision >(sqrt(static_cast<const mpf_class&>(a)));
}
template< unsigned int precision >
inline Dune::GMPField< precision >
abs ( const Dune::GMPField< precision > &a )
{
return Dune::GMPField< precision >( abs( static_cast< const mpf_class & >( a ) ) );
}
}
#endif // HAVE_GMP
#endif // #ifndef DUNE_MULTIPRECISION_HH
#endif // #ifndef DUNE_GMPFIELD_HH
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment