Re: [OPSAWG] WGLC draft-ietf-opsawg-mib-floats

Dave Shield <D.T.Shield@liverpool.ac.uk> Fri, 01 April 2011 11:53 UTC

Return-Path: <dave.shield@googlemail.com>
X-Original-To: opsawg@core3.amsl.com
Delivered-To: opsawg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 89D303A6826 for <opsawg@core3.amsl.com>; Fri, 1 Apr 2011 04:53:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.811
X-Spam-Level:
X-Spam-Status: No, score=-0.811 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FF_IHOPE_YOU_SINK=2.166, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YgSS0RZP3ypM for <opsawg@core3.amsl.com>; Fri, 1 Apr 2011 04:53:21 -0700 (PDT)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id B94A33A6821 for <opsawg@ietf.org>; Fri, 1 Apr 2011 04:53:20 -0700 (PDT)
Received: by wyb29 with SMTP id 29so3242593wyb.31 for <opsawg@ietf.org>; Fri, 01 Apr 2011 04:55:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=EhO0SLMqDSfrgYIm/dDlkgF2k13D9CmnLrac2Z12UhQ=; b=GV5GAcBKYgk3ZkVWP9TjX50e9nCwrseIPO5Gs7/2hU6SKeyBDS7pwr9BahOfmJmhj9 3z/2j5IbS0fOn40fPK926ssMBBP+StY/kqhG1r9Owx+Q5Tc8dheh9EnwtkckuC5cDewg 3nSBAyOeMWTEe+E5v/MueVX9JnOeFfzPQiTxM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=QCL+zzy3nibVkBeuaxot6E0azzUVq/P6SrIHpscM+lu5drT045OsGvuQ/oHv79E4cM 5HiFHHcJKtyFEcQ3aSGVRbRfDeDrndE6MQ7ios/QyQ/7luI3CfBzv7yugsc5cY8YZpCT 7s6NcF7mmbz5PZO1rOT+ksrcToRRg3L9wsfM4=
MIME-Version: 1.0
Received: by 10.216.69.7 with SMTP id m7mr3746287wed.73.1301658900182; Fri, 01 Apr 2011 04:55:00 -0700 (PDT)
Sender: dave.shield@googlemail.com
Received: by 10.216.52.147 with HTTP; Fri, 1 Apr 2011 04:54:59 -0700 (PDT)
In-Reply-To: <20110331122844.7503ed87@ispx.vb.futz.org>
References: <3D50A761-7279-4564-A8EA-6CBAAD62CC84@cdl.asgaard.org> <4CD5A6BA-7C3C-42ED-9CBB-9ACDB3F7F77B@quittek.at> <20110331122844.7503ed87@ispx.vb.futz.org>
Date: Fri, 01 Apr 2011 12:54:59 +0100
X-Google-Sender-Auth: dldlhfZ4DE6-4Gn7I-qK90f7fF0
Message-ID: <AANLkTimw2vV7PE3jd0neRZLeRVGOXXsZ7YYpB0YrHbmU@mail.gmail.com>
From: Dave Shield <D.T.Shield@liverpool.ac.uk>
To: Juergen Quittek <ietf@quittek.at>, Robert Story <rstory@tislabs.com>
Content-Type: text/plain; charset="ISO-8859-1"
Cc: draft-ietf-opsawg-mib-floats@tools.ietf.org, opsawg@ietf.org
Subject: Re: [OPSAWG] WGLC draft-ietf-opsawg-mib-floats
X-BeenThere: opsawg@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: OPSA Working Group Mail List <opsawg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/opsawg>, <mailto:opsawg-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/opsawg>
List-Post: <mailto:opsawg@ietf.org>
List-Help: <mailto:opsawg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/opsawg>, <mailto:opsawg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 01 Apr 2011 11:53:23 -0000

On Thu, 31 Mar 2011 17:15:58 +0200 Juergen wrote:
JQ> I have read the draft and have only one question:
JQ> Would the byte order (endianness) in the octet arrays be obvious to an
JQ> implementor? Or could there be incompatibilities between big-endian and
JQ> little-endian implementations?


On 31 March 2011 17:28, Robert Story <rstory@tislabs.com> wrote:
RS> I asked about this back in December


Given that two (more-than-averagely-clueful) readers of the draft
have come up with the same question,  perhaps this is an indication
that the answer could do with being a little clearer.



On Mon, 6 Dec 2010 13:07:18 -0800 Randy wrote:
RP>  I specifically said "interchange format"
RP> for IEEE floats, since that *does* specify that the sign bit comes
RP> first.  For a freely-available secondary reference, see
RP> http://en.wikipedia.org/wiki/IEEE_754-2008#Interchange_formats

I can't help feeling that I'm missing something here,
but I'm not sure whether this actually answers the question.

That wikipedia reference says

    "The encoding scheme for these binary interchange formats
     [of floating point data] is the same as that of IEEE 754-1985:
     a sign bit, followed by w exponent bits that describe the exponent
     offset by a bias, and p-1 bits that describe the significand. "

So the sign bit comes first, followed by the exponent
and finally the significand.
    But are the exponent and significand bits in LSB or MSB
order?   Or is this implementation specific?

As far as I can tell from
   http://en.wikipedia.org/wiki/Endianness#Floating-point_and_endianness
the IEEE spec is ambiguous here:

      "..the widespread IEEE 754 floating point standard does not specify
      endianness. Theoretically, this means that not even standard IEEE
      floating point data written by one machine may be readable by another."

If the intention is that floating point values should be represented in
network byte order  (which seems the most natural approach), then
shouldn't this document say so explicitly?


Dave