start page | rating of books | rating of authors | reviews | copyrights

Programming Perl

Programming PerlSearch this book
Previous: 3.2.156 sprintf Chapter 3
Functions
Next: 3.2.158 srand
 

3.2.157 sqrt

sqrt 

EXPR

 sqrt

This function returns the square root of EXPR . If EXPR is omitted, it returns the square root of $_ . For other roots such as cube roots, you can use the ** operator to raise something to a fractional power.[ 8 ]

[8] Don't try either of these approaches with negative numbers, as that poses a slightly more complex problem.


Previous: 3.2.156 sprintf Programming Perl Next: 3.2.158 srand
3.2.156 sprintf Book Index 3.2.158 srand