[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [f-cpu] the wrong way (or not?) concerning FP
On Wed, Aug 29, 2001 at 09:48:37AM +0200, Juergen Goeritz wrote:
[...]
> I took a look into the links you mailed. Haven't seen much
> about a good division though. I will concentrate on the 64 bit
> version, because 32bit is derivable from this.
I'd rather forget fdiv, for the moment. Concentrate in Level-1 FP,
that is: fadd, fsub, fmul, f2int, int2f, fiaprx and fsqrtiaprx (IIRC).
fadd/fsub:
use my generic adder as the core element and add an
"input (de)normalizer" to it.
fmul:
basically, an unsigned multiplier (like IMU, but
without all the bells and whistles like MAC and signed
multiplication) for the fractional part, and a small
(<= 16-bit) adder for the exponent.
fiaprx/fsqrtiaprx:
table lookup (8...16 entries) + some easy bit shuffling
f2int/int2f:
bit shuffling
Most units will also need a postprocessor for rounding, range checking
and so on. Shouldn't be too hard either (unless you try to be 100%
IEEE compliant).
--
Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
"All I wanna do is have a little fun before I die"
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu in the body. http://f-cpu.seul.org/