Hi I am trying to do some calculations for a unit converter im creating and have stumbled upon a problem.
out10 = doubleInput / 94605284000000000000000L;
Eclipse says that “The literal of type long is out of range”, I didn’t even think this was possible, but maybe some f you know how to work around it ?
You could make it a double literal instead of a long literal, with some loss of accuracy. Assuming
doubleInputis also a double, and the output is as well, then there’s no reason not to do that. If you need a really big integer constant with perfect accuracy, use abignum(google it).