~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/real.cc

  • Committer: Brian Aker
  • Date: 2008-10-26 00:25:23 UTC
  • mfrom: (561.1.2 devel)
  • Revision ID: brian@tangent.org-20081026002523-sadro556f2jj6k98
Committing merge from Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 */
20
20
 
21
21
 
 
22
using namespace std;
22
23
#include <drizzled/server_includes.h>
23
24
#include <drizzled/field/real.h>
24
25
#include <drizzled/error.h>
73
74
  int error= 1;
74
75
  double res= *nr;
75
76
  
76
 
  if (std::isnan(res))
 
77
  if (isnan(res))
77
78
  {
78
79
    res= 0;
79
80
    set_null();
92
93
    max_value-= 1.0 / log_10[dec];
93
94
 
94
95
    /* Check for infinity so we don't get NaN in calculations */
95
 
    if (!(std::isinf(res)))
 
96
    if (!(isinf(res)))
96
97
    {
97
98
      double tmp= rint((res - floor(res)) * log_10[dec]) / log_10[dec];
98
99
      res= floor(res) + tmp;