logoalt Hacker News

aesthesiatoday at 7:32 PM1 replyview on HN

Just noting that Python natively handles integers larger than the machine word size since version 2.5, so this would have worked in Python as well.


Replies

ogogmadtoday at 7:56 PM

I think BC's features are equivalent to:

- Python's native integer handling, which already has no size limit.

- PLUS part of the Decimal module in Python's stdlib: BC's floats are DECIMAL by default, not binary.

- PLUS an implementation of Bessel's J function, while neglecting Bessel's K.

- Some features for base conversion using `ibase` and `obase`. So, I suppose you can output numbers to base 60. [EDIT: Correction from earlier: ibase is allowed to be at most 16, while POSIX allows for the maximum value of obase to be at least 99, which therefore does allow for formatting output to base 60.]