.NET Framework 3.5.
I\'m trying to calculate the average of some pretty large numbers.
For instance:
using System;
using System.Linq;
class Program
{
If you know in advance that all your numbers are going to be 'big' (in the sense of 'much nearer long.MaxValue
than zero), you can calculate the average of their distance from long.MaxValue
, then the average of the numbers is long.MaxValue
less that.
However, this approach will fail if (m)any of the numbers are far from long.MaxValue
, so it's horses for courses...