OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [office-comment] Integer Overflow and number Types in ODF


2008/7/7 David A. Wheeler <dwheeler@dwheeler.com>:

>> The IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std
>> 754-1985) implements various formats for representing floating-point
>> values. ODF seems to omit any clear specification in this regard, and
>> also seems to imply that only one format should be used.
>
> If you can point to a place where it _requires_ one format, let me know;
> that should be removed.
>
> We can't reasonably reference the binary format; at no time do we
> use a binary format.  And I don't think we can actually mandate the
> exact IEEE rules for floating-point operations, either.

How about the following, from another spec that does mandate
ANSI/IEEE 754-1985, is implemented and works.



On overflow and underflow situations during arithmetic operations
conforming implementations ·must· behave as follows:

    *      For xs:float and xs:double operations, overflow behavior
·must· be conformant with [IEEE 754-1985]. This specification allows
the following options:
                      Raising an error [err:FOAR0002] via an overflow trap.
                      Returning INF or -INF.
                      Returning the largest (positive or negative)
non-infinite number.
    *      For xs:float and xs:double operations, underflow behavior
·must· be conformant with [IEEE 754-1985]. This specification allows
the following options:
                      Raising an error [err:FOAR0002] via an underflow trap.
                      Returning 0.0E0 or +/- 2**Emin or a denormalized
value; where Emin is the smallest possible
                      xs:float or xs:double exponent.
    *      For xs:decimal operations, overflow behavior ·must· raise
an error [err:FOAR0002]. On underflow, 0.0 must be returned.
    *      For xs:integer operations, implementations that support
limited-precision integer operations ·
                 must· select from the following options:
                      They ·may· choose to always raise an error [err:FOAR0002].
                      They ·may· provide an ·implementation-defined·
mechanism that allows users to choose
                          between raising an error and returning a
result that is modulo the largest representable integer value.
                         See [ISO 10967].

I think that is clear?

regards


-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]