Library reference

Square root

Find the positive side length of a square from its area. Multiplying the answer by itself gives the original area.

math.sqrt

Simple example

Find the square root of nine.

Start9
Result3.0
lesson.dart
import 'dart:math' as math;

void main() {
    print(math.sqrt(9.0));
}
Output
3.0
Advertisements

Everyday examples

A square garden covers 36 square metres. How long is one side?

Start36
Result6.0
lesson.dart
import 'dart:math' as math;

void main() {
    print(math.sqrt(36.0));
}
Output
6.0

A square mosaic has 81 tiles arranged in equal rows and columns. How many tiles are in one row?

Start81
Result9.0
lesson.dart
import 'dart:math' as math;

void main() {
    print(math.sqrt(81.0));
}
Output
9.0

A square stage covers 49 square metres. How long is the front edge?

Start49
Result7.0
lesson.dart
import 'dart:math' as math;

void main() {
    print(math.sqrt(49.0));
}
Output
7.0
Run the example
Terminal
dart run lesson.dart
Official documentation