Top "Cmath" questions

A C++ Math library which offers basic mathematical functions of trigonometry, exponentiation, rounding etc.

Ambiguous overload call to abs(double)

I have the following C++ code: #include <math.h> #include <cmath.h> // per http://www.cplusplus.…

c++ std cmath
When do I use fabs and when is it sufficient to use std::abs?

I assume that abs and fabs are behaving different when using math.h. But when I use just cmath and …

c++ math.h cmath
What is 1LL or 2LL in C and C++?

I was looking at some of the solutions in Google Code Jam and some people used this things that I …

c++ c math long-integer cmath
Rounding up and down a number C++

I'm trying to allow my program to round a number up and down respectively. For example, if the number is 3.6, …

c++ cmath ceil
Sin and Cos give unexpected results for well-known angles

I am sure this is a really stupid question, but when I pass an angle of 180 degrees into c/c++…

c++ floating-point trigonometry cmath
What's the difference between abs and fabs?

I checked the difference between abs and fabs on python here As I understand there are some difference regarding the …

c++ visual-studio-2013 cmath
Integer rounding in C++

I was trying to use the formula below in c++. I have both variables declared as integers and I'm expecting …

c++ int cmath
cmath compilation error when compiling old C++ code in VS2010

I've inherited a few C++ files and an accompanying makefile, which I'm trying to bring into VS2010 as a solution. …

c++ visual-studio-2010 cmath
pow() implementation in cmath and efficient replacement

I've read that cmath calculates pow(a,b) by performing exp(b*log(a)). This should not be used when …

c++ c math cmath
Ambiguous call to abs

I have a custom data type that in practice can be either float or double. On every OS except OSX, …

c++ macos c++11 cmath