[CM] snd arithmetics -> odd numbers - locale thing?

anders.vinjar at bek.no anders.vinjar at bek.no
Fri Jun 19 04:51:24 PDT 2015


    a> I suspect this has something to do my locale set to print decimal
    a> numbers using comma?

Indeed.  If i do

$ LC_NUMERIC="C" snd

it behaves normally, ie. (/ 3 2.0) = 1.5

    a> I'd rather keep it like that, but it makes snd/s7 return some
    a> strange things here.  Any cures?

I could wrap snd into this.  But having this dependent on locale
settings would presumably make strange errors for many users, so perhaps
better to find another way to print things.

It makes problems where the bogus number returned is used 'literally',
ie. stored in markov-tables etc.



More information about the Cmdist mailing list