From: Mahadev Ittina Date: 2009-10-31T21:54:33+09:00 Subject: Really small numbers in ruby coming as zero!? hello I have this piece of code written to analyse the cross section and give the reinforcement for a concrete beam.. #initializing some constants.. pls ignore this part! M = 340000000 h = 630 b = 300 fck = 40 d = b-30 # This is where I am having my problem K = ((M) / (b*(d**2)*fck)).to_f # I have defined other constants.. but didn't wanna crowd the question z = (d/2) * (1 + Math.sqrt(1-2*(K/kappa))) area_steel = (M) / (fyd*z) puts "Area of Steel Required " + area_steel.to_s + " sq. mm" *end of code* thanks for your help cheers! -- Posted via http://www.ruby-forum.com/.