comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: 10 bytes real
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: 10 bytes real [message #22251 is a reply to message #22238] Fri, 27 October 2000 09:39 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Thierry Wannier <thierry.wannier@unifr.ch> writes:

> Thanks for the idea, but unfortunately it does not solve my problem, since the
> data file really contains 10 bytes reals.
> I thought that a way to turn around the problem would be to
> a) read the ten bytes,
> b) reorder them in little-endian (PC type if I recall correctly)
> c) read the components of the number (i.e. decompose the real in its
> significand and exponent parts (that's how I do understand reals are build
> up))
> d) recompose a real (double precision: 16 bytes) using this information.
>
> Unfortunately, I am no computer specialist but just a middle range user, and I
> have
> no idea about the possibilities of doing this decomposition/recomposition of a
> real number.

If you can do the research and find the specs on Intel 10-bit reals,
we can probably figures something out.

I found the following bit ranges:

float double 80-bit
sign 31 63 79
exponent 23-30 52-62 56-78
mantissa 0-22 0-51 0-55

It seems 10-byte format supports a *really* large exponent. That's
pretty wierd. You have it tough because 10-bytes is not an even
multiple of any of the IDL types. Thus you will need to insert your
10xN array into a 16xN array and then convert to ULONG64. Then the
bit twizzling comes. Here ISHFT and AND will be your friends.

Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: eps bounding boxes
Next Topic: variable types in external C modules

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:51:51 PDT 2025

Total time taken to generate the page: 0.00243 seconds