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

Feature request: the trace attribute should support scientific notation #2166

Open
patrick-nicodemus opened this issue Jul 11, 2024 · 2 comments

Comments

@patrick-nicodemus
Copy link

patrick-nicodemus commented Jul 11, 2024

If my variable is less than 10^-8 or so, then the #[trace] attribute just prints:

common.fut:182:20-37: 0.000000

It would be helpful if it was available in scientific notation. I would like to see the value of the number out to so many significant digits. At the least I would like to know whether the value is zero.

@FluxusMagna
Copy link

This reminds me of #1567, although in that case it was eventually suggested to use a command for the repl and futhark literate instead of an attribute. I do think it makes sense to have a formatted trace though.

@athas
Copy link
Member

athas commented Jul 11, 2024

And it should probably be the same formatting language. The #[trace] attribute is a little trickier, because we need to generate C code for it.

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

No branches or pull requests

3 participants