You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 45 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
(*
From Xavier.Leroy@inria.fr Wed Feb 23 12:12:52 2000
X-Authentication-Warning: rouge.recherche.enac.fr: Host alliot@localhost
[127.0.0.1] claimed to be recherche.ena
c.fr
From: jean-marc alliot alliot@recherche.enac.fr
X-Accept-Language: fr-FR
To: caml@inria.fr
Subject: Bug report: probleme avec ocamlopt.opt
Bug report (vérifié) d'un de mes étudiants.
Version récupérée sur le serveur CVS de l'INRIA à 11h00. Machine utilisée :
Pentium-III/500, système debian-linux/potato.
ocamlopt -v
The Objective Caml native-code compiler, version 2.99+5 (2000/02/22)
Standard library directory: /usr/local/lib/ocaml
ocamlopt.opt -v
The Objective Caml native-code compiler, version 2.99+5 (2000/02/22)
Standard library directory: /usr/local/lib/ocaml
David Gianazza wrote:
Ci-joint le fichier isitabug.ml
En compilant avec ocamlopt, ce programme renvoie 30.556696 qui est le bon
resultat.
Apres compilation avec ocamlopt.opt, il renvoie un "Segmentation fault".
Si l'on met la fonction "f4" qui ne sert a rien en commentaire, cela
renvoie 76054.571421 qui n'est pas le bon resultat.
-- David Gianazza
*)
let fvint= 1.66
let rec f3 n k =
match (n,k) with
(_, 1) -> 1.0
| (n,k) ->
if n>=k
then (f3 (n-1) k)*.fvint +. (f3 (n-1) (k-1))
else (float 0);;
let g3 n =
let rec h n k =
if k=n
then 1.0
else (f3 n k) +. (h n (k+1)) in
h n 1;;
(*
let rec f4 n =
let q= n/2 and r= n mod 2 in
match (q,r) with
(1,0) -> 1
| (q,0) -> (q-1)n + q
| (q,1) -> qn
| _ -> failwith "f4";; )
( TESTS *)
Printf.printf "%f\n" (g3 5);;
exit 0;;
The text was updated successfully, but these errors were encountered:
Original bug ID: 45
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: jean-marc alliot
Version: 2.99+5
OS: debian-linux/potato
Submission from: aspirateur.inria.fr (128.93.8.116)
Submitted by: doligez
(*
From Xavier.Leroy@inria.fr Wed Feb 23 12:12:52 2000
X-Authentication-Warning: rouge.recherche.enac.fr: Host alliot@localhost
[127.0.0.1] claimed to be recherche.ena
c.fr
From: jean-marc alliot alliot@recherche.enac.fr
X-Accept-Language: fr-FR
To: caml@inria.fr
Subject: Bug report: probleme avec ocamlopt.opt
Bug report (vérifié) d'un de mes étudiants.
Version récupérée sur le serveur CVS de l'INRIA à 11h00. Machine utilisée :
Pentium-III/500, système debian-linux/potato.
David Gianazza wrote:
*)
let fvint= 1.66
let rec f3 n k =
match (n,k) with
(_, 1) -> 1.0
| (n,k) ->
if n>=k
then (f3 (n-1) k)*.fvint +. (f3 (n-1) (k-1))
else (float 0);;
let g3 n =
let rec h n k =
if k=n
then 1.0
else (f3 n k) +. (h n (k+1)) in
h n 1;;
(*
let rec f4 n =
let q= n/2 and r= n mod 2 in
match (q,r) with
(1,0) -> 1
| (q,0) -> (q-1)n + q
| (q,1) -> qn
| _ -> failwith "f4";;
)
( TESTS *)
Printf.printf "%f\n" (g3 5);;
exit 0;;
The text was updated successfully, but these errors were encountered: