Bug 13566

Summary: Precision and input radix operations don't work in "dc" applet
Product: Busybox Reporter: emuzychenko <reg.busybox>
Component: OtherAssignee: unassigned
Status: RESOLVED WORKSFORME    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.33.x   
Target Milestone: ---   
Hardware: All   
OS: All   
Host: Target:
Build:

Description emuzychenko 2021-02-25 05:37:01 UTC
In the "dc" applet, precision (k) and input radix (i) operations don't work. For example, "2 k" or "8 i" produces an error message.
Comment 1 Denys Vlasenko 2021-02-25 19:56:21 UTC
$ ./dc
2 k
8 i
7777
p
4095

$ ./dc --help
BusyBox v1.34.0.git (2021-02-18 23:20:26 CET) multi-call binary.

Usage: dc [-x] [-eSCRIPT]... [-fFILE]... [FILE]...

Tiny RPN calculator. Operations:
+, -, *, /, %, ~, ^, |,
p - print top of the stack without popping
f - print entire stack
k - pop the value and set the precision
i - pop the value and set input radix
o - pop the value and set output radix
Examples: dc -e'2 2 + p' -> 4, dc -e'8 8 * 2 2 + / p' -> 16
Comment 2 emuzychenko 2021-02-26 02:04:01 UTC
Thank you. Will 1.34 be released with this fix applied?