Relative Content

Tag Archive for pythonfloating-pointinteger

In Python, what expression is equivalent to `0x1.0p-53`?

I’m reading that when xoshiro++ is implemented in C to generate uniform doubles in the unit interval, a 64-bit unsigned integer x should be converted to a 64-bit double using the expression (x >> 11) * 0x1.0p-53. What is the corresponding expression if (for perverse reasons) I want to implement this in Python?