• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

precision past decimal

I am working on a calculation that needs to be able output
the product with a precision of at minimum of 10 digits behind the decimal point. I have been able to get 6 digits using standard output. Does any one know how I might be able to do this? Without ending up with something like
3.3333e-05
0
bbarnette
Asked:
bbarnette
  • 2
1 Solution
 
chensuCommented:
double a = 0.123456789;
printf("%.10e", a);
0
 
chensuCommented:
Or printf("%.10f", a);

printf("%.10g", a);
0
 
bbarnetteAuthor Commented:
"f", did it thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now