-
Notifications
You must be signed in to change notification settings - Fork 2
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
Floating-point arithmetic #3
Comments
Hi @MostAwesomeDude: This sounds like a great contribution for the library. A few logistics up front:
Aside from that, I don't have strong opinions on style. I tend to use the default indentation setup from https://foldling.org/git/vim-scheme.git/ for vim. I understand emacs has some different defaults, but I'm not too picky. Try to keep it within 80-100 columns, roughly? The unfortunate bit with Scheme is that we don't have a good linter / formatter that the community holds as canon, so I can't make hard recommendations. |
Cool! Thanks for the information. I've started hacking here. While this repository is licensed as AGPLv3, I expressly permit you (and other onlookers) to transcribe code from this module with your preferred style and call it MIT-licensed. (So that you don't have to wait for my PR if you (or onlookers) feel motivated to work on this!) On (2), I don't mind writing a few unit tests. I also don't mind writing some property tests, which I think work nicely with relational approaches. I've found that getting branch coverage ( On (3), agreed that a namespace of some sort would be good. I'm using "fp-" for now. |
I'm currently exploring implementing Relational Floating-Point Arithmetic on top of this module. Would this be welcome as an upstream contribution? What kind of code style would be expected? Could extra operations like square-root, trigonometric functions, exponential functions, etc. be added, even though they aren't in the paper?
I'll note that my experiments are using symbols for special values, mostly to avoid Boolean blindness; I give the zeroes and infinities as
(pos zero)
,(pos inf)
,(neg zero)
, and(neg inf)
. Otherwise, all of the technical choices made in the paper seem sound.My motivation is abstract interpretation and relational interpretation of pure functions, particularly raytracers. By turning the precision down to less than five bits (say, two or three bits) it becomes practical to explore output spaces, run computations backwards, etc.
The text was updated successfully, but these errors were encountered: