Département d'Informatique |
Maîtrise d'Informatique 2001/2002 |
Spécifications formelles, preuves |
& construction de programmes |
Travaux dirigés |
Mercredi 17 octobre |
let carré x = x*.x;;
let derivée_en (x0,f) = let epsilon = 0.001 in (f(x0+.epsilon)-.f(x0)) /. epsilon;;
let prime f = function x -> derivée_en (x,f);;
prime carré;;
let rec quotient_reste (a,b) = if a < b then (0,a) else 1 + quotient_reste (a-b,b);;
it_list f a [b1;b2;...;bn] = f (... (f (f a b1) b2) ...) bn
list_it f [a1;a2;...;an] b = f a1 (f a2 (... (f an b) ...))
combine ([a1;a2;...;an],[b1;b2;...;bn]) = [(a1,b1);(a2,b2);...;(an,bn)]
This document was translated from LATEX by HEVEA.