On this page
ctypes.c_double
Prev: ctypes.c_char_p | Up: ctypes | Next: ctypes.c_double_complex
Rel: ctypes.addressof, ctypes.alignment, ctypes.ArgumentError, ctypes.Array
Ref: docs.python.org — ctypes.c_double
Tags: #public #python3 #stdlib #ctypes
Import
import ctypes
from ctypes import c_double
Signature & Overview
ctypes.c_double(...)
ctypes.c_double class.
Usage
import ctypes
d = ctypes.c_double(3.14)
assert abs(d.value - 3.14) < 1e-12 and ctypes.sizeof(d) == 8
Gotchas
- Maps to C
double(64-bit IEEE 754 float).
REPL Inspect
from ctypes import c_double
help(c_double)
Linked from
Related notes
- tuts/python3/stdlib_module/ctypes/c_char_p Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/c_double_complex Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/ctypes/addressof Linked here; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/alignment Linked here; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/ArgumentError Linked here; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/Array Linked here; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/BigEndianStructure shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/BigEndianUnion shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/byref shared tags: #ctypes, #stdlib