منتديات تاسوست الخضرا
اعضاء وزوار المنتدى الكرام
نتشرف بوجودكم بيننا أو انضمامكم الى أسرة منتديات تاسوست الخضرا
يمكنكم في اي وقت مراسلة الادارة للرد على استفساراتكم على البريدالالكتروني التالي
tassoust1990@live.fr
منتديات تاسوست الخضرا
اعضاء وزوار المنتدى الكرام
نتشرف بوجودكم بيننا أو انضمامكم الى أسرة منتديات تاسوست الخضرا
يمكنكم في اي وقت مراسلة الادارة للرد على استفساراتكم على البريدالالكتروني التالي
tassoust1990@live.fr
منتديات تاسوست الخضرا
هل تريد التفاعل مع هذه المساهمة؟ كل ما عليك هو إنشاء حساب جديد ببضع خطوات أو تسجيل الدخول للمتابعة.

منتديات تاسوست الخضرا


 
الرئيسيةالبوابةأحدث الصورالتسجيلدخول
بحـث
 
 

نتائج البحث
 
Rechercher بحث متقدم
أفضل 10 أعضاء في هذا المنتدى
amin
دروس  Calcul Formel حصريا على تاسوست الخضرا Vote_rcapدروس  Calcul Formel حصريا على تاسوست الخضرا Voting_barدروس  Calcul Formel حصريا على تاسوست الخضرا Vote_lcap 
badreddin zaidi
دروس  Calcul Formel حصريا على تاسوست الخضرا Vote_rcapدروس  Calcul Formel حصريا على تاسوست الخضرا Voting_barدروس  Calcul Formel حصريا على تاسوست الخضرا Vote_lcap 
اسمحوا لي
دروس  Calcul Formel حصريا على تاسوست الخضرا Vote_rcapدروس  Calcul Formel حصريا على تاسوست الخضرا Voting_barدروس  Calcul Formel حصريا على تاسوست الخضرا Vote_lcap 
دروب الفلاح48
دروس  Calcul Formel حصريا على تاسوست الخضرا Vote_rcapدروس  Calcul Formel حصريا على تاسوست الخضرا Voting_barدروس  Calcul Formel حصريا على تاسوست الخضرا Vote_lcap 
JAWHAR
دروس  Calcul Formel حصريا على تاسوست الخضرا Vote_rcapدروس  Calcul Formel حصريا على تاسوست الخضرا Voting_barدروس  Calcul Formel حصريا على تاسوست الخضرا Vote_lcap 
سيرين
دروس  Calcul Formel حصريا على تاسوست الخضرا Vote_rcapدروس  Calcul Formel حصريا على تاسوست الخضرا Voting_barدروس  Calcul Formel حصريا على تاسوست الخضرا Vote_lcap 
f.e.d
دروس  Calcul Formel حصريا على تاسوست الخضرا Vote_rcapدروس  Calcul Formel حصريا على تاسوست الخضرا Voting_barدروس  Calcul Formel حصريا على تاسوست الخضرا Vote_lcap 
houda2013
دروس  Calcul Formel حصريا على تاسوست الخضرا Vote_rcapدروس  Calcul Formel حصريا على تاسوست الخضرا Voting_barدروس  Calcul Formel حصريا على تاسوست الخضرا Vote_lcap 
أمواج بلا شاطئ
دروس  Calcul Formel حصريا على تاسوست الخضرا Vote_rcapدروس  Calcul Formel حصريا على تاسوست الخضرا Voting_barدروس  Calcul Formel حصريا على تاسوست الخضرا Vote_lcap 
معاك يالخضرا
دروس  Calcul Formel حصريا على تاسوست الخضرا Vote_rcapدروس  Calcul Formel حصريا على تاسوست الخضرا Voting_barدروس  Calcul Formel حصريا على تاسوست الخضرا Vote_lcap 
دخول
اسم العضو:
كلمة السر:
ادخلني بشكل آلي عند زيارتي مرة اخرى: 
:: لقد نسيت كلمة السر
المواضيع الأخيرة
» جميع دروس مادة الرياضيات انشطة عددية+انشطة هندسية / 2 متوسط
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالخميس يونيو 04, 2015 1:21 pm من طرف abderezakghano

» الرفيق للسنة 2 متوسط حلول الكتاب المدرسي
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالخميس يونيو 04, 2015 1:15 pm من طرف abderezakghano

» هل من مرحب
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالأحد مايو 31, 2015 1:49 pm من طرف Hoù Dà

»  دروس و حلول تمارين كتاب الفيزياء للسنة الثانية متوسط
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالثلاثاء مايو 05, 2015 7:26 am من طرف خميس حدودة

» الفرض الثالث في مادة التربية الإسلامية لسنة 3 متوسط
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالإثنين أبريل 27, 2015 9:28 am من طرف abderezakghano

» كوبون تخفيض على سماعات رياضية تعمل بالبلوثوث من gearbest
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالإثنين يناير 12, 2015 6:01 pm من طرف amin

» كوبون تخفيض لساعة دكية من موقع gearbest
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالجمعة يناير 09, 2015 5:46 pm من طرف amin

» كوبون تخفيض على مصباح يدوي من موقع gearbest
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالخميس يناير 08, 2015 7:18 pm من طرف amin

» التجربة الثانية شراء اكسسوارات من تني ديال tinydeal
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالثلاثاء نوفمبر 04, 2014 10:43 am من طرف amin

»  شرح شامل عن موقع التسوق tinydeal مع تجربة شراء هاتف
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالثلاثاء نوفمبر 04, 2014 9:55 am من طرف amin

» حلول تمارين الكتاب المدرسي لمادة اللغة الانجليزية الثالثة متوسط
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالسبت أغسطس 16, 2014 5:16 pm من طرف lina molay

» مكسب يومي من 50 : 60 دولار...مجرب
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالأربعاء يوليو 09, 2014 10:43 am من طرف king kimel

» حلول تمارين الكتاب المدرسي للسنة الأولى ثانوي جذع مشترك آداب لمادة الفيزياء
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالجمعة مايو 02, 2014 10:04 am من طرف زائر

» الرجاء المساعدة
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالثلاثاء أبريل 15, 2014 1:57 pm من طرف hassiba alg

» بحث حول الثغور الورقية
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالإثنين أبريل 14, 2014 5:49 pm من طرف amin

» تحميل cdيحتوي على دروس في الاعلام الالي لكل السنوات CD: informatique pour tous
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالإثنين فبراير 24, 2014 7:25 pm من طرف قيري

» المكتبة المدهلة لطلاب علوم التسير تحميل جميع الدروس الجزء 1
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالإثنين فبراير 24, 2014 5:42 pm من طرف لطيفة محمد

» ......تحميل 30 كتابا قانونيا متنّوعا ....
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالإثنين فبراير 24, 2014 5:35 pm من طرف لطيفة محمد

» ~تعلّمي الطبخ..وصفات متجددة بالصور و التفاصيل~
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالسبت فبراير 01, 2014 7:04 am من طرف ali1200

» دروس HISTOIRES DES SCIENCES
دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالجمعة يناير 31, 2014 7:15 am من طرف ali1200




 

 دروس Calcul Formel حصريا على تاسوست الخضرا

اذهب الى الأسفل 
كاتب الموضوعرسالة
amin
إدارة المنتدى
إدارة المنتدى
amin


رقم العضوية : 1
دروس  Calcul Formel حصريا على تاسوست الخضرا 20px-Flag_of_Algeria.svg
ذكر عدد المساهمات : 2361
نقاط : 12208
السٌّمعَة : 7
تاريخ التسجيل : 16/05/2010
العمر : 33
الموقع : tassoust

دروس  Calcul Formel حصريا على تاسوست الخضرا Empty
مُساهمةموضوع: دروس Calcul Formel حصريا على تاسوست الخضرا   دروس  Calcul Formel حصريا على تاسوست الخضرا I_icon_minitimeالثلاثاء أكتوبر 19, 2010 4:00 pm

دروس  Calcul Formel حصريا على تاسوست الخضرا 673925







<TABLE style="ZOOM: 1" cellSpacing=0 cellPadding=0 width="100%" align=center border=0 sizcache="2" sizset="3" jQuery1287502689343="167">

<TR sizcache="2" sizset="3" jQuery1287502689343="165">
<td colSpan=2 sizcache="2" sizset="3" jQuery1287502689343="164">


Chapitre 1
L’interpréteur OCaml et les expressions simples








Fonctions mathématiques usuelles
OCaml dispose de toutes les fonctions réelles usuelles:
sqrt, exp (exponentielle de base e), log (népérien),
sin, cos, tan, asin, acos, atan (ces dernières fonctions travaillant en radians), etc...
Il existe des fonctions de conversion pour passer d’un type entier à réel et vice-versa :
float_of_int, convertir un entier en réel;
int_of_float: supprime la partie décimale
La fonction floor (sol): arrondi un nombre réel vers l’entier inférieur
La fonction ceil (plafond): arrondi un nombre réel vers l’entier supérieur
(dans les deux derniers cas le résultat reste réel).



