3 ms·
Python has a decimal package in stdlib. It provides an arbitrary-precision floating point type. The performance will obviously be worse than with floats, but I
by sdevlin 13y ago
Python has a decimal package in stdlib. It provides an arbitrary-precision floating point type. The performance will obviously be worse than with floats, but I doubt it matters in an intro programming class. The only real drawback is that there are no decimal literals.
Actually, several languages I know of have decimal types in stdlib. Two that do not are C and JavaScript.