home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / graphics / gnuplot / 689 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  1.8 KB

  1. 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
  2. From: jdc@sunset.cse.nau.edu (John Campbell)
  3. Newsgroups: comp.graphics.gnuplot
  4. Subject: Re: Bug in MS-win GNU-plot!
  5. Message-ID: <6342@naucse.cse.nau.edu>
  6. Date: 23 Jan 93 21:03:26 GMT
  7. References: <1jhoabINNt8n@aurora.engr.LaTech.edu>
  8. Sender: news@naucse.cse.nau.edu
  9. Distribution: usa
  10. Lines: 28
  11. Nntp-Posting-Host: sunset.cse.nau.edu
  12. Originator: jdc@sunset.cse.nau.edu
  13.  
  14. From article <1jhoabINNt8n@aurora.engr.LaTech.edu>, by ahm@latech.edu (Albert H. Mak):
  15. : The bug is related to exponentiation:
  16. :     print 100 ** 2 gives
  17. :      10000        a correct result, however
  18. :     print 100 ** 3 gives
  19. :     16960        which is wrong.
  20. :     Now 2**15   gives -32768
  21. :         2**14   gives 16384
  22. : I think integers are used mistakenly for this operator and as a result 
  23. : overflow occured in some of these examples.
  24. Yet another reason to consider removing integer arithmetic from gnuplot
  25. in the future.  This has been discussed at various times in the past.
  26. A few people have "undone" integer arithmetic for various reasons and
  27. lived to tell about it.  The most common reason, and possibly the most
  28. compelling argument, is that print 5/2 does not lie on the plot of x/2
  29. in gnuplot.  This is very confusing to people and makes gnuplot's
  30. calculator a difficult instrument for non-programmers.   (Of course
  31. print 5./2 does lie on the plot of x/2, but this is not intuitive for
  32. most people.)  I'm not aware of any other calculator or plotting package
  33. that insists on preserving integer arithmetic.  Floor and cieling functions
  34. are already in gnuplot, so floating truncations (which are important)
  35. can be done without using integer arithmetic.
  36. -- 
  37.     John Campbell               John.Campbell@nau.edu
  38.         jdc@sunset.cse.nau.edu      JDC@NAUVAX.UCC.NAU.EDU
  39.