smkl changed the topic of #ocaml to: OCaml 3.07 ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn, A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/, A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list
paganini_ has joined #ocaml
paganini_ has quit [Client Quit]
<karryall> alors tu y arrives ?
<Axioplase> non :)
<karryall> il faut que tu definisses la fonction f a donner a until
<Axioplase> ouais, je sais :/
<Axioplase> mais j aurais un expo x epsilon= until ? ou un expo x epsilon = if foo then bar else until ?
<karryall> until va calculer f^n(x) = f (f (f ... x)))
<Axioplase> mais je veux f1(x)+f2(x)+ + fn(x) moi :/
<karryall> oui
<karryall> doul'interet de l'exercice :)
<karryall> il faut utiliser un accumulateur
<Axioplase> defini en dehors? ou via un "let n in" dans ma fonction f ?
<karryall> le 'x' de until ne sera pas simplement le 'x' float de exp mais un tuple ou un record incluant d'autres trucs
<karryall> tu sais faire des tuples et des records au fait ?
mattam_ has joined #ocaml
<Axioplase> tuple==n-uplet ?
<karryall> oui
<Axioplase> oui? mais pour les records, non
<karryall> en gros un records, c'est pareil sauf qu'en plus chaque element un nom
<karryall> a un nom
<Axioplase> pas vu, pas le droit :)
<Axioplase> *je suppose*
<Axioplase> j aurais donc un expo x epsilon= until ? ou un expo x epsilon = if foo then bar else until ?
<Axioplase> (je tiens a cette question :P)
<karryall> je la comprends pas tres bien
<Axioplase> ben est ce que ma fonction qui calcule exp(x) est uniquement composée du until, ou est ce qu elle contient elle meme un if...
<karryall> non pas de if
<karryall> enfin pas besoin
<karryall> let expo espilon x = let init = ... in let f v = ... in let p v = ... in until f p init
<karryall> voila, y'a plus qu'a remplir dans les trous !
<Axioplase> oulaaa :)
<karryall> mais c'est pas hyper-simple je te l'accorde
<karryall> y'a pt'et un truc que j'ai pas vu
mattam has quit [Read error: 110 (Connection timed out)]
<Axioplase> je pense a ca sur papier: "f(n)= tant que exp_n(x)>epsilon, exp_0(x)+ exp_1(x)+ +exp_n(x)+ exp_f(n)(x)"
<Axioplase> avec exp_n(x)= x^n/n!
<karryall> epsilon devrait mesurer l'erreur, ie la difference entre ta somme partielle et le vrai exp(x)
<karryall> c'est un plus complique que simplement le comparer au nieme terme de la serie
<Axioplase> ben c est bon en fait. au rang n+1
<Axioplase> si au rang n+1 c est inferieur à eps, alors j ai mon erreur inferieur a eps
<karryall> euh pourquoi ?
<Axioplase> ben parceque les suivants seront encore plus petits!
<karryall> oui mais il y en a une infinité !
<Axioplase> (vu la gueule de la fonction x^n/n! qui converge)
<Axioplase> donc j attendrait bien cette marge d erreur!
<Axioplase> s/drait/drais
<gl> drai
<karryall> bon en fait l'erreur est majorée par exp(x) * x^(n+1) / (n+1)!
<Axioplase> gl nonon. au conditionnel si je garde cette methode :)
<Axioplase> let rec f x n epsilon =if (h x n) > epsilon then (h x n) + (f x n+1 epsilon) else 0.;;
Nutssh has quit ["Client exiting"]
<gl> (n+1)
<Axioplase> bref j ai ca. et l erreur "expression float utilisée avec des ints)"
<Axioplase> y compris avec le (n+1)
<gl> ben c'est normal, h te renvoie un float, non ?
<Axioplase> oui
<gl> bah tu fais (h ...) + ( ... _
<Axioplase> arg
<gl> (+) est de type int -> int -> int
<gl> mets plutot +.
<Axioplase> ayé
<karryall> a mon avis ca va foirer pour des fortes valeurs de x
<Axioplase> ca maaarche :)
<gl> mais bon, je vois pas ou tu utilises 'until', dans le tas.
<Axioplase> nullepart :)
<karryall> j'allais le dire
<gl> l'idee c'est quand meme d'utiliser les fonctions d'ordre superieur :)
<Axioplase> mais je pige toujours pas l interet du until s il me file que le dernier exp_n(x) en fait :/
<gl> parce que ta fonction exp est mal foutue peut-etre qu'il faut tout simplement cumuler les sommes, et pas simplement renvoyer le dernier x^n/n!
<gl> d'ici je vois pas trop, j'ai pas trop reflechi a ton probleme, mais bon
<Axioplase> ben si je modifiais mon until, ca revenait au meme...
<karryall> je t'ai dit: le x du until doit comporter plusieurs valeurs
<Axioplase> en "else until f p x + f p (f x)"
<karryall> au moins de n et la somme partielle
paganini_ has joined #ocaml
<gl> Axioplase non, until doit te renvoyer une fonction, d'apres ton enonce
<Axioplase> gl le until afit ca dans la question 1. dans la question 2 y a ecrit de calculter exp(x) à epsilon pres.
<karryall> bah ca c'est juste l'evaluation partielle avec f et p
<karryall> bon enfin moi je prefere ma solution
<karryall> bonne nuit
<Axioplase> ++ karryall . merci :)
<gl> (sorry for this french parenthesis)
Demitar has quit [Read error: 110 (Connection timed out)]
phubuh has quit [Remote closed the connection]
<Axioplase> say ++
Axioplase has quit ["BitchX: no additives or preservatives"]
cjohnson has quit [Remote closed the connection]
mattam_ is now known as mattam
housetier has quit ["#breaks @ irc.highteq.de"]
tomasso has quit ["Leaving"]
buggs^z has joined #ocaml
ozus1 has joined #ocaml
ozus1 has left #ocaml []
buggs has quit [Read error: 110 (Connection timed out)]
paganini_ has quit ["IceChat IRC Client - Download at www.IceChat.net"]
cmeme has quit [SendQ exceeded]
wazze has quit ["Learning about how the end letters on French words are just becoming more and more silent, I conclude that one day the French]
phubuh has joined #ocaml
The-Fixer has quit ["Goodbye"]
Swynndla has joined #ocaml
ChoJin has joined #ocaml
<ChoJin> hello
<ChoJin> how can I set the precision of string_of_float ?
<pattern> try sprintf
<ChoJin> k thx
<pattern> :)
__DL__ has joined #ocaml
__DL__ has quit [Client Quit]
Kinners has joined #ocaml
<ChoJin> Is it possible to use the Format module to display a table ?
<ChoJin> for instance
<ChoJin> a b c
<ChoJin> 1 2 3
<ChoJin> I tried to make a hbox and then 3 vbox but it didn't work
<ChoJin> I mean, I would like to send the data in the order "a" "1" "b" "2" "c" "3"
<ChoJin> (I want to pretty print an associative map)
<Kinners> I don't know if it's that advanced
<ChoJin> :(
<ChoJin> ok, time to sleep
<ChoJin> cya
ChoJin has quit ["Client exiting"]
karryall has quit ["."]
buggs^z is now known as buggs
<Kinners> is there any special magic needed to access the caml.inria.fr cvs?
<Banana> hum... i don't think so.
<Banana> but the mailing list hasn't been active these days... maybe a problem with their servers.
tomasso has joined #ocaml
Swynndla has quit ["Leaving"]
tomasso has quit [Read error: 104 (Connection reset by peer)]
tomasso has joined #ocaml
Demitar has joined #ocaml
phubuh has quit [Remote closed the connection]
Axioplase has joined #ocaml
<Axioplase> G'd Morning!
<Kinners> morning Axioplase
slashvar has joined #ocaml
<slashvar> Hi
<Kinners> hi slashvar
phubuh has joined #ocaml
<Demitar> Greetings Axioplase, slashvar, Kinners and phubuh.
<phubuh> hi
Nutssh has joined #ocaml
Axioplase has quit ["Goes to fuc^W^Wac"]
housetier has joined #ocaml
_JusSx_ has joined #ocaml
housetier has quit [Operation timed out]
cjohnson has joined #ocaml
Kinners has left #ocaml []
rox has quit ["Client exiting"]
rox has joined #ocaml
karryall has joined #ocaml
The-Fixer has joined #ocaml
cjohnson has quit [Remote closed the connection]
_JusSx__ has joined #ocaml
stupid|me has joined #ocaml
stupid|me has quit [Client Quit]
stupid|me has joined #ocaml
stupid|me is now known as whiskas
_JusSx_ has quit [Read error: 110 (Connection timed out)]
Nutssh has quit ["Client exiting"]
Nutssh has joined #ocaml
whiskas has quit ["Pa / Bye."]
wazze has joined #ocaml
cmeme has joined #ocaml
tomasso has quit [Read error: 110 (Connection timed out)]
_JusSx__ has quit ["No windows for this server"]
housetier has joined #ocaml
karryall has quit ["home"]
_JusSx__ has joined #ocaml
Lola has joined #ocaml
Lola has left #ocaml []
cjohnson has joined #ocaml
Nutssh has quit ["Client exiting"]
_JusSx__ has quit ["[BX] Man I'm *SLEEPY*!!!! My keyboard is slipping away!"]
phubuh has quit [Remote closed the connection]
_JusSx_ has joined #ocaml
phubuh has joined #ocaml
Nutssh has joined #ocaml
Nutssh has left #ocaml []
Nutssh has joined #ocaml
teratorn has joined #ocaml
Nutssh has quit ["Client exiting"]
Defcon7 has quit ["changing servers"]
tomasso has joined #ocaml
Defcon7 has joined #ocaml
Hipo- has joined #ocaml
_JusSx_ has quit ["BitchX: its not your ordinary stick of gum"]
Defcon7 has quit [Read error: 104 (Connection reset by peer)]
Hipo- is now known as Hipo
Defcon7 has joined #ocaml
Defcon7 has quit [Read error: 110 (Connection timed out)]
The-Fixer has quit ["Goodbye"]
housetier has quit ["reboot"]
housetier has joined #ocaml
The-Fixer has joined #ocaml