|
From: Tait <gnu...@t4...> - 2014-04-17 05:49:14
|
Funny you should mention Python, because that was in fact going to be _my_ example. Python continues to grow in popularity, and despite earlier missteps, Python now treats "1/2" as 0.5, too. Python is also an example of a language that does infinite-precision math (and is surprisingly fast at it). The one remaining counter-example is that ruby still treats "1/2" as 0, which surprised me. As for my inspiration for the suggestion, users wander in and ask for help with gnuplot several times a week. Of those, probably 40% are new users. Of those, probably 30% are confused by the integer division behavior. So the question gets asked -- usually in the form of why some polynomial function gives the wrong answer -- once or twice a week. That's obviously just anecdotal data, but if it's that confusing to that many people, even despite prominent documentation and FAQ on that exact issue, then it seemed like something worth changing. (For what it's worth, the other FAQ asked frequently enough to deserve such prominent display is the "x^2 isn't x squared" one.) > I would like to question the general statement > that "today's users don't understand integer > arithmetic no more". Can you support that claim? > > As counter-example, consider Python (as a contemporary, > dynamically-typed language, popular with the current > "data" crowd), which is similarly finicky about integers > as gnuplot. |