This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Where is C++'s math.h's double abs(double)?
- To: Jeffrey Oldham <oldham at codesourcery dot com>
- Subject: Re: Where is C++'s math.h's double abs(double)?
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Mon, 2 Apr 2001 15:13:07 -0700 (PDT)
- cc: libstdc++ at gcc dot gnu dot org
"C" == math.h
"C++" == cmath
this works:
#include <iostream>
#include <cmath>
int main()
{
std::cout << std::abs(-1.23e+3) << std::endl;
return 0;
}
-benjamin