mirror of https://github.com/icsharpcode/ILSpy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
389 B
24 lines
389 B
using System; |
|
|
|
namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness |
|
{ |
|
class FloatingPointArithmetic |
|
{ |
|
public static int Main(string[] args) |
|
{ |
|
Issue999(); |
|
return 0; |
|
} |
|
|
|
static void Issue999() |
|
{ |
|
for (float i = -10f; i <= 10f; i += 0.01f) |
|
Console.WriteLine("{1:R}: {0:R}", M(i), i); |
|
} |
|
|
|
static float M(float v) |
|
{ |
|
return 0.99f * v + 0.01f; |
|
} |
|
} |
|
}
|
|
|