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

Java
C++
PHP
Java Home »  Development Class   » [  Math  ]  Screenshots 
 



Using the pow() function

/*
Java Programming for Engineers
Julio Sanchez
Maria P. Canton


ISBN: 0849308100
Publisher: CRC Press
*/

// Java for Engineers
//Filename: ExpoDemo
//Reference: Chapter 23
//Description:
//         Using the pow() function


strictfp class ExpoDemo
{
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 value Get the power value
3.  Using the Math Trig Methods Using the Math Trig Methods
4.  Using BigDecimal for Precision Using BigDecimal for Precision
5.  Demonstrate our own version round() Demonstrate our own version round()
6.  Demonstrate a few of the Math functions for Trigonometry Demonstrate a few of the Math functions for Trigonometry
7.  Exponential Demo Exponential Demo
8.  Min Demo
9.  Basic Math Demo Basic Math Demo
10.  Using strict math in applications Using 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 Demo Trigonometric Demo
19.  Complex Number Demo
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.