⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
Math
/
View File Name :
sqrt-c.ri
U:RDoc::AnyMethod[iI" sqrt:ETI"Math::sqrt;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"1Returns the non-negative square root of +x+.;To:RDoc::Markup::BlankLine o; ; [I"Domain: [0, INFINITY);T@o; ; [I"Codomain:[0, INFINITY);T@o:RDoc::Markup::Verbatim; [I"0.upto(10) {|x| ;TI", p [x, Math.sqrt(x), Math.sqrt(x)**2] ;TI"} ;TI"#=> [0, 0.0, 0.0] ;TI"# [1, 1.0, 1.0] ;TI"## [2, 1.4142135623731, 2.0] ;TI"$# [3, 1.73205080756888, 3.0] ;TI"# [4, 2.0, 4.0] ;TI"$# [5, 2.23606797749979, 5.0] ;TI"$# [6, 2.44948974278318, 6.0] ;TI"$# [7, 2.64575131106459, 7.0] ;TI"$# [8, 2.82842712474619, 8.0] ;TI"# [9, 3.0, 9.0] ;TI"&# [10, 3.16227766016838, 10.0] ;T:@format0o; ; [I"BNote that the limited precision of floating point arithmetic ;TI"&might lead to surprising results:;T@o;; [I"=Math.sqrt(10**46).to_i #=> 99999999999999991611392 (!) ;T; 0o; ; [I"/See also BigDecimal#sqrt and Integer.sqrt.;T: @fileI"math.c;T:0@omit_headings_from_table_of_contents_below0I"Math.sqrt(x) -> Float ;T0[ I" (p1);T@/FI" Math;TcRDoc::NormalModule00