~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/functions/round.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:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
 
20
using namespace std;
20
21
#include <drizzled/server_includes.h>
21
22
#include CSTDINT_H
22
23
#include <drizzled/functions/round.h>
109
110
  tmp=(abs_dec < array_elements(log_10) ?
110
111
       log_10[abs_dec] : pow(10.0,(double) abs_dec));
111
112
 
112
 
  if (dec_negative && std::isinf(tmp))
 
113
  if (dec_negative && isinf(tmp))
113
114
    tmp2= 0;
114
 
  else if (!dec_negative && std::isinf(value * tmp))
 
115
  else if (!dec_negative && isinf(value * tmp))
115
116
    tmp2= value;
116
117
  else if (truncate)
117
118
  {