vault backup: 2023-09-25 13:31:57
This commit is contained in:
parent
4ba446d7d6
commit
4d30f6a9c6
16
.obsidian/workspace.json
vendored
16
.obsidian/workspace.json
vendored
@ -4,16 +4,16 @@
|
|||||||
"type": "split",
|
"type": "split",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": "0d9f5c8120398136",
|
"id": "d1d0fb84c1c51d46",
|
||||||
"type": "tabs",
|
"type": "tabs",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": "fda975f18bd89b49",
|
"id": "2eaee722b622a4ab",
|
||||||
"type": "leaf",
|
"type": "leaf",
|
||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Methodologie/Gestion.md",
|
"file": "Algo/Séminaire/Exercices seminaire.md",
|
||||||
"mode": "source",
|
"mode": "source",
|
||||||
"source": false
|
"source": false
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "backlink",
|
"type": "backlink",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Methodologie/Gestion.md",
|
"file": "Algo/Séminaire/Exercices seminaire.md",
|
||||||
"collapseAll": false,
|
"collapseAll": false,
|
||||||
"extraContext": false,
|
"extraContext": false,
|
||||||
"sortOrder": "alphabetical",
|
"sortOrder": "alphabetical",
|
||||||
@ -102,7 +102,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "outgoing-link",
|
"type": "outgoing-link",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Methodologie/Gestion.md",
|
"file": "Algo/Séminaire/Exercices seminaire.md",
|
||||||
"linksCollapsed": false,
|
"linksCollapsed": false,
|
||||||
"unlinkedCollapsed": true
|
"unlinkedCollapsed": true
|
||||||
}
|
}
|
||||||
@ -125,7 +125,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "outline",
|
"type": "outline",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Methodologie/Gestion.md"
|
"file": "Algo/Séminaire/Exercices seminaire.md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -156,10 +156,10 @@
|
|||||||
"command-palette:Open command palette": false
|
"command-palette:Open command palette": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": "fda975f18bd89b49",
|
"active": "2eaee722b622a4ab",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
"README.md",
|
|
||||||
"Methodologie/Gestion.md",
|
"Methodologie/Gestion.md",
|
||||||
|
"README.md",
|
||||||
"Algo/Séminaire/Remediation.md",
|
"Algo/Séminaire/Remediation.md",
|
||||||
"COM-ADMR/Séjour international EPITA.md",
|
"COM-ADMR/Séjour international EPITA.md",
|
||||||
"Algo/Séminaire/Exercices seminaire.md",
|
"Algo/Séminaire/Exercices seminaire.md",
|
||||||
|
@ -382,5 +382,18 @@ let rec puissance_better x n =
|
|||||||
let pb = puissance_better x (n/2) in pb*pb
|
let pb = puissance_better x (n/2) in pb*pb
|
||||||
else
|
else
|
||||||
let pb_odd = puissance_better x (n/2) * n in pb_odd*pb_odd;;
|
let pb_odd = puissance_better x (n/2) * n in pb_odd*pb_odd;;
|
||||||
|
|
||||||
|
(*Correction*)
|
||||||
|
let power x n = match n with
|
||||||
|
| 0 -> (match x with
|
||||||
|
| 0. -> failwith "power 0^0 impossible"
|
||||||
|
| _ -> 1.)
|
||||||
|
| _ -> (match x with
|
||||||
|
| 1. -> 1.
|
||||||
|
| 0. -> 0.
|
||||||
|
| -1. -> if n mod 2 = 0 then 1. else -1.)
|
||||||
|
| _ -> (let rec p = function
|
||||||
|
| 0 -> 1.
|
||||||
|
| n -> x*.p(n-1) in p n)
|
||||||
|
;;
|
||||||
```
|
```
|
Loading…
x
Reference in New Issue
Block a user