📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 05:08:41
📂
/ (Root)
/
opt
/
alt
/
ruby30
/
share
/
ri
/
system
/
Complex
📍 /opt/alt/ruby30/share/ri/system/Complex
🔄 Refresh
✏️
Editing: cdesc-Complex.ri
Read Only
U:RDoc::NormalClass[iI"Complex:ET@I"Numeric;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[ I"FA complex number can be represented as a paired real number with ;TI"Fimaginary unit; a+bi. Where a is real part, b is imaginary part ;TI":and i is imaginary unit. Real a equals complex a+0i ;TI"mathematically.;To:RDoc::Markup::BlankLine o; ;[I"AComplex object can be created as literal, and also by using ;TI"BKernel#Complex, Complex::rect, Complex::polar or to_c method.;T@o:RDoc::Markup::Verbatim;[ I"%2+1i #=> (2+1i) ;TI"%Complex(1) #=> (1+0i) ;TI"%Complex(2, 3) #=> (2+3i) ;TI"HComplex.polar(2, 3) #=> (-1.9799849932008908+0.2822400161197344i) ;TI"%3.to_c #=> (3+0i) ;T:@format0o; ;[I"GYou can also create complex object from floating-point numbers or ;TI" strings.;T@o;;[I"'Complex(0.3) #=> (0.3+0i) ;TI")Complex('0.3-0.5i') #=> (0.3-0.5i) ;TI".Complex('2/3+3/4i') #=> ((2/3)+(3/4)*i) ;TI"HComplex('1@2') #=> (-0.4161468365471424+0.9092974268256817i) ;TI" ;TI"'0.3.to_c #=> (0.3+0i) ;TI")'0.3-0.5i'.to_c #=> (0.3-0.5i) ;TI".'2/3+3/4i'.to_c #=> ((2/3)+(3/4)*i) ;TI"H'1@2'.to_c #=> (-0.4161468365471424+0.9092974268256817i) ;T;0o; ;[I">A complex object is either an exact or an inexact number.;T@o;;[I".Complex(1, 1) / 2 #=> ((1/2)+(1/2)*i) ;TI"(Complex(1, 1) / 2.0 #=> (0.5+0.5i);T;0: @fileI"complex.c;T:0@omit_headings_from_table_of_contents_below0o;;[ ; I"*ext/bigdecimal/lib/bigdecimal/util.rb;T;0o;;[ ; I"%ext/json/lib/json/add/complex.rb;T;0; 0;0[ [U:RDoc::Constant[i I"I;TI"Complex::I;T:public0o;;[o; ;[I"The imaginary unit.;T; @5;0@5@cRDoc::NormalClass0[ [[I" class;T[[;[ [:protected[ [:private[ [I"json_create;TI"%ext/json/lib/json/add/complex.rb;T[I" polar;TI"complex.c;T[I" rect;T@X[I"rectangular;T@X[I" instance;T[[;[ [;[ [;[-[I"*;T@X[I"**;T@X[I"+;T@X[I"-;T@X[I"-@;T@X[I"/;T@X[I"<=>;T@X[I"==;T@X[I"abs;T@X[I" abs2;T@X[I" angle;T@X[I"arg;T@X[I"as_json;T@U[I" conj;T@X[I"conjugate;T@X[I"denominator;T@X[I" fdiv;T@X[I"finite?;T@X[I" hash;T@X[I" imag;T@X[I"imaginary;T@X[I"infinite?;T@X[I"inspect;T@X[I"magnitude;T@X[I"numerator;T@X[I" phase;T@X[I" polar;T@X[I"quo;T@X[I"rationalize;T@X[I" real;T@X[I" real?;T@X[@Z@X[I"rectangular;T@X[I" to_c;T@X[I" to_d;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;T[I" to_f;T@X[I" to_i;T@X[I"to_json;T@U[I" to_r;T@X[I" to_s;T@X[ [U:RDoc::Context::Section[i 0o;;[ ; 0;0[I"complex.c;TI"*ext/bigdecimal/lib/bigdecimal/util.rb;TI"%ext/json/lib/json/add/complex.rb;T@;cRDoc::TopLevel
💾 Save Changes
❌ Cancel