Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing of interval strings #206

Open
lbenet opened this issue Feb 17, 2017 · 6 comments
Open

Parsing of interval strings #206

lbenet opened this issue Feb 17, 2017 · 6 comments

Comments

@lbenet
Copy link
Member

lbenet commented Feb 17, 2017

While trying to adapt the ITF1788 test suite to the tests using Base.Test in #205, I noticed that the test suite has been enlarged, and in particular it includes a new file, which yields some problems. These are related to the constructor parsing of interval strings used in @interval("[...]"), where the dots represent different forms. This issue is to notice some of those forms, currently not implemented (tables

While @interval("[1,2]") yields the expected result, @interval("[1]") does not, nor @interval("[-0x1.3p-1, 2/3]") or @interval("[Empty]"). Similarly, @decorated("[1,1e3]_com") yields the expected result, while @decorated("[1,1e3]_dac") fails to recognize the decoration. The following should make sense: @interval("3.56?1") (in our case, probably replacing ? by ±).

These are some of the examples, but not all. The relevant notes in the standard are: Sections 9.7.1 and 9.8, Table 9.4, Section 10.5.1, Section 11.3, Table 12.1 and Section 12.11.3.

Note that since #215, string parsing is found in src/parsing.jl.

Cc: @oheim

@dpsanders
Copy link
Member

dpsanders commented Feb 17, 2017

It's possibleprobable that we would prefer to use either the I"[1]" or @interval [1] syntax.

@oheim
Copy link

oheim commented Feb 18, 2017

Does this library implement exceptions from the IEEE standard? If yes, you can now use ITF1788 to check for signaled exceptions as well:

testcase exceptions {
    b-textToInterval "[+infinity]" = [empty] signal UndefinedOperation;
    b-numsToInterval +infinity -infinity = [empty] signal UndefinedOperation;
    intervalPart [nai] = [empty] signal IntvlPartOfNaI;
    b-textToInterval "[1.0000000000000001, 1.0000000000000002]" = [1.0, 0x1.0000000000001p+0] signal PossiblyUndefinedOperation;
}

@dpsanders
Copy link
Member

Exceptions are not yet implemented, but should not be too difficult; recorded in #213. Thanks, @oheim

@lbenet
Copy link
Member Author

lbenet commented Feb 24, 2017

Some of this functionality was merged in #215.

@lbenet lbenet closed this as completed Feb 24, 2017
@dpsanders
Copy link
Member

Reopening as a reminder that there is still work to be done.

@dpsanders dpsanders reopened this Feb 25, 2017
@dpsanders dpsanders changed the title Extend @interval("[...]") methods Parsing of interval strings Feb 25, 2017
@dpsanders
Copy link
Member

More parsing in #215.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants