NCam : Can not enter float values after update to latest deb

More
08 Sep 2017 13:31 #98684 by eFalegname
eFalegname replied the topic: NCam : Can not enter float values after update to latest deb
More
08 Sep 2017 14:50 #98691 by FernV
FernV replied the topic: NCam : Can not enter float values after update to latest deb
You should be able to update now

I used it for days without issue, let me know if you do have some

Fern
More
08 Sep 2017 16:55 #98703 by eFalegname
eFalegname replied the topic: NCam : Can not enter float values after update to latest deb
Fern and Norbert
all it's ok, now the calculator works fine.
Thank you!
More
12 Sep 2017 08:38 #98866 by newbynobi
newbynobi replied the topic: NCam : Can not enter float values after update to latest deb
Hallo Fern,

you changes did solve the problem of the decimal separator with German Localization, but the "Pi" problem is still there.

If I push Pi, the display of the calculator shows Pi, if I then press "=" I get 314159265359,000
I I press enter, the value is concerted to be "25399997,460"

But I expected to get something like 3.14159....
That happens, because math(Pi) does return a dot separated value, nevertheless what localization you have.

That is why i changed the conversion to be

temp = temp.replace('Pi', str(math.pi).replace(".",decimal_point))

Norbert
More
12 Sep 2017 08:38 #98868 by newbynobi
newbynobi replied the topic: NCam : Can not enter float values after update to latest deb
Hallo Floris,

have you tried the Pi part?

Norbert
More
12 Sep 2017 10:27 - 12 Sep 2017 10:41 #98873 by FernV
FernV replied the topic: NCam : Can not enter float values after update to latest deb
This is really strange because even on your pc locale.atof('2.5') returned 2.5 the right value.

It will be changed tonight.

Fern
Last Edit: 12 Sep 2017 10:41 by FernV.
More
12 Sep 2017 13:27 - 12 Sep 2017 13:29 #98888 by FernV
FernV replied the topic: NCam : Can not enter float values after update to latest deb
Hi Norbert,

I was finally able to reproduce your issue. I had to use :
export LANG='de_DE'
run the test and locale.atof('2.5') finally resulted in 25.000

de_DE and fr_CA both use ',' for decimal separator and this issue never occured on my pc's as
locale.atof('2.5') always resulted in 2.500

Fern
Last Edit: 12 Sep 2017 13:29 by FernV.
Moderators: Rick G
Time to create page: 0.087 seconds
Powered by Kunena Forum