HF RL Explorer

Floating-Point Arithmetic in Bash

Floating-Point Arithmetic in Bash: a task in Terminal-Lego-15k (Harbor dataset). Bash's built-in arithmetic expressions only support integer arithmetic. When you try to divide two numbers like $((5/10)) , you get 0 instead of 0.5 . Your task is to create a Bash script that performs floating-point…

The task

Bash's built-in arithmetic expressions only support integer arithmetic. When you try to divide two numbers like `$((5/10))`, you get `0` instead of `0.5`. Your task is to create a Bash script that performs floating-point division and returns decimal results.

Part of PrimeIntellect/Terminal-Lego-15k.