Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

define with-float-traps-masked and tests#11

Merged
Shinmera merged 3 commits intoShinmera:masterfrom
kpoeck:feature-clasp-integration-plus-test
Apr 2, 2020
Merged

define with-float-traps-masked and tests#11
Shinmera merged 3 commits intoShinmera:masterfrom
kpoeck:feature-clasp-integration-plus-test

Conversation

@kpoeck
Copy link
Copy Markdown
Contributor

@kpoeck kpoeck commented Apr 1, 2020

  • define finally with-float-traps-masked for clasp
  • added tests
  • tested in ecl, ccl, clasp and sbcl

Copy link
Copy Markdown
Owner

@Shinmera Shinmera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual Clasp support seems fine aside from a question I have, but the test suite is unfortunately not suitable for inclusion as it is. The tests are indeterministic, and the names are not self-explanatory.

@kpoeck
Copy link
Copy Markdown
Contributor Author

kpoeck commented Apr 2, 2020

I hope I have now applied all your comments, apart from :denormalized-operand.

Clasp supports setting the flag for :denormalized-operand, see https://github.com/clasp-developers/clasp/blob/dev/src/gctools/interrupt.cc#L264

But the possible codes for sigfpe are defined in the headers like this:

#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
#define FPE_NOOP        0       /* if only I knew... */
#endif
#define FPE_FLTDIV      1       /* [XSI] floating point divide by zero */
#define FPE_FLTOVF      2       /* [XSI] floating point overflow */
#define FPE_FLTUND      3       /* [XSI] floating point underflow */
#define FPE_FLTRES      4       /* [XSI] floating point inexact result */
#define FPE_FLTINV      5       /* [XSI] invalid floating point operation */
#define FPE_FLTSUB      6       /* [XSI] subscript out of range -NOTIMP */
#define FPE_INTDIV      7       /* [XSI] integer divide by zero */
#define FPE_INTOVF      8       /* [XSI] integer overflow */

Since here I could not find :denormalized operand the sigfpe handler in clasp will never raise an exception corresponding to :denormalized-operand

@kpoeck
Copy link
Copy Markdown
Contributor Author

kpoeck commented Apr 2, 2020

Here the test-log for ecl, sbcl, ccl and clasp:
float-features-test-log.txt

FLOAT-FEATURES-TESTS::FLOAT-FEATURES-INVALID-TRAPPED fails in ecl. If in the same session I execute the tests again, all tests work

@Shinmera
Copy link
Copy Markdown
Owner

Shinmera commented Apr 2, 2020

Looks good, thanks a lot!

@Shinmera Shinmera merged commit 7df15fa into Shinmera:master Apr 2, 2020
@kpoeck
Copy link
Copy Markdown
Contributor Author

kpoeck commented Apr 2, 2020

great!

Shinmera added a commit to Shinmera/portability that referenced this pull request Apr 2, 2020
@Gleefre Gleefre mentioned this pull request May 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants