Briefle
LearnGlossaryPricing

Briefle words · Code & architecture

Decimal type

A number type that does exact base-10 arithmetic, used when fractions of money must be calculated precisely.

Say it to an AI

Python function that totals a cart with tax, keeping money as integer minor units (cents) end to end. Compute tax with the Decimal type and an explicit rounding mode (ROUND_HALF_UP) to whole cents; only convert to dollars when formatting. No floats anywhere in the money path.

How an expert would brief the stronger version of “Cart total”.

See it

Try it as a puzzle →

A grocery delivery team prototypes the checkout total calculation in a notebook.

Study A · the weaker one
Study B · the stronger one

Why: B multiplies by Decimal("0.0825") and rounds with quantize(1, ROUND_HALF_UP); A multiplies by the float 0.0825 and never rounds on purpose.

Related words

  • Single source of truth
  • Error code
  • Problem Details
  • Naming convention
  • REST
  • Resource
  • Path parameter
  • Pagination

Room 5 · APIs & data

Learn “Decimal type” in a five-minute lesson

Start free
AI can build almost anything. The bottleneck is saying what you want.
WordsPricingTermsPrivacyRefundsContact
© 2026 Briefle