Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

probleme avec ocamlopt.opt #2381

Closed
vicuna opened this issue Mar 3, 2000 · 1 comment
Closed

probleme avec ocamlopt.opt #2381

vicuna opened this issue Mar 3, 2000 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Mar 3, 2000

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.

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) -> q
n
| _ -> failwith "f4";;
)
(
TESTS *)

Printf.printf "%f\n" (g3 5);;
exit 0;;

@vicuna
Copy link
Author

vicuna commented Mar 7, 2000

Comment author: administrator

Was a bug in the new code for boxed ints. Fixed on 2000-02-28 by Xavier.

@vicuna vicuna closed this as completed Mar 7, 2000
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant