Bug 13566 - Precision and input radix operations don't work in "dc" applet
Summary: Precision and input radix operations don't work in "dc" applet
Status: RESOLVED WORKSFORME
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.33.x
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-25 05:37 UTC by emuzychenko
Modified: 2021-02-26 02:04 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?