Re: how do I do hex to single precision conversion??



hi Helmut,

Sorry for mix-up on terminology, i was using the phrases from the
babbage website (see above) =)

what im trying to say is:
when using the proc IEEE2float, i get the result => 3.29999995232
from the string "40533333".

When comparing with the babbage URL (see aboe), this string is
interpreted in two ways which are "3.3000" and "3.29999995232". The
website causes these single and double precision respectively (hence
the phraseology mix-up).

I guess i was after a routine that produced the first result (3.3000)
and not the second "3.29999995232" 'cos the data is being past to me
is from a server written in C which interprets it as 3.300, and I need
interpret the data exactly the same using Tcl.

I guess what Im asking now is if there was a routine that converts the
data, and does an automatic roundup. it might just be a matter of
writing my own round-up routine though.

best regards

Dave C

.