C# does support generics math. I have built a method which is using this and I need to substract a generic number from the floating point value of 1. How do I accomplish this?
You can use the following code to subtract a generic number from the floating point value of 1: 

float number = 1.0f;

// Subtract a generic number from the floating point value of 1
number = number - <some_generic_number>;
C# does support generics math. I have built a method which is using this and I need to substract a generic number from the floating point value of 1. How do I accomplish this?

```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GenericMath
{
    class Program
    {
        static void Main(string[] args)
        {
            // The following line does not work:
            // int a = Subtract(1f, 2);

            float a = Subtract(1f, 2f);
            Console.WriteLine(a);
        }

        static T Subtract<T>(T a, T b)
        {
            return (T)(a - b);
        }
    }
}
```

Comment: You're trying to do something that can't be done. The subtraction must be done at compile time, but the type of the result depends on the types of `a` and `b`.

Comment: @Brian: But the type of the result is always the same: a float.

Comment: @Brian: No, it's not. If `a` is a `double`, and `b` is a `float`, the result will be a `double`.

Comment: @Brian: It is possible to do this. You can use `dynamic`.

Comment: @Brian: I'm not sure what you mean. The result of `a