evm_ceil_div
Ceiling division: (x + y - 1) / y. Rounds up to ensure no remainder. If y is 0, the function errors with: Division by zero in evm_ceil_div.
Example
Local
{"id":"sample_r55kre","title":"Sample","code":"SELECT evm_ceil_div(10::UINT256, 3::UINT256)::VARCHAR AS result;\n-- => [{\"result\":\"4\"}]"}
Notebook ready in readonly mode.
API reference
Exact signatures with descriptions, requirements, inputs, returns, and examples.
evm_ceil_div(UINT256, UINT256) #
Divides UINT256 x by y and rounds up when there is a remainder. If y is 0, the function errors with: Division by zero in evm_ceil_div.
Related functions
Category and tags
- Category
- EVM utilities
- Tag
- Types
- Tag
- EVM