OCaml fournit les fonctions d’usage courant suivantes sur les caractères
(Char.code c) donne le code ASCII du caractère c ;
(Char.chr n) donne le caractère dont le code ASCII est n ;
(String.make n c) renvoie une chaîne de longueur n remplie avec n fois le caractère c.
En particulier, cette fonction permet de convertir un caractère c en une chaîne par (String.make 1 c).
(String.length s) donne la longueur de la chaîne s ;
(String.get s n) équivalente à s.[n] ;
(String.sub s d l) renvoie la sous-chaîne de longueur l de la chaîne s qui commence à la position d de s.
La numérotation des positions dans une chaîne commence à 0,


</TD></TR></TABLE>



OPERATIONS DE COMPARAISONS.
Comparer entre deux éléments d’un même type

On utilise les opérateurs: =, <> (test de différence),
<, >, <= et >=.

Ces opérateurs fournissent un résultat booléen.

Tuples

n-uplets (t1 * t2 * … * tn ),
où ti est le type de la composante i du n-uplet.
Exemple: (1,true,"ab") est un 3-uplet de type
int * bool * string.

Exemple:
let symétrie(x, y) = (-x, -y);;
-val symétrie : int * int -> int * int = <fun>




Les déclarations globales et locales




Un identificateur est déclaré globalement par le mot clef let :
let x = 7;;
x : int = 7
let x=3 and y=6*3;;
val x : int = 3
val y : int = 18
let donne un nom à une valeur ou une expression.
Elle définit une notation (dans le sens mathématique du terme).


Les définitions locales sont utiles si nous devons utiliser un calcul uniquement une fois. Exemple de définition locale:
let pi = 3.1415927 in pi *. 10. *. 10. ;;
-: float = 314.15927
Un identificateur est déclaré localement par la construction let ... in :
let x = 5 and y=9 in x * y ;;
- : int =45
les noms de variables autorisés en Caml sont formés de lettres majuscules ou minuscules, de chiffres et des caractères _ (souligné) et ’ (apostrophe), et doivent commencer par une lettre minuscule.





Chapitre 2
FONCTIONS,
PREMIER APERCU


En accord avec les mathématiques, les fonctions CaML sont des objets qui reçoivent un argument (d’un certain type) et renvoient un résultat, dépendant de cet argument
(résultat qui peut être d’un autre type que celui de l’argument).
let double = function x -> 2*x;;
val double : int -> int = <fun>
double 15;;
- : int = 30

#let z = double (6) ;;
- z : int = 12
Il est possible de définir des fonctions sans leurs donner de nom grâce au mot clef function ou fun
( function x->x*x);;
- : int -> int = <fun>
( function x->x*x) 5;;
- : int = 25

Une fonction peut prendre plusieurs arguments :

Une fonction peut prendre plusieurs arguments :
let norme x y = sqrt(x *. x +. y *. y);;
val norme : float -> float -> float = <fun>
let norme = function(x,y)->sqrt(x *. x +. y *. y);;
val norme : float * float -> float = <fun>
let norme = function x->function y->sqrt(x *. x +. y*. y);;
val norme : float -> float -> float = <fun>
let g = norme 3. ;;
val g : float -> float = <fun>
g 4. ;;
- : float = 5.

let div(a,b) = (a/b, a mod b);;
- div : int * int -> int * int = <fun>
div ( 22, 7);;
- : int * int = 3, 1




<TABLE style="ZOOM: 1" cellSpacing=0 cellPadding=0 align=center border=0>

<TR>
<td vAlign=center></TD></TR></TABLE>
Possibilité de définir par morceaux
function
0 -> valeur_en_0
| x -> valeur_generale(x)

__________________________________________
let f = function
0 -> 1
| x -> 2 * x +2;;

f : int -> int = <fun>
f 4;;
- : int = 10








if expr1 then expr2 else expr3
L'expression expr1 est de type bool.
Les expressions expr2 et expr3 doivent être du même type, quel qu'il soit.

if 3=4 then 0 else 4 ;;
- : int = 4

if 3=4 then "0" else "4" ;;
- : string = "4"

if 3=4 then 0 else "4";;
Characters 20-23:
This expression has type string but is here used with type int

Une expression conditionnelle est, elle aussi, une expression et son calcul retourne une valeur.
(if 3=5 then 8 else 10) + 5 ;;
- : int = 15

une expression dénote toujours une valeur. De fait la partie else est obligatoire :
sinon, une expression comme

if false then 1
n’aurait aucune valeur.




<TABLE class=forumline style="ZOOM: 1" cellSpacing=1 cellPadding=0 width="100%" border=0 sizcache="2" sizset="0" jQuery1287502689343="146">

<TR class=post sizcache="2" sizset="8" jQuery1287502689343="215">
<td class=row1 vAlign=top width="100%" colSpan=2 height=28 sizcache="2" sizset="8" jQuery1287502689343="214"><TABLE style="ZOOM: 1" cellSpacing=0 cellPadding=0 width="100%" border=0 sizcache="2" sizset="8" jQuery1287502689343="213">

