HF RL Explorer

Write a command-line tool at /usr/local/bin/decop that performs arithmetic operations on fixed-point decimal…

Write a command-line tool at /usr/local/bin/decop that performs arithmetic operations on fixed-point decimal…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). The tool takes exactly these arguments in order: 1. An operation: one of "add", "sub", "mul", "div" 2. A…

The task

The tool takes exactly these arguments in order: 1. An operation: one of "add", "sub", "mul", "div" 2. A decimal precision (integer >= 0, max 20): the number of decimal places to round results to 3. A decimal separator character: either "dot" (use '.') or "comma" (use ',') 4. One or more decimal number operands

Part of ai-and/termgrade-environments.