libera/#maemo/ Monday, 2019-07-15

luke-jrbrolin_empey: ?06:59
brolin_empeyluke-jr: ??07:05
luke-jr"my aforementioned floating point “problem”"07:05
luke-jrwhat problem?>07:05
brolin_empeyThe lack of rounding of the result of the prices I am adding, which should have only two decimal places.07:08
luke-jryou should never use floats for money07:08
brolin_empeyWell, I use Python as a calculator on my desktop computer and it seems that Python uses floating point in this context.07:11
DocScrutinizer05luke-jr: brolin_empey: COBOL actually uses EBDIC (sort of BCD) dezimal digits to represent and compute values, more often than not  that's money. they will know why the do this08:26
brolin_empeyMaybe I can have Python use fixed point instead of floating point?  Or use something other than Python, such as bc?08:30
MaxdamantusPython has `//` for integral division, if that's what you need.08:35
brolin_empeyIncidentally: Which interface is used to connect the integrated hardware keyboard on an ARM or MIPS handheld or notebook computer, such as the Nokia N900 or PineBook (both ARM) or Ben NanoNote (MIPS) or a computer not usually running Linux, such as the Nokia C6-00 (Symbian on ARM) or BlackBerry Classic (BlackBerry 10 on ARM)?  On x86 notebook computers, the integrated keyboard and mouse substitute are usually connected via PS/2 but I do not know how the08:39
brolin_empeyintegrated hardware keyboard and trackball or similar are connected on non-x86 computers other than Apple PowerBook m68k and PowerPC notebook computers, which use Apple Desktop Bus.08:39
MaxdamantusN900 uses i2c afaik08:41
MaxdamantusI imagine there isn't a standard interface for almost all keyboards.08:42
brolin_empeyPython: In this case, I am adding instead of dividing.08:59
MaxdamantusIf you add two ints in Python, you should get back an int.09:21
Maxdamantusthough iirc there is something liku .__iadd__, so maybe there's an operator for that too.09:21
Maxdamantusmaybe not09:21
Maxdamantusanyway, the goal should be to not get a float in the first place, rather than to convert it to int when you get it.09:22

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!