segfault@cirno-6:~$ apt show dc
Package: dc
Version: 1.07.1-2
Priority: optional
Section: math
Source: bc
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Ryan Kavanagh <rak@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 131 kB
Depends: libc6 (>= 2.14)
Homepage: http://ftp.gnu.org/gnu/bc/
Task: ubuntu-desktop, kubuntu-desktop, xubuntu-core, xubuntu-desktop, lubuntu-desktop-share, lubuntu-gtk-desktop, lubuntu-desktop, lubuntu-qt-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop
Supported: 5y
Download-Size: 48.6 kB
APT-Sources: http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
Description: GNU dc arbitrary precision reverse-polish calculator
GNU dc is a reverse-polish desk calculator which supports unlimited
precision arithmetic. It also allows you to define and call macros.
.
A reverse-polish calculator stores numbers on a stack. Entering a number
pushes it on the stack. Arithmetic operations pop arguments off the
stack and push the results.
Уже не помню - делал подход, не взлетело. Как минимум переводы юнитов и баз систем счисления сделаны довольно инопланетно.
Не помню, но показалось, что там и переменных нет, но если покажешь как обрабатывается кейс из хедпоста тут с помощью bc, я готов сделать ещё один подход.
Thus, 34+5 is 27 (it groups as 3(4+5)) and iota 3+2 is 1 2 3 4 5 while 3+iota 2 is 3 4 5. A vector is a single operand, so 1 2 3 + 3 + 3 4 5 is (1 2 3) + 3 + (3 4 5), or 7 9 11.