Re: [RFC] Floating Point support in GMP extension

From: Date: Sun, 05 Jan 2014 17:34:51 +0000
Subject: Re: [RFC] Floating Point support in GMP extension
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-71009@lists.php.net to get a copy of this message
> * Is there any way to get rid of the locale-dependent behavior of > mpf_set_str? This sounds like it could be a big pain. (Especially given how > gmp floats are not what you use with your average user input, so seems > little useful.) > Not really... libgmp can't be told "don't do that", and unilaterally calling setlocale() is probably a bad idea (as it's not thread local). We could query localeconv() and str_replace the input to normalize '.' -> locale->decimal_point, but that's a bit hacky IMO. Or temporarily change LC_DECIMAL (when not in ZTS mode). Still hacky... -Sara

« previous php.internals (#71009) next »