What is the minimum precision allowed for floats.
joekr552 at student.liu.se
Mon Sep 29 11:06:39 CEST 2008
---------- Forwarded message ----------
From: Joel Kronander <joekr552 at student.liu.se>
Date: Mon, Sep 29, 2008 at 11:05 AM
Subject: Re: What is the minimum precision allowed for floats.
To: Décio Luiz Gazzoni Filho <decio at decpp.net>
Maybe I was a bit unclear. My project is about high quality reference volume
rendering (computer graphics).
Our goal is to see how different precision bit depths in various levels of
the pipeline affect the end result (the image).
For this I would essentialy like to be able to vary my precision completly
between very small precsion 2-3 digits up to very large precision 1000
Basically I don't have any needs of speed or memory isssues.
I just want accuracy and a variable bit precision depth!
Any ideas were to look for that kind of properties? (is GMP limited to soem
specific precisions, (when I experiment It seems so to me?)
/Best Regards Joel Kronander
On Mon, Sep 29, 2008 at 5:05 AM, Décio Luiz Gazzoni Filho
<decio at decpp.net>wrote:
> On Sep 28, 2008, at 5:47 PM, Joel Kronander wrote:
>> I have a question regading the possible minimun precision for floats.
>> For example is it possible to use a precision between native c float and
>> ie precision digits between 6-15 for exmample.
> I suppose you could do it, but why? First of all, you'd be moving from
> hardware-accelerated to software-emulated, so I would expect slowdowns on
> the order of 10x-100x. If you're doing it hoping to get a speedup, just
> trash the idea, it'll never ever work. If you want to save memory by, say,
> having a 48-bit float, and you don't care about the slowdown due to software
> emulation... well, first of all, GMP probably works with multiples of 32 or
> 64 bits, so 48 bits is out of the question, and besides, I believe it uses a
> whole limb (i.e. 32 or 64 bits) for the exponent and whatever is needed for
> the mantissa, so there'd be a further waste of memory if that's what you're
> concerned with. Maybe if you roll your own package.
> I have no idea what you're working with, but have you considered fixed
> point rather than floating point? The speed hit shouldn't be too
> substantial, and you get the full word for the mantissa (in exchange for
> limited dynamic range).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gmp-discuss