HF RL Explorer

Create a command-line tool /app/fpcalc that performs exact fixed-point decimal arithmetic. The tool reads a…

Create a command-line tool /app/fpcalc that performs exact fixed-point decimal arithmetic. The tool reads a…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format (stdin): A single line containing three space-separated fields: OPERAND1 OPERATOR OPERAND2 -…

The task

**Input format (stdin):** A single line containing three space-separated fields: `OPERAND1 OPERATOR OPERAND2` - `OPERAND1` and `OPERAND2` are decimal numbers matching the regex `^-?[0-9]+(\.[0-9]+)?$` - `OPERATOR` is one of: `+` `-` `*` `/` `scale` `round`

Part of ai-and/termgrade-environments.