Square root function in F#

F# already has a sqrt function defined, so you should just be able to use:

sqrt x

where x is the value you wish to find the root of.


Yes, F# comes with a "sqrt" function. Called "sqrt" :)

http://blogs.msdn.com/b/dsyme/archive/2008/09/01/the-f-operators-and-basic-functions.aspx

Many more numerical libraries are available for F#, either open source (e.g. CodePlex) or from 3rd party vendors:

http://msdn.microsoft.com/en-us/library/vstudio/hh304372%28v=vs.100%29.aspx