Re: Announcement: Axiom, a Forth Based Universal Game Programming System



slava@xxxxxxxxx wrote:
On Aug 28, 9:08 pm, Krishna Myneni <krishnamyn...@xxxxxxxxxxxxx>
wrote:
Originally, in the days of DOS, I used
32-bit floats in an application named xyplot, to conserve memory. Now, I
actually have data which I cannot plot with this program, because the number of
significant digits is insufficient. This limitation is forcing a rewrite of a
good-sized program.

Krishna Myneni

Changing the floating point precision should not require a *rewrite*.

Slava


By "rewrite" I mean that the C++ files have to be examined, and data which is
declared as "float" must be changed to "double". Similar changes must me made to
the class declarations. I'm not sure that a simple global replace will suffice.
For example, there may be explicit casts of double numbers to float, which
should be removed. Also, casts from float to double will be redundant and should
be removed. I would be uneasy with a global replace, without doing a careful
examination of the code in parallel.

XYPLOT's built-in Forth interpreter does use double floats (two cell fp numbers
on a shared stack), so none of the Forth modules will have to change, except for
a couple of interface words which are responsible for moving data back and forth
between the Forth environment and the C++ portions.

Krishna
.



Relevant Pages

  • Re: Loss of precision when drawing gridlines and blocks on top.....
    ... ..NET drawing uses floats for accuracy but must ultimately be rendered on an integer raster. ... The only way to ensure the accuracy is to plot the lines positioned by floats and ensure that the Graphics object selects the nearest pixel by setting the pixeloffset mode correctly. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: An(other) BASIC bug
    ... All my versions of BBC BASIC automatically promote integers to floats ... development path to Acorn versions. ... as for POINT(with the bracket. ... So BBC BASIC for Windows uses PLOT ...
    (comp.sys.acorn.programmer)
  • Re: segmentation fault
    ... are in single column and floats) ...
    (comp.lang.python)