slide05 - ICS 103 Computer Programming in C Handout-5 Topic...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ICS 103: Computer Programming in C Handout-5 Topic: Simple Standard Mathematical Library Functions. Objective: To know about standard Mathematical library Functions and their use with examples. Use of predefined mathematical library functions: To write the mathematical functions like sin, cos, tan, square root, square, power, absolute value,  etc., the library header file called math.h should be included in the beginning of the program along  with the stdio.h file as: #include <stdio.h> #include <math.h> For sin, cos, tan the degrees should be converted into radians.   To convert degrees to radians multiply the degrees with 3.14/180 where 3.14 is the value of PI. For example,  sin30 0  is written as sin(30*3.14/180), a 5  is written as pow(a,5). To write the following expression x = sin45 0  + cos90 0  + log 10 6 + b 4 we write x = sin(45*3.14/180) + cos(90*3.14/180) + log10(6) + pow(b,4) The following Example Shows explanation and use of some important
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern