Created
February 7, 2017 09:50
-
-
Save mgravell/92d327bac5f3722b728922161c262f19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
using System.Runtime.CompilerServices; | |
class Program | |
{ | |
static void Main() | |
{ | |
var val = GetValue(); | |
// DoubleConverter is from http://jonskeet.uk/csharp/DoubleConverter.cs | |
Console.WriteLine(DoubleConverter.ToExactString(val)); | |
// 392.69999999999998863131622783839702606201171875 | |
} | |
[MethodImpl(MethodImplOptions.NoInlining)] | |
static double GetValue() | |
{ | |
return 392.7; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment