Back to General discussions forum
I got stuck with tasks that demand to set precision 1e-7 or better. I've tried various approaches: using BigDecimal, printf, and ordinary float dividing. I would like to get at least a subtle inkling how to solve this problem. Thanks for advance.
Hi! Thanks for your question (though I'm not sure which exactly problem do you mean)
It is not about "setting" precision. You only need to ensure that:
For example very simple way to spoil precision is to use float
instead of double
,
or round some intermediate results etc.
Thanks for your prompt response. It was kinda dummy question. With your help I managed to sort it out. :)