From: pedasmith@aol.com (Pedasmith)
Subject: Re: VAX D-Float format
Date: 1997/10/31 [thread overview]
Message-ID: <19971031140400.JAA29755@ladder02.news.aol.com> (raw)
In-Reply-To: 3458B45F.167E@blighty.com
In article <3458B45F.167E@blighty.com>, Steve Atkins <steve@blighty.com>
writes:
>Ugly, ugly, ugly untested code. This should all be done
>with structures. This is a really good example as to how
>not to write bit twiddling code.
>
>-
As a developer who both [a] has written vax<-->ieee converters and [b] had
to fix other developers "improvements" to my code and [c] happened to be the
only person to *test* their float conversions:
Thorough testing is important!
[1] Make sure you try different bit patterns in each byte
[2] The code
if (x != ieee2vax (vax2ieee (x))
won't actually test the conversion -- it will only ensure that you've got
symetrical errors. That is, ieee2vax might put the bytes in the wrong
order,
only to have vax2ieee swap them back.
Peter Smith
And above all, ".5" is a _very_ bad test value
next prev parent reply other threads:[~1997-10-31 5:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-10-29 5:00 VAX D-Float format Chieh Cheng
1997-10-30 5:00 ` Steve Lionel
1997-10-31 5:00 ` Dik T. Winter
1997-10-31 5:00 ` John Wilson
1997-11-03 5:00 ` Dik T. Winter
1997-11-03 5:00 ` Chieh Cheng
1997-11-05 5:00 ` Steve Lionel
1997-11-06 5:00 ` Philippe Pouliquen
1997-11-10 5:00 ` John Laird
1997-10-30 5:00 ` Steve Atkins
1997-10-31 5:00 ` Pedasmith [this message]
1997-10-30 5:00 ` Hoff Hoffman
1997-10-30 5:00 ` John Laird
1997-10-30 5:00 ` Gregg E Economou
1997-10-31 5:00 ` Chieh Cheng
[not found] ` <199711051454.JAA02820@dbit.dbit.com>
1997-11-05 5:00 ` WTB: Iomega Zip Drive Jerome Fine
1997-11-05 5:00 ` Jerome Fine
1997-11-05 5:00 ` VAX D-Float format John Foust
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox