sqrt()

Prototype

template <class X>
typename sqrt_functor<X>::result_type sqrt(X const&) ;

Description

Compute the square root: glas::sqrt(x) is a short cut for sqrt_functor<X>()(x).

The reason glas has its own sqrt function is because of the extensibility through the use of the sqrt_functor<X>()(x) for which sqrt(X) is just a shortcut.

Example

double d ;
d = glas::sqrt(d) ;

Definition

Defined in sqrt.hpp

Template parameters

ParameterDescriptionDefault
Xtype of argument and result 

Type requirements