From: "Jan E." Date: 2012-12-05T20:13:55+09:00 Subject: Re: Vectors & Surds in Ruby Nuggety Nanna wrote in post #1087895: > Thanks, for the reply. With the Vector class, I am unsure how to set the > vector a value, when I try it in irb i am given the error "NameError: > uninitialized constant Vector". The Vector class is part of the standard library, so you need to include the files: require 'matrix' Nuggety Nanna wrote in post #1087895: > Also with the expressing surds, I want > to take a float value and then express in in it's exact value eg 1.73 as > √3. This obviously makes no sense. An inexact value is an inexact value, there's no way to get back the original number, because you simply don't know which one it is. For example, all surds above the maximum floating point number map to this same number. Unless there are other specifications that you didn't tell us, this is nonsensical. -- Posted via http://www.ruby-forum.com/.