~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/math/sqrt.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-09-13 01:03:01 UTC
  • mto: (1126.9.2 captain-20090915-01)
  • mto: This revision was merged to the branch mainline in revision 1133.
  • Revision ID: osullivan.padraig@gmail.com-20090913010301-tcvvezipx1124acy
Added calls to the dtrace delete begin/end probes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
21
 
#include <math.h>
 
20
#include <drizzled/server_includes.h>
22
21
#include <drizzled/function/math/sqrt.h>
23
22
 
24
 
namespace drizzled
25
 
{
26
 
 
27
23
double Item_func_sqrt::val_real()
28
24
{
29
25
  assert(fixed == 1);
30
26
  double value= args[0]->val_real();
31
27
  if ((null_value=(args[0]->null_value || value < 0)))
32
 
    return 0.0;
 
28
    return 0.0; /* purecov: inspected */
33
29
  return sqrt(value);
34
30
}
35
31
 
36
 
} /* namespace drizzled */