Top "Cmath" questions

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

abs vs std::abs, what does the reference say?

Beware, I am talking about ::abs(), not std::abs() According to the cplusplus.com website, abs is supposed to behave …

c++ cmath
cmath generates syntax errors on build in Visual studio 2010 (ANSI C)

i've got to do a bit of pure ANSI C and i'm trying to do it in Visual Studio 2010. Problem …

visual-studio syntax cmath
Why is std::sin() and std::cos() slower than sin() and cos()?

Test code: #include <cmath> #include <cstdio> const int N = 4096; const float PI = 3.1415926535897932384626; float cosine[N][N]; …

c++ performance cmath trigonometry
Why is pow(int, int) so slow?

I've been working on a few project Euler exercises to improve my knowledge of C++. I've written the following function: …

c++ performance pow cmath
Square root of a negative array Python

I know that Python has the cmath module to find the square root of negative numbers. What I would like …

python arrays sqrt cmath
std::isfinite on MSVC

The C++11 and C11 standard define the std::isfinite function. Visual Studio 2012 doesn't seem to provide it as part of …

visual-c++ c++11 visual-studio-2012 c11 cmath
Error: cannot convert 'double' to 'double(double, double, double)' in assignment

I know my work is sloppy, this is my 4th assignment in this class. Any help would be appreciated, thank …

c++ string double cmath
In C, tan(30) gives me a negative value! Why?

I observe that my tan(float) function from the cmath library is returning a negative value. The following piece of …

android c math android-ndk cmath