From: Rimantas Liubertas Date: 2006-11-17T07:52:52+09:00 Subject: Re: Ruby arithmetic operations =S > All the rest of math operands work fine xDDD But how do i do: > > a) A float division ( 5 / 2 = 2.5) > b) A mod division ( 5 mod 2 = 1) > c) An integer division =S (5 div 2 = 2) >> 5 / 2.0 => 2.5 >> 5 % 2 => 1 >> 5 / 2 => 2 >> In ruby when you divide integers, you get integer division. If you want float, use floats (just add point zero). Regards, Rimantas -- http://rimantas.com/