From: "Jan E." Date: 2012-12-05T20:51:29+09:00 Subject: Re: Vectors & Surds in Ruby Nuggety Nanna wrote in post #1087904: > As for the surds, I am finding the square root of a set of values, and > want the answer as an exact value, rather than a float. Then you have to use symbolic calculations with custom square root objects. Something like the Rational class for doing exact calculations with rational numbers. You cannot use floating point methods like Math.sqrt(). See if you find a library, I'm pretty this has already been done. If you do a lot of advanced math, it might also be a good idea to outsource the calculations to a computer algebra system like Axiom and use Ruby only for getting the user input and displaying the result: http://en.wikipedia.org/wiki/Axiom_(computer_algebra_system) -- Posted via http://www.ruby-forum.com/.