2017-09-12 3:48 GMT+02:00 Steven D'Aprano firstname.lastname@example.org:
k = float("0x1.2492492492492p-3") # 1/7
Why wouldn't you just write 1/7?
1/7 is irrational, so it's not easy to get the "exact value" for a 64-bit IEEE 754 double float.
I chose it because it's easy to write. Maybe math.pi is a better example :-)