Not if you're calculating the mass defect of an atom nucleus decaying by beta-radiation
Which he isn't doing...
[quote name='mhagain' timestamp='1337591469' post='4941868']
In which case choosing stock float as the data type to use is quite obviously a baaaaaaaaaaaaaaaaaad idea.
True enough.. though a double float would work fine.
[/quote]
A [font=courier new,courier,monospace]double[/font] only has about 15-17 decimal digits of significant precision. Yes, it's more than a [font=courier new,courier,monospace]float[/font], but it all depends on what you're
doing with your data. Both [font=courier new,courier,monospace]float[/font]s and [font=courier new,courier,monospace]double[/font]s can approximate 4.014e-31, which isn't the problem (and subsequently, both can approximate 4.014e-31 + 4.014e-31 pretty well). Usually, the problem isn't "Can a [font=courier new,courier,monospace]float[/font]/[font=courier new,courier,monospace]double[/font] represent this number?" but instead "Can a [font=courier new,courier,monospace]float[/font]/[font=courier new,courier,monospace]double[/font] approximate the mathematical operation between these two (or more) numbers?" Just throwing out a small number doesn't mean that [font=courier new,courier,monospace]float[/font]s are ruled out; it all depends on what you're doing with that small number.
I'm not saying a [font=courier new,courier,monospace]double[/font] wouldn't work or that it wouldn't be the better choice in your case. I'm saying it isn't the
number that's usually limiting you, it's usually the
numbers and what you're
doing with the numbers. It's a subtle but significant difference of focus.