Ruby Fixnum Functions

EditRocket provides the following information on Fixnum functions in the Ruby source code builder.

abs - Returns the absolute value of fix.

dclone() -

div(numeric) - "Performs division: the class of the resulting object depends on the class of numeric and on the magnitude of the result."

divmod(numeric) - See Numeric#divmod.

id2name - Returns the name of the object whose symbol id is fix. If there is no symbol in the symbol table with this value, returns nil. id2name has nothing to do with the method. See also Fixnum#to_sym, String#intern, and class Symbol.

induced_from(obj) - Convert obj to a Fixnum. Works with numeric parameters. Also works with Symbols, but this is deprecated.

modulo(other) - Returns fix modulo other. See Numeric.divmod for more information.

new -

power!(p1) - "Alias for #**"

quo(other) - If Rational is defined, returns a Rational number instead of a Fixnum.

rdiv(p1) - "Alias for #quo"

rpower(other) - Returns a Rational number if the result is in fact rational (i.e. other < 0).

size - Returns the number of bytes in the machine representation of a Fixnum.

to_f - Converts fix to a Float.

to_s( base=10 ) - Returns a string containing the representation of fix radix base (between 2 and 36).

to_sym - Returns the symbol whose integer value is fix. See also Fixnum#id2name.

zero? - Returns true if fix is zero.