Trusted answers to developer questions

Harris Amjad

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

The ** sqrt() function** in Perl returns the

Figure 1 below shows the mathematical representation of the `sqrt()`

function.

```
sqrt(number)
```

`sqrt()`

requires a non-negative number as a parameter. If the number is negative, an `Error`

will be thrown.

`sqrt()`

returns the square root of the number sent as a parameter.

The following example shows how to use `sqrt()`

function in Perl.

print "sqrt(4): " .sqrt(4). "\n";print "sqrt(0): " .sqrt(0). "\n";print "sqrt(25): " .sqrt(25). "\n";print "sqrt(4.5): " .sqrt(4.5). "\n";

RELATED TAGS

perl

math

sqrt

communitycreator

CONTRIBUTOR

Harris Amjad

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring

Related Courses