Outils pour utilisateurs

Outils du site


tech:notes_-_algorithme

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
tech:notes_-_algorithme [2025/03/24 15:06] – créée - modification externe 127.0.0.1tech:notes_-_algorithme [2026/05/30 21:23] (Version actuelle) Jean-Baptiste
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Brouillon Algo}}
 +
 +# Notes - Algorithme
 +
 +Voir :
 +* https://pythonalgos.com/2022/08/17/dijkstras-algorithm-in-5-steps-with-python/
 +
 +
 +## Go lang - newton - racine carré
 +
 +~~~go
 +package main
 +
 +// Source : https://go.dev/tour/flowcontrol/8
 +
 +import (
 +        "fmt"
 +)
 +
 +func Sqrt(x float64) float64 {
 +        z := 1.0
 +        for range 10 {
 +                z -= (z*z - x) / (2 * z)
 +        }
 +        return z
 +}
 +
 +func main() {
 +        fmt.Println(Sqrt(2))
 +}
 +~~~
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki