This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yang8621
Recipients yang8621
Date 2021-04-26.02:52:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619405564.97.0.595981007242.issue43940@roundup.psfhosted.org>
In-reply-to
Content
from ctypes import *
import struct

i = int('7f94e57c', 16)
cp = pointer(c_int(i))
fp = cast(cp, POINTER(c_float))
print(fp.contents.value) # nan
print(struct.pack(">f", fp.contents.value).hex()) # 7fd4e57c

# value changed: 7f94e57c -> 7fd4e57c
History
Date User Action Args
2021-04-26 02:52:44yang8621setrecipients: + yang8621
2021-04-26 02:52:44yang8621setmessageid: <1619405564.97.0.595981007242.issue43940@roundup.psfhosted.org>
2021-04-26 02:52:44yang8621linkissue43940 messages
2021-04-26 02:52:44yang8621create