[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
abs vs flabs
From: |
Allan Stokes |
Subject: |
abs vs flabs |
Date: |
Sat, 17 Mar 2001 00:10:23 -0800 |
Yes, Jim's comment is correct. This is a case where C++ takes advantage of
operator overloading to define abs() separately for each of int, long,
float, double, and long double. In C++ fabs and labs are unnecessary flesh.
Allan
> Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp:
>
> * Change abs() to fabs() for floating point numbers.
Stroustrup says <cmath> and <math.h> are supposed to include
double abs(double);
Is that not true.
Jim
- RFA: Proposed Modifications to Test Files, Jeffrey Oldham, 2001/03/15
- Re: [pooma-dev] RFA: Proposed Modifications to Test Files, James Crotinger, 2001/03/15
- abs vs flabs,
Allan Stokes <=
- RE: [pooma-dev] RFA: Proposed Modifications to Test Files, Allan Stokes, 2001/03/17
- Re: [pooma-dev] RFA: Proposed Modifications to Test Files, Scott Haney, 2001/03/19
- Re: [pooma-dev] RFA: Proposed Modifications to Test Files, Mark Mitchell, 2001/03/19
- Re: [pooma-dev] RFA: Proposed Modifications to Test Files, Scott Haney, 2001/03/19
- Re: [pooma-dev] RFA: Proposed Modifications to Test Files, Mark Mitchell, 2001/03/19
- RE: [pooma-dev] RFA: Proposed Modifications to Test Files, Allan Stokes, 2001/03/19