How can we find the square root of a number in F#? Do we have a Sqrt function in F# just like we have Math.Sqrt() function in Java? I am a beginner in F# and couldn't find any significant help on the internet.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With