expression-evaluator-c-sharp icon indicating copy to clipboard operation
expression-evaluator-c-sharp copied to clipboard

Evaluating decimal constants

Open ErosOlmi opened this issue 3 years ago • 3 comments

Hi,

I tried to evaluate "pi/2" and result is ok: 1.570796 Then I tried to evaluate "pi/2+1.570796" but result is "1570797,570796" It seems decimal separator (.) is not interpreted or I'm missing something.

My system is in Italian and if I try to use comma as decimal separator I get error.

Thanks a lot

ErosOlmi avatar Oct 05 '21 15:10 ErosOlmi

Dear @ErosOlmi , Thank you for using my library, I will check this error soon.

matheval avatar Oct 06 '21 11:10 matheval

Hello, I am having the same problem. My system is in brazilian portuguese if that makes any difference.

Edit: Setting "CultureInfo.CurrentCulture = CultureInfo.InvariantCulture" before the evaluation "fixed it".

Gedof avatar Mar 25 '22 20:03 Gedof

Hello, I am having the same problem. My system is in brazilian portuguese if that makes any difference.

Edit: Setting "CultureInfo.CurrentCulture = CultureInfo.InvariantCulture" before the evaluation "fixed it".

@Gedof Thank you somuch,

matheval avatar Mar 26 '22 00:03 matheval