#include <math.h>, syntax at the beginning of our code, means we automatically included these (pre-defined) functions in our program:

Technorati Tags: math.h, Library, #include, abs, long, double, mod

int abs (int x);IxIlong labs (long x);

double fabs (double x);

double sin (double x);

double cos (double x);

double tan (double x);

double asin (double x);

double acos (double x);

double atan (double x);

double sinh (double x);

double cosh (double x);

double tanh (double x);

double exp (double x);e^{x}

double log (double x);ln x

double log10 (double x);log xdouble pow (double x,double y);x^{y}

double sqrt(double x); sqare root ofx

double fmod(double x, double y);x mod ydouble ceil (double x);

double floor(double x);

Technorati Tags: math.h, Library, #include, abs, long, double, mod

This Website is optimized for Firefox. Users browsing with Internet Explorer may encounter problems while viewing pages.

- Lesson 1
- Lesson 2
- Lesson 3
- Lesson 4
- Lesson 5
- Lesson 6
- Lesson 7
- Lesson 8
- Lesson 9
- Lesson 10
- Lesson 11
- Lesson 12
- Lesson 13
- Lesson 14
- Lesson 15
- Lesson 16
- Lesson 17
- Lesson 18
- Lesson 19

- Binary To Decimal
- Decimal To Binary
- Decimal To Hexadecimal
- Decimal To Decimal
- Hexadecimal To Decimal
- Hex, Octal, Binary

- Lesson 13: Hello World! - A Classic -
- Lesson 12: Switch-Case, Break; and Continue;
- Lesson 11: Infinite and Finite Loops
- Lesson 10: Program Iterations
- Lesson 9: Two-sided and Multi-sided Selections
- Lesson 8: Conditional and Logical Operators
- Lesson 7: Assigning, Comparison, IF Conditions
- Lesson 6: ASCII code and character variables
- Lesson 5: Operators and Integer operations
- Lesson 4: Casting data types

Daily Lessons for programming in Visual Studio, using C code.

The only thing I'm missing here is the unit-system that is used for angular calculations (sin, cos, tan and its variants). I mean in the sense of radians, degrees, etc.

And as for the log(), you might want to put the base value thats used near it (base=e=2.718281828).

PS, another trick I like to apply myself when I need to calculate the root of another power than 2 is: pow(number, 1/power)