FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Language \ Environment \ Libraries \ Comparison
 
   
   
Abridged (A-Z) \ Complete (A-Z)  
   
  Reference for Processing (BETA) version 91+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
Name  

pow()

   
Examples  
float a = pow( 1, 3);  // Sets "a" to 1*1*1 = 1 
float b = pow( 3, 5);  // Sets "b" to 3*3*3*3*3 = 243 
float c = pow( 3,-5);  // Sets "c" to 1 / 3*3*3*3*3 = 1 / 243 = .0041 
float d = pow(-3, 5);  // Sets "d" to -3*-3*-3*-3*-3 = -243 

Description   Facilitates exponential expressions. The pow() function is an efficient way of multiplying numbers by themselves (or their reciprocal) in large quantities. For example, pow(3, 5) is equivalent to the expression 3*3*3*3*3 and pow(3, -5) is equivalent to 1 / 3*3*3*3*3.
   
Syntax  
pow(base, exponent)
   
Parameters  
base   int or float: base of the exponential expression

exponent   int or float: power of which to raise the base

   
Returns   float
   
Usage   Web & Application
   
Related   sqrt()
 
 






   
 
Updated: Fri Jul 15 16:36:00 PDT 2005
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info