- Posts: 247
- Thank you received: 0
NCam : Can not enter float values after update to latest deb
- eFalegname
- Offline
- Elite Member
-
Less
More
9 years 1 month ago #98684
by eFalegname
Replied by eFalegname on topic NCam : Can not enter float values after update to latest deb
Please Log in to join the conversation.
9 years 1 month ago #98691
by FernV
Replied by FernV on 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
I used it for days without issue, let me know if you do have some
Fern
Please Log in to join the conversation.
- eFalegname
- Offline
- Elite Member
-
Less
More
- Posts: 247
- Thank you received: 0
9 years 1 month ago #98703
by eFalegname
Replied by eFalegname on 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!
all it's ok, now the calculator works fine.
Thank you!
Please Log in to join the conversation.
9 years 1 month ago #98866
by newbynobi
Replied by newbynobi on 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
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
Please Log in to join the conversation.
9 years 1 month ago #98868
by newbynobi
Replied by newbynobi on topic NCam : Can not enter float values after update to latest deb
Hallo Floris,
have you tried the Pi part?
Norbert
have you tried the Pi part?
Norbert
Please Log in to join the conversation.
9 years 1 month ago #98873
by FernV
Replied by FernV on 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
It will be changed tonight.
Fern
Please Log in to join the conversation.
9 years 1 month ago #98888
by FernV
Replied by FernV on 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
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
Please Log in to join the conversation.
Time to create page: 0.053 seconds
