I hope you can read the code and understand how it works.

You should be able to construct the inverse function from this source.

Please comment if you have any questions.

FUNCTION f (a AS STRING)

g = (ASC(MID$(a, 3)) AND &H7F) / 2 ^ 7

g = g + ASC(MID$(a, 2)) / 2 ^ 15

g = g + ASC(MID$(a, 1)) / 2 ^ 23

f = (1 - ((ASC(MID$(a, 4)) AND 128) / 64)) * (1 + g) * 2 ^ ((ASC(MID$(a, 4)) AND &H7F) * 2 + ((ASC(MID$(a, 3)) AND 128) / 128) - &H7F)

END FUNCTION