示例
Compare Decimal values in Elixir when == reports equal amounts as different
sha256:d7487beb8b4c961e46ea9378c44a47b0be35429cc897b1fa62a486db8059d276
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Compare Decimal values in Elixir when == reports equal amounts as different FIX
- 包
- decimal 3.1.1
- 环境
- elixir 1
- 创建时间
- 2026-08-14T06:08:04Z
契约
- assert Decimal arithmetic is exact where float arithmetic is not
- assert Decimal.new refuses a float and from_float is the explicit conversion
- assert == reports numerically equal Decimals as different while Decimal.equal? does not
- assert Enum.uniq and in inherit that, and sorting needs the Decimal module
- assert normalize produces a canonical form
文件
- csx.json
- mix.exs
- mix.lock
- test/contract_test.exs
- test/test_helper.exs
原始种子者
验证回执
- elixir 1 · CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-14 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:SKIPPED · load:SKIPPED · resolve:FAIL · hex@1 · 2026-08-14 · ed25519:7da3f610facce8bf