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

Info iconThis 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
Background image of page 1

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

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

This note was uploaded on 05/09/2010 for the course ICS 102 taught by Professor Zaman during the Spring '10 term at Abilene Christian University.

Page1 / 2

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online