These functions assign new values to already initialized floats (see section Initialization Functions).
The argument base may be in the ranges 2 to 36, or -36 to -2. Negative values are used to specify that the exponent is in decimal.
Unlike the corresponding mpz
function, the base will not be determined
from the leading characters of the string if base is 0. This is so that
numbers like `0.23' are not interpreted as octal.
White space is allowed in the string, and is simply ignored. [This is not really true; white-space is ignored in the beginning of the string and within the mantissa, but not in other places, such as after a minus sign or in the exponent. We are considering changing the definition of this function, making it fail when there is any white-space in the input, since that makes a lot of sense. Please tell us your opinion about this change. Do you really want it to accept "3 14" as meaning 314 as it does now?]
This function returns 0 if the entire string up to the '\0' is a valid number in base base. Otherwise it returns -1.
Go to the first, previous, next, last section, table of contents.