Hey guys small question, I have not understood the full potential with this bit...
Could anyone tell me in brief what I could do with, the lib?Code:include <cmath>
I have tried to check some e books and e Articels I just find them to be hard to understand![]()
You can read about it here;
cmath (math.h) - C++ Reference
![]()
I read it, however I couldn't get a grip of it !
if u want to use mathematical functions like sin, cos, tg etc etc etc u must first include <math.h>
![]()
Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!
It is non standard to use C style headers for a C standard library in C++. C++ uses c in front of all the headers and has no extension.
#include <cstdio> = #include <stdio.h>
#include <cstdlib> = #include <stdlib.h>
#include <cstring> = #include <string.h>
And if you are still wondering about cmath's purpose, like MathXpert said. It defines very common math functions so you don't have to re implement them yourself.Also they sometimes use assembler to speed up computations by taking advantages of the native architecture.
I'm the master of code rot
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks