Re: 64bit/64bit fixed point division?



But there is no need to use FIST/FILD.
You can also write/read an extended precision
floating point (10 bytes) in memory with a value,
and use fld tword [edx] where edx is the address.
(for Turbo Assembler it's fld [tbyte edx]),
and vice versa with fst.
Only then you must also write/read the exponent,
which will be a little slower.

"Phil Carmody" <thefatphil_demunged@xxxxxxxxxxx> wrote in message
news:87lkpdfouz.fsf@xxxxxxxxxxxxxxxxxxxxxxx
"Maarten Kronenburg" <spamtrap@xxxxxxxxxx> writes:
Phil,
The mantissa for extended precision 80-bit floating point
is the full 64-bit, only bit number 63 is always 1.
The sign bit is bit number 79, see for example
http://babbage.cs.qc.edu/courses/cs341/IEEE-754references.html
and the book The Intel Microprocessors by Barry Brey.
So you can put a 64-bit integer into an extended precision
80-bit floating point without loss of precision.

I know. The FPU's fine, it's the interface from FP to integer
that's the problem. You can't (just) use a FISTP though.
(Unless you know that the answer is unique modulo 2^64.)

Phil
--
"Home taping is killing big business profits. We left this side blank
so you can help." -- Dead Kennedys, written upon the B-side of tapes of
/In God We Trust, Inc./.


.



Relevant Pages

  • Re: 64bit/64bit fixed point division?
    ... The mantissa for extended precision 80-bit floating point ... So you can put a 64-bit integer into an extended precision ... Newton-Raphson (which is faster at 32 bits, ... FILD qword ptr ...
    (comp.lang.asm.x86)
  • Re: 64bit/64bit fixed point division?
    ... The mantissa for extended precision 80-bit floating point ... So you can put a 64-bit integer into an extended precision ... fild qword ptr ...
    (comp.lang.asm.x86)
  • Re: comparison on non-integer types
    ... of x gets pushed into a floating point register and the second copy ... That's an operating system bug, ...
    (comp.lang.c)
  • Re: 64bit/64bit fixed point division?
    ... The mantissa for extended precision 80-bit floating point ... So you can put a 64-bit integer into an extended precision ... "Home taping is killing big business profits. ...
    (comp.lang.asm.x86)
  • Re: Faster Log10 function
    ... The existing Log10 function is optimal for extended precision. ... FLD X ... The Fastcode Project: ...
    (borland.public.delphi.language.basm)