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

[Bug] Problem with print floating point #7620

Closed
no1wudi opened this issue Nov 18, 2022 · 0 comments · Fixed by #7677
Closed

[Bug] Problem with print floating point #7620

no1wudi opened this issue Nov 18, 2022 · 0 comments · Fixed by #7677

Comments

@no1wudi
Copy link
Contributor

no1wudi commented Nov 18, 2022

I've a simple program:

int main(int argc, FAR char *argv[])
{
  double value = +0x1.000000000000080000000000p-600;
  printf("Hello, World!! %.7g:f64\n", value);
  return 0;
}

And this is the output:

➜  nx qemu-system-arm -semihosting -M sabrelite -m 1024 -smp 4 -nographic -kernel nuttx/nuttx

NuttShell (NSH) NuttX-11.0.0
nsh> hello
Hello, World!! 2.40992e-B1:f64

The output of value is wrong, correct result is 2.40992e-181.

@no1wudi no1wudi changed the title Problem with print floating point [Bug] Problem with print floating point Nov 18, 2022
@xiaoxiang781216 xiaoxiang781216 linked a pull request Nov 24, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant