home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!yale!gumby!destroyer!ncar!noao!arizona!naucse!sunset.cse.nau.edu
- From: jdc@sunset.cse.nau.edu (John Campbell)
- Newsgroups: comp.graphics.gnuplot
- Subject: Re: Bug in MS-win GNU-plot!
- Message-ID: <6342@naucse.cse.nau.edu>
- Date: 23 Jan 93 21:03:26 GMT
- References: <1jhoabINNt8n@aurora.engr.LaTech.edu>
- Sender: news@naucse.cse.nau.edu
- Distribution: usa
- Lines: 28
- Nntp-Posting-Host: sunset.cse.nau.edu
- Originator: jdc@sunset.cse.nau.edu
-
- From article <1jhoabINNt8n@aurora.engr.LaTech.edu>, by ahm@latech.edu (Albert H. Mak):
- : The bug is related to exponentiation:
- : print 100 ** 2 gives
- : 10000 a correct result, however
- : print 100 ** 3 gives
- : 16960 which is wrong.
- :
- : Now 2**15 gives -32768
- : 2**14 gives 16384
- :
- : I think integers are used mistakenly for this operator and as a result
- : overflow occured in some of these examples.
- :
- Yet another reason to consider removing integer arithmetic from gnuplot
- in the future. This has been discussed at various times in the past.
- A few people have "undone" integer arithmetic for various reasons and
- lived to tell about it. The most common reason, and possibly the most
- compelling argument, is that print 5/2 does not lie on the plot of x/2
- in gnuplot. This is very confusing to people and makes gnuplot's
- calculator a difficult instrument for non-programmers. (Of course
- print 5./2 does lie on the plot of x/2, but this is not intuitive for
- most people.) I'm not aware of any other calculator or plotting package
- that insists on preserving integer arithmetic. Floor and cieling functions
- are already in gnuplot, so floating truncations (which are important)
- can be done without using integer arithmetic.
- --
- John Campbell John.Campbell@nau.edu
- jdc@sunset.cse.nau.edu JDC@NAUVAX.UCC.NAU.EDU
-