Matt Wilson <[EMAIL PROTECTED]> writes:

> On Thu, Mar 09, 2000 at 03:04:03PM +0100, Andreas Voegele wrote:
> > Probably LC_NUMERIC should be set to "C" in gtkmodule.c after calling
> > gtk_set_locale():
> 
> This only hides the problem.  I will investigate.

I've got a similar problem:

herzog:~>LANG=de_DE python
Python 1.5.2 (#1, Nov 13 1999, 12:17:58)  [GCC egcs-2.91.66 19990314/Linux (egcs- on 
linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import gtk
>>> 2.5
2.0
>>> float("2.5")
Traceback (innermost last):
  File "<stdin>", line 1, in ?
ValueError: invalid literal for float(): 2.5
>>> 

In fact this seems to be the same problem, since .5 is compiled as 0 and
>>> 4*exp(0)/sqrt(2.0)
2.82842712475


This is on a SuSE 6.3 system. Since python normally uses libc's strtod
to convert strings to numbers, this may be a bug in libc. On my system
that's libc-2.1.2.

Setting LC_CTYPE to C "solves" it.

-- 
Bernhard Herzog   | Sketch, a drawing program for Unix
[EMAIL PROTECTED]  | http://sketch.sourceforge.net/
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to