|
From: Ethan M. <eam...@gm...> - 2017-11-14 23:43:00
|
On Tue, Nov 14, 2017 at 3:13 PM, David Kastrup <da...@gn...> wrote: > Ethan Merritt <eam...@gm...> writes: > > > On Tue, Nov 14, 2017 at 1:39 PM, theozh <th...@gm...> wrote: > >> as described in gnuplot help, gnuplot does integer divison if the > >> dividend and the divisors are integers. > >> As a normal user, you don't expect this > > > > [shrug] integer division is "normal" for most programming and > > scripting languages. > > Octave: 0.50000 Guile: 1/2 > awk: 0.5 > Perl: 0.5 > Lua: 0.5 > Python: 0 > bc: 0 > Bash: 0 > Pascal: 0.5 > Fortran: 0 > > Now I'll grant you Fortran and Python. The rest either gives 0.5 or is > not intended for floating point calculations anyway. > You left out the most relevant of all. Gnuplot is written in C and uses C language code for internal and user-visible evaluations. [now I'm nit-picking...] Lua doesn't have integer variables, so there the question is moot. Ruby: stonelion [186] ruby print 1/2, "\n" 0 Ethan > Arguably Octave is the most relevantly similar in scope. > > -- > David Kastrup > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/ > lists/listinfo/gnuplot-info > |