tarantool / tarantool/doc

Document decimal modulo operator

Open
#2,423 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature reference server
Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Product: Tarantool
Since: 2.3.1
Audience/target: developers
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/decimal/
SME: @ Totktonada

Details

There is now a modulo operator for decimal numbers:

a = decimal.new(172.51)
a % 1 
---
- '0.51'
...
a % 0.3 
---
- '0.01'
...
a % 13.27
---
- '0.00'
...
a % 173 
---
- '172.51'
...
a % 72
---
- '28.51'
...
720 % a 
---
- '29.96'
...

Requested by @sergepetrenko in https://github.com/tarantool/tarantool/commit/8ea7106ad1ac5def675c3a28d77dad472573a23d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the referenced decimal root document and find the section covering decimal arithmetic operators. Document the modulo operator using the supplied Lua examples, including decimal and integer operands, and ensure the change reflects availability since Tarantool 2.3.1.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.