Class: Fixnum
Instance Method Summary collapse
- #is_0? ⇒ Boolean
- #quo(other) ⇒ Object (also: #rdiv)
- #rpower(other) ⇒ Object (also: #**)
- #to_Dec ⇒ Object
- #to_Frac ⇒ Object
- #to_K ⇒ Object
- #to_N ⇒ Object
- #to_N0 ⇒ Object
- #to_Q ⇒ Object
- #to_R ⇒ Object
- #to_sgml ⇒ Object
- #to_Sig ⇒ Object
- #to_Z ⇒ Object
Methods included from SGML
Instance Method Details
#is_0? ⇒ Boolean
345 346 347 |
# File 'lib/m500.rb', line 345 def is_0? self === 0 ? true : false end |
#quo(other) ⇒ Object Also known as: rdiv
330 331 332 |
# File 'lib/m500.rb', line 330 def quo(other) Quotient.new!(self,1) / other end |
#rpower(other) ⇒ Object Also known as: **
334 335 336 337 338 339 340 |
# File 'lib/m500.rb', line 334 def rpower (other) if other >= 0 self.power!(other) else Quotient.new!(self,1)**other end end |
#to_Dec ⇒ Object
363 364 365 |
# File 'lib/m500.rb', line 363 def to_Dec Decimal(self,0,'0') end |
#to_Frac ⇒ Object
357 358 359 |
# File 'lib/m500.rb', line 357 def to_Frac Fraction(self,1) end |
#to_K ⇒ Object
369 370 371 |
# File 'lib/m500.rb', line 369 def to_K Kettenbruch(self.to_Frac) end |
#to_N ⇒ Object
348 349 350 |
# File 'lib/m500.rb', line 348 def to_N self > 0 ? Natural(self) : emptySet end |
#to_N0 ⇒ Object
351 352 353 |
# File 'lib/m500.rb', line 351 def to_N0 self >= 0 ? Counting(self) : emptySet end |
#to_Q ⇒ Object
360 361 362 |
# File 'lib/m500.rb', line 360 def to_Q Quotient(self,1) end |
#to_R ⇒ Object
372 373 374 |
# File 'lib/m500.rb', line 372 def to_R naught end |
#to_sgml ⇒ Object
326 327 328 |
# File 'lib/m500.rb', line 326 def to_sgml "<mn #{sgml_id}class='fixnum'>#{self.to_s}</mn>" end |
#to_Sig ⇒ Object
366 367 368 |
# File 'lib/m500.rb', line 366 def to_Sig Sigma(self.to_Q) end |
#to_Z ⇒ Object
354 355 356 |
# File 'lib/m500.rb', line 354 def to_Z Zahlen(self) end |