[1625] in Coldmud discussion meeting

root meeting help first first in chain previous in chain previous next last

Re: Type Real variable precision

daemon@ATHENA.MIT.EDU (Sun Oct 1 16:12:03 2000 )

Date: Sun, 1 Oct 2000 14:00:40 -0600
From: Brandon Gillespie <brandon@ice.cold.org>
To: coldstuff@cold.org
Message-ID: <20001001140040.A12949@ice.cold.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
In-Reply-To: <Pine.LNX.4.10.10009021410480.2877-100000@zork.plover.net>; from Verhoogen Olivier on Sat, Sep 02, 2000 at 02:16:00PM -0500
Content-Transfer-Encoding: 8bit
Reply-To: coldstuff@cold.org

Wow, I realize this is a very belated response, sorry!

The reason for low precision is because cold bytecode is 32bits.
Double precision is not, and thus requires either all bytecode to be
32bits for the most simple change, or other additional changes have to
be made (like splitting the floating value into two chunks).  If you
are on a 64bit system youcan play with USE_BIG_FLOATS and
USE_BIG_NUMBERS in src/include/defs.ht.  I dont recall anything about
the stability of either of these values.

-Brandon

On Sat, Sep 02, 2000 at 02:16:00PM -0500, Verhoogen Olivier wrote:
> Heya :)
> 
> I'm currently doing a bit of coding in coldC and as I work with distances
> I came to remark that Genesis defaults to a very low-precision floating
> point type for real numbers.
> 
> I already asked about this on tCD and Bruce suggested I sent here to ask
> wether someone still had access to a patch that must have once existed for
> this.
> Still, while I haven't peeked at the code, I can't imagine it'd be too
> difficult to modify it to use doubles rather than floats... (I hope... :)
> 
> Thanks,
> -- Sim.
> 
>