<TR sizcache="2" sizset="8" jQuery1287502689343="211">
<td colSpan=2 sizcache="2" sizset="8" jQuery1287502689343="210">


Définition récursive = Une fonction f est définie récursivement lorsque sa définition utilise f elle-même.
Certaines fonctions ne peuvent être définies que récursivement
Le plus souvent, une définition récursive est
plus élégante
plus simple
plus lisible
plus efficace


définition de factorielle

0! = 1
n! = n * (n-1)!
(pour n > 0)

let rec fact (n) = function
| 0-> 1
| n-> n * fact(n-1)
;;
fact : int -> int = <fun>
fact(5);;
- : int = 120

suites récurrentes (suite géométrique)
U0 = 1
Ui = a * Ui-1
(pour i > 0)
let rec u(a, i) = match i with
0-> 1
|i-> a*u(a, i-1);;

u : int * int -> int = <fun>
u(2, 5);;
- : int = 32

Multiplication
m * 0 = 0
m * n = m + m*(n-1)
(pour n > 0)
let rec mul = fun
| (m,0)-> 0
| (m,n)-> m + mul(m, n-1);;

mul : int * int -> int = <fun>
mul(5,6);;
- : int = 30


</TD></TR></TABLE>

PGCD 1
pgcd(0, b) = b
pgcd(a, b) = pgcd(|a-b|, min(a,b))

let rec pgcd = function
|(0,b) -> b
|(a,b)-> pgcd(abs(a-b), min a b );;

pgcd : int * int -> int = <fun>
pgcd(104 , 56);;
#- : int = 8


PGCD 2

pgcd ( x, 0) = x
pgcd( x, y) = pgcd(y, x mod y) (pour y # 0)

let rec pgcd(x,y)= if y = 0 then x else
pgcd(y , x mod y );;

pgcd : int * int -> int = <fun>

Nombre pair
pair(n) = n=0 || non pair(n-1)


let rec pair(n) = n = 0 || not (pair(n-1));;


Suite Fibonacci
f0 = 1
f1 = 1
fn = fn-1 + fn-2
( pour n > 1)

let rec fib(n) = match n with
|0|1->1
| n-> fib(n-1)+fib(n-2);;

fib : int -> int = <fun>
fib(30);;
- : int = 1346269


Suite Fibonacci (2eme approche )
soit (x , y) un couple de la suite Fibonacci
le couple suivant est (y, x+y)
(0, 1) est le couple initial


n = 0 -> (1 , 1)
n = 1 -> (1 , 2)
n = 2 -> (2 , 3)
n = 3 -> (3 , 5)
n = 4 -> (5 , دروس  Calcul Formel حصريا على تاسوست الخضرا Icon_cool
n = 5 -> (8 , 13)

let rec fib(n) = let (x,y)= if n = 0 then (0,1)
else fib(n-1)
in (y,x+y);;

fib : int -> int * int = <fun>
fib(30);;
- : int * int = 1346269, 2178309



Un autre problème -- Mots palindromes --
Mot palindrome = mot égale à son image miroir
Comme: elle, radar, ete, ressasser

Soit s une chaîne de caractères de longueur n
palindrome (s )= vrai si
n <= 1 ou
s[0] = s[n - 1] et palindrome(s[1..n-2] )
let rec palindrome (s ) = let n = String.length s in
n <= 1 ||
s.[0] = s.[n - 1] &&
palindrome (String.sub s 1 (n - 2));;


</TD></TR>
<TR sizcache="0" sizset="56">
<td class="row1 browse-arrows" vAlign=center align=middle width=150 sizcache="0" sizset="56">دروس  Calcul Formel حصريا على تاسوست الخضرا Empty</TD>
<td class="row1 messaging gensmall" width="100%" height=28></TD></TR></TABLE> دروس  Calcul Formel حصريا على تاسوست الخضرا 467943


الرجوع الى أعلى الصفحة اذهب الى الأسفل
https://tassoust3.yoo7.com
 
دروس Calcul Formel حصريا على تاسوست الخضرا
الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1
 مواضيع مماثلة
-
» دروس Calcul Formel
» دروس علم الأرض في منتديات تاسوست الخضرا للجيولوجيين
» دروس الجيولوجيا المعادن وخصائصها في منتديات تاسوست الخضرا
» calcul formel + analyse + algèbre
» calcul fomel

صلاحيات هذا المنتدى:لاتستطيع الرد على المواضيع في هذا المنتدى
منتديات تاسوست الخضرا :: منتدى التعليم العالي :: دروس الجامعة لكل الكليات :: منتدى الرياضيات والاعلام الالي-
انتقل الى: