I think you mean 1 / (2 << n).

Well, this is clearly something you are supposed to work out on your own, but I'll help by telling you two ways you could go about it.

1. Build your own class to represent very large precision numbers. As Stephen suggests, you could use byte arrays but I think a string would make development easier. Implement methods for Math.Pow and division.

2. Using C#, use the built in BigInt type in System.Numerics. This has all the methods you need, but only works with integers. (Hint: Multiply everything by 10 to the power of 200 and stick the point in afterwards).

It takes six lines of code....

16,016,744 members