Guest User

Untitled

a guest
Feb 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. Public Function OmzettenMantisse(ByVal strBinair As String) As Double
  2. Dim intLengte As Integer
  3. Dim i As Integer
  4. Dim strBit As String = ""
  5. Dim dblResult As Double
  6.  
  7. intLengte = strBinair.Length
  8. dblResult = 0
  9.  
  10. For i = 0 To intLengte - 1
  11. strBit = strBinair.Substring(i, 1)
  12. If strBit = "1" Then
  13. dblResult += (2 ^ -(i + 1))
  14. End If
  15. Next i
  16.  
  17. Return dblResult
  18. End Function
Add Comment
Please, Sign In to add comment