printfn / fend

Arbitrary-precision unit-aware calculator
https://printfn.github.io/fend
MIT License
587 stars 50 forks source link

Allow the usage of commas as a decimal separator. #302

Open pivotiiii opened 1 week ago

pivotiiii commented 1 week ago

Hey, in German (and other European) locale the meaning of the dot and comma in numbers is the other way around from how fend displays numbers right now. An English number of 1,000.123 would be written as 1.000,123. The numpad also uses a comma instead of a dot, so entering math with just the numpad can lead to errors that are not readily apparent, e.g. with my German keyboard I would enter 100-1,9 and get a result of 81 instead of the expected 98,1. While the error is obvious in this example, more complicated inputs can hide it, e.g. sin(1,2) != sin(1.2).

I would love to get either a command line or compile time option to switch the usage of commas/dots :)

printfn commented 6 days ago

Thanks for the suggestion, I agree this would be a cool feature to implement!