Annotations for "Math.Sqrt Method (System)" topic.Wed, 01 Mar 2017 21:55:27 Z
http://msdn.microsoft.com/en-us/library/8d1kb886(v=vs.100).aspx#CommunityContent
R Petrusha - MSFTHow fast is this method?I'm working with a program that will need lots lots distance(sqrt) calculations. I'm wondering how fast is this method implemented and whether it's worthwhile to build a look-up table before runtime and just do linear interpolation into that lookup table.
If the look-up table method is used, then every sqrt operation will be substituted with a look-up into a large 2D array (probably not small enough to fill into cpu cache), and a bi-linear interpolation in a grid cell. Would you think this willMon, 12 Dec 2011 16:54:53 -0800
http://msdn.microsoft.com/en-us/library/8d1kb886(v=vs.100).aspx#CommunityContent
R Petrusha - MSFTNo error for negative numbers?Why Math.Sqrt doesn't throw error for negative numbers but NaN?
Why NaN Instead of an InvalidOperationException?
In numerous cases in which an operation with integer types throws an exception, the corresponding operation with floating point types returns NaN. For example, division by zero with integer types throws a DivideByZeroException, but division by zero with floating point types returns NaN. This behavior is defined in the Common Language Infrastucture (CLI) specification, Partition Mon, 11 Jul 2011 21:46:09 -0700