rmml.net
当前位置:首页 >> 用python转换浮点数为16进制怎么写?比如把34.4536... >>

用python转换浮点数为16进制怎么写?比如把34.4536...

# -*- coding: utf8 -*-import ctypesdef h2f(s): cp = ctypes.pointer(ctypes.c_longlong(s)) fp = ctypes.cast(cp, ctypes.POINTER(ctypes.c_double)) return fp.contents.valuedef f2h(s): fp = ctypes.pointer(ctypes.c_double(s)) cp = cty...

网站首页 | 网站地图
All rights reserved Powered by www.rmml.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com