On Thu, Feb 9, 2012 at 4:17 PM, luk malcik <aport99 / gmail.com> wrote:

> def pierw
>  x1 = -(b - (Math.sqrt(@d))/2*a)
>

If this is supposed to be the solutions of a.x^2 + b.x + c = 0,
then it would be

x1 = -(b + Math.sqrt(discriminator))/(2*a)
x2 = -(b - Math.sqrt(discriminator))/(2*a)

I think you have a bracket wrong ...

HTH,

Peter

-- 
*** Available for a new project ***

Peter Vandenabeele
http://twitter.com/peter_v
http://rails.vandenabeele.com
http://coderwall.com/peter_v