함수 sqrt()

Square root
sqrt

1 Bash[ | ]

Bash
Copy
a=16
b=$(echo "sqrt($a)" | bc)
echo $b
# 4

2 Excel[ | ]

PHP
Copy
=SQRT(16)  // 4

3 Go[ | ]

Go
Copy
package main

import (
	"fmt"
	"math"
)

func main() {
	fmt.Println(math.Sqrt(16)) // 4
}
Loading

4 JavaScript[ | ]

JavaScript
Copy
document.write( Math.sqrt(16) );  // 4

5 PHP[ | ]

PHP
Copy
echo sqrt(16);  // 4

6 Python[ | ]

PHP
Copy
import math
print math.sqrt(16) // 4.0

7 Perl[ | ]

Perl
Copy
print sqrt(16); # 4

8 SQL[ | ]

8.1 MySQL[ | ]

MySQL
Copy
SELECT SQRT(2);
# 1.4142135623730951
MySQL
Copy
SELECT SQRT(16);
# 4

9 같이 보기[ | ]