John Joyce
3/30/2007 11:40:00 AM
I meant in general. For portability and dealing with float math.
Lots of solutions exist of course. One of them is Ruby's BigDecimal
On Mar 30, 2007, at 4:20 PM, Robert Klemme wrote:
> On 30.03.2007 08:10, John Joyce wrote:
>> Yep, you can do integer division but do it last for best results.
>> you can also throw a .to_f method onto everything for your
>> division..
>> The only way around real division errors is to use large integers,
>> keep track of decimal location in your own custom object for
>> display purposes and thus push the division error way way down to
>> a small, insignificant number.
>
> There is another way: BigDecimal.
>
> robert
>