• rbarryyoung (8/7/2008)


    skyline666 (8/7/2008)


    Got it right :cool:. Out of interest, what was the "@b bigint" for, to try and confuse people with the @b-17 answer :D?

    Actually, if was to give versimilitude to the first answer: "16^16 = 2^64 which is out of bigint's range". I figured that folks would see think "Aha! BigInt DOES have 64 bits, but half of the range is negative, so it can actually only go up to 2**63!". And so, thinking that they had detected my trick would go with that.

    Actually, it was not any trick here. Because someone would select 16^16 which returns 0. And this means that the input for sqrt will be a negative number. According to BOL, sqrt should receive negative numbers also (float).

    In Theory, theory and practice are the same...In practice, they are not.