Code That Says Exactly What It Means
Walter Bright
newshound2 at digitalmars.com
Tue Oct 28 02:17:19 UTC 2025
On 10/26/2025 2:35 AM, Peter C wrote:
> But my
> knowledge of D is somewhat limited - I don't think it even has a decimal type??
I'd just use `long` and have it represent the number of pennies. This gives you
representation up to long.max, or:
$92,233,720,368,547,758.07
I.e. $92 quadrillion dollars.
The national debt is currently $38 trillion, and would have to increase in size
by a factor of about 2,421 to overflow.
You're good for the foreseeable future!
More information about the Digitalmars-d
mailing list