I am testing out BigIntegers.
When I take a large odd number and divide it by 2, I get an integer as an anwser, without any indication that it could not divide the number exactly.
So first question is how do I know that two numbers divide exactly.
I then tested it with a small number, an this code:
string myNumberAsString = "25";
System.Text.UTF8Encoding encoding=new System.Text.UTF8Encoding();
byte[] myNumberAsByteArray = encoding.GetBytes(myNumberAsString);
BigInteger myNumber = new BigInteger(myNumberAsByteArray);
Console.WriteLine(myNumber / 2);
Gives the result 6809. Anybody know why or can see what is wrong with my code?
I am using the .net 4.0 implementation of BigInteger