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

# office message

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

Subject: [OASIS Issue Tracker] Updated: (OFFICE-2450) Precisely-representedIntegers not differentiated from Imprecise Integers

• From: OASIS Issues Tracker <workgroup_mailer@lists.oasis-open.org>
• To: office@lists.oasis-open.org
• Date: Sun, 7 Feb 2010 12:57:16 -0500 (EST)

```
[ http://tools.oasis-open.org/issues/browse/OFFICE-2450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Hamilton updated OFFICE-2450:
------------------------------------

Proposal:
Introduce terminology for differentiating between integers as Number values without a fractional part and Inegers that are also precise for use in integer-based calculations.

In the following text, the use of *asterisks* around a term indicate the use of Italic type.  In addition,  italicized variable names are used to signify representations of values, the value represented, and also expression fragments that determine such representations as their results.  These usages are confined to cases where there is no risk of confusion.

Replace section 3.10.5 with the following text:

"""
3.10.5 Integer

An Integer value is a Number type value here the representation has no fractional part (i.e., has fractional value 0 in the representation):

* A Number type value, *x*, has a fractional part in its representation only when the expressions FLOOR(*x*) and CEIL(*x*) determine distinct Number type result values.

* A Number type value, "n*, is an Integer value when the expressions FLOOR(*n*) and CEIL(*n*) each determine exactly *n* as their result value.

3.10.5.1 Precise and Strict Integer Values

A Precise Integer value, *n*, is a Number type value for which

1. *n* is an Integer value;

2. for *np* the Number type value determined by expression (*n*)-1 and for *ns* the Number type value determined by the expression (*n*)+1, it is the case that the represented numerical values satisfy the mathematical condition

*np* < *n* < *ns*.

A Strict Integer value, *n*, is a Precise Integer value whenever, in addition to the condition (2, above), it is also the case that *np* and *ns* ar each Precise Integer values.

No error value is a Precise Integer value.

Note 1.  For Precise Integers, it is assured that there are always neighboring lesser and greater values that are Number type values.  For Strict Integers, it is assured that there are always neighboring lesser and greater Number type vaues that are Precise Integers.

Note 2.  Although condition (2, above) is always satisfied for any Precise Integer, the expression AND((*np*)<(*n);(*n*)<(*ns*)) can determine the same result as FALSE() if *n* is so large in magnitude that comparison approximation tolerance influences the result.  See COMPARISON APPROXIMATION TOLERANCE [TBD].

Note 3.  When *n* is a Precise Integer value, the expressions INT(*n*), ROUND(*n*), and TRUNC(*n*) also determine exactly *n* as their result value.

3.10.5.2 Strict Integer Span

A Strict Integer Span is a range over Number type values,

*lower* <= *n* <= *upper*

where

1. *lower* and *upper* are Strict Integer values;

2. every mathematical integer between the values of *lower* and *upper* is exactly and distinctly represented by a Strict Integer value; and,

3. the expression ((*upper*)-(*lower*))+1 determines the correct Strict Integer result.

Note 1.   For a Strict Integer Span, it is assured that the integer predecessor of *lower* and the integer successor of *upper* have Precise Integer representations.  Conditions such as (*lower*)-1 < *n*  < (*upper*)+1 are precisely expressible.

Note 2.  The condition (3, above) assures that the integer magnitude of the span from *lower* to *upper* inclusive has Strict Integer representation, even when the magnitude value does not occur in the Strict Integer Span itself.

"""

was:
Introduce terminology for differentiating between integers as Number values without a fractional part and Inegers that are also precise for use in integer-based calculations.

In the following text, the use of *asterisks* around a term indicate the use of Italic type.  In addition,  italicized variable names are used to signify representations of values, the value represented, and also expression fragments that determine such representations as their results.  These usages are confined to cases where there is no risk of confusion.

Replace section 3.10.5 with the following text:

"""
3.10.5 Integer

An Integer value is a Number type value here the representation has no fractional part (i.e., has fractional value 0 in the representation):

* A Number type value, *x*, has a fractional part in its representation only when the expressions FLOOR(*x*) and CEIL(*x*) determine distinct Number type result values.

* A Number type value, "n*, is an Integer value when the expressions FLOOR(*n*) and CEIL(*n*) each determine exactly *n* as their result value.

3.10.5.1 Precise and Strict Integer Values

A Precise Integer value, *n*, is a Number type value for which

1. *n* is an Integer value;

2. for *np* the Number type value determined by expression (*n*)-1 and for *ns* the Number type value determined by the expression (*n*)+1, it is the case that the represented numerical values satisfy the mathematical condition

*np* < *n* < *ns*.

A Strict Integer value, *n*, is a Precise Integer value whenever, in addition to the condition (2, above), it is also the case that *np* and *ns* ar each Precise Integer values.

No error value is a Precise Integer value.

Note 1.  For Precise Integers, it is assured that there are always neighboring lesser and greater values that are Number type values.  For Strict Integers, it is assured that there are always neighboring lesser and greater Number type vaues that are Precise Integers.

Note 2.  Although condition (2, above) is always satisfied for any Precise Integer, the expression AND((*np*)<(*n);(*n*)<(*ns*)) can determine the same result as FALSE() if *n* is so large in magnitude that comparison approximation tolerance influences the result.  See COMPARISON APPROXIMATION TOLERANCE [TBD].

Note 3.  When *n* is a Precise Integer value, the expressions INT(*n*), ROUND(*n*), and TRUNC(*n*) also determine exactly *n* as their result value.

3.10.5.2 Strict Integer Span

A Strict Integer Span is a range over Number type values,

*lower* <= *n* <= *upper*

where

1. *lower* and *upper* are Strict Integer values;

2. every mathematical integer between the values of *lower* and *upper* is exactly and distinctly represented by a Strict Integer value; and,

3. the expression (*upper*)-(*lower*)+1 determines the correct Strict Integer result.

Note 1.   For a Strict Integer Span, it is assured that the integer predecessor of *lower* and the integer successor of *upper* have Precise Integer representations.  Conditions such as (*lower*)-1 < *n*  < (*upper*)+1 are precisely expressible.

Note 2.  The condition (3, above) assures that the integer magnitude of the span from *lower* to *upper* inclusive has Strict Integer representation, even when the magnitude value does not occur in the Strict Integer Span itself.

"""

Although evaluation order should have no effect on the final condition for determining the magnitude of the inclusive Precise Integer Span, I changed the expression

(*upper*)-(*lower*)+1

to ((*upper*)-(*lower*))+1

to be more suggestive and free the reader from thinking too hard whether the original form is sufficient.

The statement in the proposal is now

"""
3. the expression ((*upper*)-(*lower*))+1 determines the correct Strict Integer result.
"""

> Precisely-represented Integers not differentiated from Imprecise Integers
> -------------------------------------------------------------------------
>
>                 Key: OFFICE-2450
>                 URL: http://tools.oasis-open.org/issues/browse/OFFICE-2450
>             Project: OASIS Open Document Format for Office Applications (OpenDocument) TC
>          Issue Type: Bug
>          Components: OpenFormula
>         Environment: This issue applies in all OpenFormula drafts through draft-19.
>            Reporter: Dennis Hamilton
>            Assignee: Dennis Hamilton
>             Fix For: ODF 1.2 Part 2 CD 2
>
>
> The definition of Integer includes a wide range of values that have no fractional part but that are too large to represent integers precisely, there being gaps and even no non-Integer Number values in their vicinity.
> This prevents careful limitation and definition of those functions that require precise integer values to be specified for parameters and to be determined as results.  It also leads to ambiguity and situations such as those illustrated in OFFICE-2209, OFFICE-846, and others invovling specific functions that are only meaningful when precise integer values are involved.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

```

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