Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace FPTest
- {
- class Program
- {
- static void Main(string[] args)
- {
- // These values don't _really_ matter. These were chosen
- // because they demonstrate a fairly large difference
- // in precision
- const Single a = 21.453241f;
- const Single b = 1654853;
- const Single c = 0.5f;
- var scoreValue = Score(a, b, c);
- Console.WriteLine(scoreValue);
- Console.WriteLine((Double)scoreValue);
- Console.WriteLine((Double)Score(a, b, c));
- }
- static Single Score(Single a, Single b, Single c)
- {
- return a + (b - a) * c;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement