Date: 06/03/05 (Asp Dot Net) Keywords: no keywords an interesting thing that i noted while working on an app the other day.. i had to round up some currency to the nearest nickel and found some peculiar thing with .NET's Math.Round.. it wasn't exactly doing the same sort of arithmetic rounding that we learn as kids (with an upwards bias), where you would round up if the trailing digit is >=5 and round down if the trailing digit is <5. i ended up writing my own customized rounding function using a variant of an assymetric arithmetic rounding algorithm that rounds up to the nearest 0.05. Source: http://www.livejournal.com/community/aspdotnet/34746.html
|