[Cfp-interest 1621] Re: TS3 annex review: encodefN / decodefN

Jim Thomas jaswthomas at sbcglobal.net
Thu Jun 4 21:12:29 PDT 2020


These functions are just for types and encodings for IEC 60559 interchange formats. All inputs are interpreted as IEC 60559 values.

- Jim

> On Jun 2, 2020, at 8:23 PM, Fred J. Tydeman <tydeman at tybor.com> wrote:
> 
> On Mon, 25 May 2020 17:15:24 -0700 Jim Thomas wrote:
>> 
>> Look for all sorts of errors, technical and editorial. Send comments to me and cc the review team. I'm proposing you complete your review and send comments by Monday, June 8.
>> 
> 
> Question about encodefN/decodefN.  The existing text has:
> 
> X.11.3.1.1The encodefN functions
> [2] The encodefN functions convert *xptr into an IEC 60559 binaryN
> encoding and store the resulting encoding as an N/8 element array,
> with 8 bits per array element, in the object pointed to by encptr.
> 
> X.11.3.1.2 The decodefN functions
> [2] The decodefN functions interpret the N/8 element array pointed to
> by encptr as an IEC 60559 binaryN encoding, with 8 bits per array
> element.
> 
> 
> Now, what if the unsigned char array as input (to decode) has some
> random bits such that it does not correspond to an IEC 60559 binaryN
> value?
> 
> Or, if the input to encode is not an IEC 60559 binaryN value?
> 
> For example, Intel x87 has floating-point encodings that are not part
> of IEC 60559.
> 
> Perhaps, these functions (and similar ones) need to return an int to
> indicate that the input is not a valid IEC 60559 value.
> 
> 
> ---
> Fred J. Tydeman        Tydeman Consulting
> tydeman at tybor.com      Testing, numerics, programming
> +1 (702) 608-6093      Vice-chair of PL22.11 (ANSI "C")
> Sample C99+FPCE tests: http://www.tybor.com
> Savers sleep well, investors eat well, spenders work forever.




More information about the Cfp-interest mailing list