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

Test against a reference IEEE754 decimal implementation #17

Open
anzdaddy opened this issue Jan 23, 2019 · 4 comments
Open

Test against a reference IEEE754 decimal implementation #17

anzdaddy opened this issue Jan 23, 2019 · 4 comments

Comments

@anzdaddy
Copy link
Member

anzdaddy commented Jan 23, 2019

I created https://github.com/anz-bank/decimal-reference. You can invoke it from the command line (supports cmdline args and stdin input modes) driving arbitrary operations using an RPN notation. The major caveat is that I based it on libdfp, which only wants to compile on Linux, so you need docker to run it.

It still needs to be hooked in for testing purposes, and if we can replace libdfp with a macOS-friendly library to avoid the Docker dependency, that would be awesome (though then we'd have to ensure some kind of build environment, probably Xcode, which has its own challenges).

Either way, we should stick to the cmdline/stdin approach to keep the moving parts fully decoupled.

@anzdaddy
Copy link
Member Author

The other repo is very small. I'm happy to have the content folded into this repo if that's easier.

@juliaogris
Copy link
Contributor

Docker is fine, @joshcarp is on a linux laptop anyway...

@anzdaddy
Copy link
Member Author

Docker is fine, @joshcarp is on a linux laptop anyway...

Cool!

@anzdaddy
Copy link
Member Author

One final thought before I get back to my day job: one option to consider is restricting reference-implementation testing to Linux builds, under the assumption that Go semantics won't change across platforms. Not as complete, but might be good enough if Docker is too hard to integrate into CI on every platform.

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

2 participants