Re: [Mathlib-develop] decimal point versus decimal comma
Status: Beta
Brought to you by:
st_mueller
From: Stefan M. <st...@he...> - 2008-12-30 12:29:45
|
Dear BB, the mentioned bug regarding "," and "." has been fixed over christmas. It has to do with the Locale set in JMathLib. For the output of numbers I have set the local to english. Hope this solves all issues. Regards, Stefan. bb wrote: > Hello JMathLib-list, > > After some interrupt I am back in testing and I found it confusing that > in a calculation there will be a decimal point converted to a decimal > comma! (I did not recognize that without my spectacles!) For instance: > >> 0.3+0.5 > ans = 0,8 > > > The comma is confusing for anglosaxon people and others as well, because > i. e. in Germany a comma is used instead of a point as a decimal > separator and in the usual syntax the comma is used as a matrix > separator. The question arises, is it a decimal comma or a matrix > separator? There is a good message, that the comma is forwarded > correctly as a decimal sign: > >> x=0.3+0.5 > ans = 0,8 > >> x+0.4 > ans = 1,2 > > > That is a little bit confusing, as the result of >> 0,3+0,4 > ans = 0 > ans = 3 > ans = 4 > > There is obviously meant a matrix interpretation. That means the > situation is not really clear. > > I found that error in another math-prog as well, in freemat. I do not > know if that is a problem of my (or say the OS) national setting > (Germany in my case) or if that is a general problem. But I do not have > any simple solution! I would recommend to check that problem and at > best wipe out that confusing interpretation. There is a common > understanding of mathematical syntax that should be followed in a math > program. > > Regards > > BB > > > > |