#2 The functions listed here perform operations such as - TopicsExpress



          

#2 The functions listed here perform operations such as rounding and truncation of floating-point values. Some of these functions convert floating point numbers to integer values. They are all declared in math.h. Floor and ceiling functions In mathematics and computer science, the floor and ceiling functions map a real number to the largest previous or the smallest following integer, respectively Ceil function is used to round up a number i.e. it returns the smallest number which is greater than argument passed to it. eg... printf(\n Res : %1f , ceil(1.44) ); //output Res : 2.0 floor function is used to round up a number i.e. it returns the smallest number which is smaller than argument passed to it. printf(\n Res : %1f , floor(1.44) ); //output res : 1.0
Posted on: Mon, 20 Jan 2014 08:31:13 +0000

Trending Topics



Recently Viewed Topics




© 2015