Scalar precision: float vs. double
Hi
I use scalars to solve a (simple closed form) quadratic equation. Nevertheless, they always give a 6 digits precision (a float). I tried to declare the scalars as doubleScalar instead of just scalar. However, the result is still in 6 digits. I made sure that the solution can be more precise http://www.mathsisfun.com/quadratic-...on-solver.html |
This is probably an output related issue.
How are you printing out your results? Greetings, Felix |
I use the following
Quote:
|
Thanks for the tip. I guess it is an output issue. So using "cout" one can use:
Quote:
Vielen Dank nochmal :D |
There's a couple of precision options in the controlDict. One is for the time directory name, and the other is for the output. Can't remember what they are off-hand, but they should be easy to find.
|
Hi marupio
Thanks a lot, I found it: Quote:
|
All times are GMT -4. The time now is 05:56. |