| Anonymous | Login | Signup for a new account | 2013-05-22 15:56 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0000028 | OCaml | OCaml general | public | 2000-01-20 10:35 | 2000-02-07 15:20 | |||
| Reporter | administrator | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | no change required | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | |||||||
| Summary | 0000028: Re: ocaml float computation on NS3.3 | |||||||
| Description | Hi, Thank you for your message to the Caml mailing list. However your message seems to be a bug report; hence I send it to the relevant mailing list caml-bugs@inria.fr Thank again for your interest in Caml. Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/ [^] > Hello, > I'm using NeXTSTEP 3.3 and ocaml to run the GenWeb software. Although it > compiles easily enough, there is a problem with the math in ocaml > > 1 > ocaml > Objective Caml version 2.04 > > # 2. *. 3. ;; > - : float = 1.15348445456e+18 > # > > Anyone familiar with the origin of this problem? > > ______________________________________ > Paul Buckley > 515 W 59th St. #22K > New York, NY 10019 | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0002064) administrator (administrator) 2000-01-23 14:51 |
>I subscribed to the general list because I had a question. I posted a question >which was diverted to the bugs list. I then tried to subscribe to the bugs >list so that I would know of the result of my question. Should I instead be >expecting a direct reply? Ah, OK. You can find the (new) database of bugs at <http://caml.inria.fr/bin/caml-bugs/>; [^] you'll find your message there (number 28). Indeed you're supposed to get a direct reply when (if) we fix your bug. However, we don't have any NeXT machine left, so it's unlikely that we'll find the bug without your help. If you're ready to do some cooperative debugging, you could start by sending us the complete output of the configure script. You can also try to compile the byte-code interpreter in debug mode ("make ocamlrund" in byterun/). And we'll try to make up a clearer notification for messages bounced from caml-list to caml-bugs. Thanks for your input, -- Damien |
|
(0002065) administrator (administrator) 2000-02-07 15:20 |
>> I'm using NeXTSTEP 3.3 and ocaml to run the GenWeb software. Although it >> compiles easily enough, there is a problem with the math in ocaml >> >> 1 > ocaml >> Objective Caml version 2.04 >> >> # 2. *. 3. ;; >> - : float = 1.15348445456e+18 >> # >> >> Anyone familiar with the origin of this problem? Not having access to a NextStep 3.3 machine, I can only venture a guess. This could be due to a problem with NextStep include files not being POSIX conformant. More specifically, I suspect the function atof() isn't declared in <stdlib.h> (where it should be) nor in <math.h>, causing the C compiler to assume it returns an int and to insert a bogus int-to-float conversion. I suggest you try the following: in byterun/floats.c, line 103, before the definition of "float_of_string", add the line extern double atof(char * s); and recompile the Caml system. - Xavier Leroy |
|
(0002066) administrator (administrator) 2000-02-07 15:20 |
Looks like a bug in NextStep's include files. |
|
(0002067) administrator (administrator) 2000-02-09 07:05 |
Thanks for getting back to me. Xavier Leroy said: > >> I'm using NeXTSTEP 3.3 and ocaml to run the GenWeb software. Although it > >> compiles easily enough, there is a problem with the math in ocaml >> > >> 1 > ocaml > >> Objective Caml version 2.04 > >> > >> # 2. *. 3. ;; > >> - : float = 1.15348445456e+18 > >> # > >> > >> Anyone familiar with the origin of this problem? > > Not having access to a NextStep 3.3 machine, I can only venture a guess. > This could be due to a problem with NextStep include files not being > POSIX conformant. More specifically, I suspect the function atof() > isn't declared in <stdlib.h> (where it should be) nor in <math.h>, > causing the C compiler to assume it returns an int and to insert > a bogus int-to-float conversion. > atof() is defined in stdlib.h but not the way ocaml expects it: " #ifdef __STDC__ extern double atof(const char *nptr); #define atof(nptr) strtod(nptr, (char **)NULL) " > I suggest you try the following: in byterun/floats.c, line 103, before > the definition of "float_of_string", add the line > > extern double atof(char * s); > > and recompile the Caml system. > It seems to have fixed the ocaml: " 1 > ocaml Objective Caml version 2.04 # 2.*.3.;; - : float = 6 # " Thanks. ______________________________________ Paul Buckley 515 W 59th St. #22K New York, NY 10019 |
|
(0002068) administrator (administrator) 2000-02-09 17:23 |
After recompiling with the functioning ocaml installed, GeneWeb calculates consanguinitiy correctly. Thanks again. --- ______________________________________ Paul Buckley 515 W 59th St. #22K New York, NY 10019 |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-18 10:13 | administrator | New Issue | |
| Copyright © 2000 - 2011 MantisBT Group |