Did I find the right examples for you? yes no

# float.fromhex

All Samples(87)  |  Call(87)  |  Derive(0)  |  Import(0)
```float.fromhex(string) -> float

Create a floating-point number from a hexadecimal string.
>>> float.fromhex('0x1.ffffp10')
2047.984375
>>> float.fromhex('-0x1p-1074')
-4.9406564584124654e-324
```

```def floatfromhex(h):
t = float.fromhex(h)
if t > float.fromhex('7FFF'):
t = -(float.fromhex('FFFF') - t)
pass
```
```        after = self.con.after
rval = after.split()[1:]
return [long(float.fromhex(n)) for n in rval]

# Notification handle = 0x0025 value: 9b ff 54 07
```
```                after = self.con.after
hxstr = after.split()[3:]
handle = long(float.fromhex(hxstr[0]))
#try:
if True:
```

```def floatfromhex(h):
t = float.fromhex(h)
if t > float.fromhex('7FFF'):
t = -(float.fromhex('FFFF') - t)
pass
```
```        after = self.con.after
rval = after.split()[1:]
return [long(float.fromhex(n)) for n in rval]

# Notification handle = 0x0025 value: 9b ff 54 07
```
```                after = self.con.after
hxstr = after.split()[3:]
handle = long(float.fromhex(hxstr[0]))
#try:
if True:
```

```		elif isinstance(number, str):
# Validity check
float.hex(float.fromhex(number))
is_negative = number.startswith("-")
point_position = number.index('.')
```

```			else:
# Validity check
float.hex(float.fromhex(number))
else:
raise TypeError('Unsupported constant type {0} for constant {1}'.format(type(number), number))
```

```    # http://xkcd.com/426/
h = hashlib.md5(datedow).hexdigest()
p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])]
print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:]))

```

```    # http://xkcd.com/426/
h = hashlib.md5(datedow).hexdigest()
p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])]
print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:]))

```

```       alpha = "{:02x}".format(int(conf.subtitle_alpha * 255))
color = conf.subtitle_color.replace("#", "")
color = int(float.fromhex("".join((alpha, color))))
self._text_overlay.props.color = color

```
```       alpha = "{:02x}".format(int(conf.time_alpha * 255))
color = conf.time_color.replace("#", "")
color = int(float.fromhex("".join((alpha, color))))
self._time_overlay.props.color = color

```

```def parseFloat(s):
s = s[:-1]
if s.strip('-')[:2].lower() == '0x':
f = float.fromhex(s)
else:
```
```def parseDouble(s):
if s.strip('-')[:2].lower() == '0x':
f = float.fromhex(s)
else:
f = float(s)
```

```    # http://xkcd.com/426/
h = hashlib.md5(datedow).hexdigest()
p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])]
print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:]))

```

```    # http://xkcd.com/426/