Using the pow() function : Math : Development Class : Java examples (example source code) Organized by topic

Java
1. 2D Graphics GUI
2. 3D
3. Advanced Graphics
4. Ant
5. Apache Common
6. Chart
7. Collections Data Structure
8. Database SQL JDBC
9. Design Pattern
10. Development Class
11. Email
12. Event
13. File Input Output
14. Game
15. Hibernate
16. J2EE
17. J2ME
18. JSP
19. JSTL
20. Language Basics
21. Network Protocol
22. PDF RTF
23. Regular Expressions
24. Security
25. Servlets
26. Spring
27. Swing Components
28. Swing JFC
29. SWT JFace Eclipse
30. Threads
31. Tiny Application
32. Velocity
33. XML
Java Tutorial
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Java » Development Class » MathScreenshots 
Using the pow() function

strictfp class MainClass {
  public static void main(String[] args) {
    // Display the square root of 2 using sqrt()
    System.out.print("sqrt(2.0) = ");
    System.out.println(Math.sqrt(2.0));
    // Calculate and display using pow()
    System.out.print("pow(2.0, 0.5) = ");
    System.out.println(Math.pow(2.00.5));
    System.out.println();
  }
}



           
       
Related examples in the same category
1. Absolute value
2. Get the power valueGet the power value
3. Using the Math Trig MethodsUsing the Math Trig Methods
4. Using BigDecimal for PrecisionUsing BigDecimal for Precision
5. Demonstrate our own version round()Demonstrate our own version round()
6. Demonstrate a few of the Math functions for TrigonometryDemonstrate a few of the Math functions for Trigonometry
7. Exponential DemoExponential Demo
8. Min Demo
9. Basic Math DemoBasic Math Demo
10. Using strict math in applicationsUsing strict math in applications
11. Conversion between polar and rectangular coordinates
12. Using strict math at the method level
13. Calculating hyperbolic functions
14. Calculating trigonometric functions
15. Weighted floating-pioint comparisons
16. Solving right triangles
17. Applying the quadratic formula
18. Trigonometric DemoTrigonometric Demo
19. Complex Number Demo
Home | Contact Us
Copyright 2003 - 07 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.