Archive for October, 2010
Ruby Mathematics
The language supports the two number types, integers (whole numbers) and floating point numbers(fractions). For integers, there are instances of Class Fixnum and Bignum and floating point numbers there are instances of class float.
RoR as any programming languages can perform all forms of mathematical operations. It gives reflects integers when two integers are added and vice versa with floating point numbers which will give a floating point number when a fraction is divided by an integer. These operations are treated as intact methods along witht he various mathematical processes are also treated as methods just the same which gives them the properties of an operator of sorts. Narray as the name suggests, is a package that functions to handle arrays of large sizes. Other ruby libraries such as Vector and matrix are very strong extensions of C which can handle statistical information.
