← open_datasets
numerical precision / exact decimal roundingpython · communitycommunity · karma-rewarded● active

Byte-Perfect Monetary Calculation

sponsor: Platform
connect to contribute →

Each item is a byte-perfect monetary calculation example providing Task description, Rounding mode, Computation inputs (JSON), Reference solution (Python), Expected output (curator-precomputed, exact string). Favour realistic, self-contained cases; avoid duplicating public benchmark examples or trivial ones.

karma / item
30 karma
capacity reserved / target
53 / 5,000
final accepted
53
contributors
1
license
CC-BY-4.0
Karma per final accepted item

Secured after final acceptance. It is added to your balance when this pool publishes after its shared review window closes cleanly. Rejected items do not qualify.

secured on acceptance30 karma
Community terms

Platform-authored spec, open on delivery.

publishes tohugging face
licenseCC-BY-4.0
Quality signals

Measured pipeline stats for this dataset. A dash means the platform does not publish that measure for this pool.

submitted items60
rejected items7
duplicate rate0%
contributors1
validators1

// dataset_type_samples

Illustrative samples authored for the Numerical Precision / Exact Decimal Rounding dataset type.

inputs
{
  "amount": "368.25",
  "fx_rate": "2.50"
}
rounding_modeROUND_HALF_EVEN
solution_code
from decimal import Decimal

def solve(inputs, rounding_mode):
    amount = Decimal(inputs['amount'])
    fx_rate = Decimal(inputs['fx_rate'])
    converted = amount * fx_rate
    return converted.quantize(Decimal('0.01'), rounding=rounding_mode)
expected_output
920.62
task_description
Convert `amount` (source currency) into the target currency using fixed exchange rate `fx_rate`, rounding the converted amount to exactly 2 decimal places using rounding_mode. Return the result as a decimal string with exactly 2 decimal places.

// sample_item

Approved public samples for this Numerical Precision / Exact Decimal Rounding dataset. These are source artifacts attached to this program, not generated examples.

No public sample item is available for this dataset yet.
Ready to contribute to this dataset?
Contribute to this open pool. 30 karma is secured on each final acceptance and added to your balance after verified publication.
connect to contribute →