Re: [ADVANCED-DOTNET] Math.Log odd rounding behavior

2002-08-29 Thread Mark Hills
tras: http://www.cs.colostate.edu/~cs470/Lectures/Rounding.html Mark > -Original Message- > From: Moderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED]] On Behalf Of > Christoph Nahr > Sent: Wednesday, August 28, 2002 12:09 PM > To: [EMAIL PROTECTED] > Subject:

Re: [ADVANCED-DOTNET] Math.Log odd rounding behavior

2002-08-28 Thread Booth, Bill
: Re: [ADVANCED-DOTNET] Math.Log odd rounding behavior That's quite interesting. I wasn't aware of this preference for rounding towards even in numerical analysis. Still I wonder why Microsoft chose to use this rounding method instead of "normal" rounding for VB and the .NET System

Re: [ADVANCED-DOTNET] Math.Log odd rounding behavior

2002-08-28 Thread Christoph Nahr
That's quite interesting. I wasn't aware of this preference for rounding towards even in numerical analysis. Still I wonder why Microsoft chose to use this rounding method instead of "normal" rounding for VB and the .NET System.Math class -- after all, both of them aren't really terribly useful

Re: [ADVANCED-DOTNET] Math.Log odd rounding behavior

2002-08-28 Thread Henry Stapp
It's also called "Banker's Rounding". VB does this as well. -Original Message- From: Mark Hills [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 7:13 AM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Math.Log odd rounding behavior Just as an as

Re: [ADVANCED-DOTNET] Math.Log odd rounding behavior

2002-08-28 Thread Mark Hills
ity. Mark > -Original Message- > From: Moderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED]] On Behalf Of > Christoph Nahr > Sent: Tuesday, August 27, 2002 8:31 AM > To: [EMAIL PROTECTED] > Subject: Re: [ADVANCED-DOTNET] Math.Log odd rounding behavior > &

Re: [ADVANCED-DOTNET] Math.Log odd rounding behavior

2002-08-27 Thread Christoph Nahr
John, Are you familiar with the inherent inexactness of floating-point (FP) operations? If not then I would recommend that you first read Bruce M. Bush's highly informative paper "The Perils of Floating Point" at the Lahey website: http://www.lahey.com/float.htm Briefly, FP operations may not g

[ADVANCED-DOTNET] Math.Log odd rounding behavior

2002-08-26 Thread John Veson
Given the following simple program: using System; public class RoundingError { public static void Main(string[] args) { Console.WriteLine("Log2(8) = {0}", (int) Math.Log(8,2)); } } The output is 2 if you run it standalone, but 3 (the expected value) if run from within the Visual Studio.NE