From: Charles Mills Date: 2006-03-31T09:33:45+09:00 Subject: Re: Marshaling Decimal types from .NET John Lam wrote: > Decimal numbers in .NET are 128 bit values that avoid the rounding errors > that can arise from floating point calcs: > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csspec/html/vclrfcsharpspec_4_1_7.asp > > My question is: when marshaling a .NET decimal type to Ruby, what should I > do? Should I marshal it to a bigdecimal? > > Thanks > -John > http://www.iunknown.com > > ------=_Part_9810_19207910.1143749376557-- I would say yes. I expect you would have something like the following: C# Ruby ---- ---- float Float double Float decimal BigDecimal I imagine when a C# programmer uses decimal, they choose it instead of double for a reason, making a conversion from decimal to Float (double) all the more likely to cause rounding error. -Charlie