Home > How-To Library > Math

How to find Square root of a given number

**************************************************************** * © 2007 CodeItBetter http://www.codeitbetter.com * * This notice MUST stay intact for legal use * ****************************************************************
Public Function dblSqrt(ByVal dblParameter As Double) As Double 'Check if the input parameter is negative If dblParameter < 0 Then 'If the input parameter is negative, return -1 dblSqrt = -1 Else 'If the input parameter is positive, return its square root dblSqrt = Sqr(dblParameter) End If End Function

If you would like to submit your code here please us. Do not forget to mention your name. We are always thankful to each and everyone of you who submitted their code here.