Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2853

Re: Curiosity: Arithmetic operations and leading zeros

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date Wed, 01 Apr 2015 06:25:52 -0500
Date Wed, 01 Apr 2015 06:25:50 -0500
From Richard Owlett <rowlett@cloud85.net>
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26.1
MIME-Version 1.0
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Curiosity: Arithmetic operations and leading zeros
References <b286ed07-4f0a-4fd2-bf03-dd3176de25f0@googlegroups.com>
In-Reply-To <b286ed07-4f0a-4fd2-bf03-dd3176de25f0@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Message-ID <D4WdnR9wePZdSIbInZ2dnUU7-UOdnZ2d@supernews.com> (permalink)
Lines 24
X-Trace sv3-ZED3Vd06fldealyaxH0ytGFL48lfgFG8+lKsbD/8SmXdHB+QvzNMq9yyDz3PXP/XoDM+vC41x2o4CXX!bTwc3ZRiJLw9iCnWQ8GXubfmogZ1ZED4WOe/i9arY/u+Owi51nTuurMQhtcoyyYtHsFSWCAutIGI!EIfjD8nP/hk=
X-Complaints-To www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 1831
Xref csiph.com comp.graphics.apps.gnuplot:2853

Show key headers only | View raw


j.strecha@gmail.com wrote:
> Hi,
>
> I recently discovered something curious about arithmetic operations in gnuplot:
>
>> gnuplot> print 2*66
>> 132
>> gnuplot> print 2*066
>> 108
>
> (gnuplot 5.0 patchlevel rc2)
>
> Apparently the multiplication behaves differently when leading zeros are present. Is this a bug, or a feature?
>
> Regards,
> JS
>

How does gnuplot handle input of octal numbers? {I don't have 
gnuplot on this machine to check.)

I notice that for your example that for example shown the answer 
is correct for octal input and defaulting to decimal on output.

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Curiosity: Arithmetic operations and leading zeros j.strecha@gmail.com - 2015-04-01 03:43 -0700
  Re: Curiosity: Arithmetic operations and leading zeros Richard Owlett <rowlett@cloud85.net> - 2015-04-01 06:25 -0500
    Re: Curiosity: Arithmetic operations and leading zeros j.strecha@gmail.com - 2015-04-01 05:57 -0700
      Re: Curiosity: Arithmetic operations and leading zeros Karl <mail.kfr@gmx.net> - 2015-04-02 20:43 +0200

csiph-web