Write repr(v) into the char buffer argument, followed by null byte. The
buffer must be "big enough"; >= 100 is very safe.
PyFloat_AsReprString(buf, x) strives to print enough digits so that
Availability: 2.*
PyFloat_FromString(buf) then reproduces x exactly.
Write repr(v) into the char buffer argument, followed by null byte. The buffer must be "big enough"; >= 100 is very safe. PyFloat_AsReprString(buf, x) strives to print enough digits so that Availability: 2.* PyFloat_FromString(buf) then reproduces x exactly.