The implementation of BsonValue.compareTo for numeric types does not match the behavior of the server. The problem is that casting the long to double and comparing two doubles will discard precision of very large or very small long values, and therefore result in two values comparing as equal when one is actually larger or smaller. A simple example is:
> ((double)long.MaxValue) > ((double)(long.MaxValue - 1)) false
The server algorithm for comparing Int64 and double is here: https://github.com/mongodb/mongo/blob/master/src/mongo/base/compare_numbers.h#L77-L100
It's easily portable to C#.