lean-ja / lean-ja/lean-by-example

`UInt32` の誤差が現れる例

Open
#929 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

コード例 データ型 メモ
Dominant language
Lean
Stars
188
Forks
15
Avg merge
9h 8m
Merged PRs (30d)
6

Description

#eval show IO Unit from do
  let x : UInt32 := 139
  let y : UInt32 := 954
  let z : UInt32 := 2115
  if x * x * x + y * y * y = z * z * z then
    IO.println "Counter example of Fermat's last theorem"
    IO.println s!"(x, y, z) = ({x}, {y}, {z})"

この例は、Juliaで精度保証付き数値計算を学ぶ教材から引用した。

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

Start with the Lean code snippet in issue #929 and inspect how examples are organized in this repository. Compare the UInt32 behavior with the cited Julia teaching material; done should be a clearly scoped repository change that explains or presents this example appropriately.

Written by the indexing model from the issue text.

Assessment

Domain
content, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.