MathF.Ceiling() Method in C# with Examples Last Updated : 04 Apr, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report In C#, MathF.Ceiling(Single) is a MathF class method. This method is used to find the smallest integer , which is greater than or equal to the specified single or float value in the argument list. Syntax: public static float Ceiling (float x); Here, x is the float(Single) value whose ceiling value has to be calculated. Return Type: This method return the smallest integral value which will be greater than or equal to x. Example: CSHARP // C# program to illustrate the // MathF.Ceiling(Single) Method using System; class GFG { // Main method static void Main() { // taking float values float x1 = 33.00f; float x2 = 99.99f; // Calculate Ceiling values by // Using MathF.Ceiling() method float r1 = MathF.Ceiling(x1); float r2 = MathF.Ceiling(x2); // Print the original values // and Ceiling values Console.WriteLine("Input Value = " + x1); Console.WriteLine("Ceiling value = " + r1); // Print the original values // and Ceiling values Console.WriteLine("Input Value = " + x2); Console.WriteLine("Ceiling value = " + r2); } } Output: Input Value = 33 Ceiling value = 33 Input Value = 99.99 Ceiling value = 100 Comment More infoAdvertise with us Next Article MathF.Log() Method in C# with Examples K Kirti_Mangal Follow Improve Article Tags : C# CSharp-method CSharp-MathF-Class Similar Reads MathF.Cbrt() Method in C# with Examples MathF.Cbrt(Single) Method is used to return the cube root of a floating point value. Syntax: public static float Cbrt (float x); Here, it takes a standard floating point number. Return Value: This method returns the cube root of the given value. Example 1: csharp // C# program to demonstrate the // 2 min read MathF.Abs() Method in C# with Examples MathF.Abs(Single) Method is used to return the absolute value of a specified float number. Syntax: public static float Abs (float x); Here, it takes a standard floating point number. Return Value: This method returns a floating point value less than Single.MaxValue. Example 1: csharp // C# program t 1 min read MathF.Pow() Method in C# with Examples In C#, MathF.Pow(Single, Single) is a MathF class method. This method is used to calculate a number raise to the power of some other number. Syntax: public static float Pow (float x, float y); Parameters: x: It is a single-precision floating-point number which is to be raised to a power and type of 2 min read MathF.Exp() Method in C# with Examples In C#, Exp(Single) is a MathF class method which is used to return the e raised to the specified power. Here e is a mathematical constant whose value is approximately 2.71828. Syntax: public static float Exp (float x); Here, x is the required number of type System.Single which specifies a power. Ret 1 min read MathF.Log() Method in C# with Examples In C#, MathF.Log() is a MathF class method. It is used to return the logarithm of a specified number. This method can be overloaded by changing the number of the arguments passed. There are total 2 methods in the overload list of the MathF.Log() method as follows: MathF.Log(Single) Method MathF.Log( 4 min read MathF.Sqrt() Method in C# with Examples In C#, MathF.Sqrt(Single) is a MathF class(present in system namespace) method which is used to calculate the square root of the specified Single or float data type value. Syntax: public static float Sqrt (float x); Here, x is the number whose square root is to be calculated and type of this paramet 2 min read Like