Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function OmzettenMantisse(ByVal strBinair As String) As Double
- Dim intLengte As Integer
- Dim i As Integer
- Dim strBit As String = ""
- Dim dblResult As Double
- intLengte = strBinair.Length
- dblResult = 0
- For i = 0 To intLengte - 1
- strBit = strBinair.Substring(i, 1)
- If strBit = "1" Then
- dblResult += (2 ^ -(i + 1))
- End If
- Next i
- Return dblResult
- End Function
Add Comment
Please, Sign In to add comment