Saturday, November 02, 2024

bc cannot calculate very big number

Hello,
OpenBSD bc(1) is unable to calculate very big number,
for example, (1024*1024)^(1024*1024) run for an hour and still cannot
give me the result.
It just use about 11M of memory and 100% CPU.
Gavin Howard's bc port do it in 2 minutes
GNU bc on Linux do it in 5 minutes.

I'm sending this email from a phone, apologize for poor formatting and
no full dmesg.
cpu0: Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz, 3192.89 MHz
Dell Inc. OptiPlex 9020
spdmem0 at iic0 addr 0x50: 2GB DDR3 SDRAM PC3-12800
spdmem1 at iic0 addr 0x51: 2GB DDR3 SDRAM PC3-12800
spdmem2 at iic0 addr 0x52: 2GB DDR3 SDRAM PC3-12800
spdmem3 at iic0 addr 0x53: 2GB DDR3 SDRAM PC3-12800

No comments:

Post a Comment