- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
MathF.Exp() Method in C# with Examples
The MathF.Exp() method in C# returns the raised to the specified power.
Syntax
Following is the syntax −
public static float Exp (float val);
Above, Val is the floating-point number.
Example
Let us now see an example to implement the MathF.Exp() method −
using System; class Demo { public static void Main(){ float val = 90f; float res = MathF.Exp(val); Console.WriteLine("MathF.Exp() = "+res); } }
Output
This will produce the following output −
MathF.Exp() = Infinity
Example
Let us now see another example to implement the MathF.Exp() method −
using System; class Demo { public static void Main(){ float val = 0.00f; float res = MathF.Exp(val); Console.WriteLine("MathF.Exp() = "+res); } }
Output
This will produce the following output −
MathF.Exp() = 1
Advertisements
To Continue Learning Please Login
Login with Google