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: 881 Reporter: administrator Status: closed Resolution: not a bug Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Christian Gillot
Version: 3.04
OS: linux
Submission from: 80-24-20-121.uc.nombres.ttd.es (80.24.20.121)
Hi,
Floats don't work with bytecode (ocamlrun) on the iPAQ.
You get strange results but on the native (ocamlopt) version
it works though. First I got this using a cross-compiled ocamlc
but later I compiled ocamlc natively and I get exactly the
same behaviour.
I don't know what's going on but if I can help tell me.
You can do tests natively by using the skiffcluster from Compaq CRL
see the following URL : http://www.handhelds.org/projects/skiffcluster.html
The iPAQ has Linux 2.4.16/glibc 2.2.4 with Ocaml 3.04
let main () =
let x = 5.2 in
let y = 6.3 in
let z = x +. y in
print_float x;
print_string " + ";
print_float y;
print_string "=";
print_float z;
print_string "\n";;
main();;
In the native ocamlopt compiled version
you get the expected result. But in the
bytecode version here is what you get :
Floats don't work with bytecode (ocamlrun) on the iPAQ.
You get strange results but on the native (ocamlopt) version
it works though. First I got this using a cross-compiled ocamlc
but later I compiled ocamlc natively and I get exactly the
same behaviour.
I don't know what's going on but if I can help tell me.
You can do tests natively by using the skiffcluster from Compaq CRL
see the following URL : http://www.handhelds.org/projects/skiffcluster.html
The iPAQ has Linux 2.4.16/glibc 2.2.4 with Ocaml 3.04
let main () =
let x = 5.2 in
let y = 6.3 in
let z = x +. y in
print_float x;
print_string " + ";
print_float y;
print_string "=";
print_float z;
print_string "\n";;
main();;
I tested the program above on skiffcluster5 using OCaml 3.04 and it
worked fine in bytecode. (I compiled OCaml on that machine a couple
of weeks ago and did not have the fortitude to recompile it again, so
something might have changed in their C compiler since then.)
AFAIK, floats are software emulated on the Strong Arm, either by the C
library or the kernel, and I have long suspected that the emulation
has a few quirks -- one of my test cases (an FFT implementation)
never produced the right results when compiled with ocamlopt, although
the bytecode version was OK. Still, the bytecode interpreter is a C
program like any other, so it is surprising that it would run into
floating-point problems that other C programs would not run into.
Original bug ID: 881
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Christian Gillot
Version: 3.04
OS: linux
Submission from: 80-24-20-121.uc.nombres.ttd.es (80.24.20.121)
Hi,
Floats don't work with bytecode (ocamlrun) on the iPAQ.
You get strange results but on the native (ocamlopt) version
it works though. First I got this using a cross-compiled ocamlc
but later I compiled ocamlc natively and I get exactly the
same behaviour.
I don't know what's going on but if I can help tell me.
You can do tests natively by using the skiffcluster from Compaq CRL
see the following URL :
http://www.handhelds.org/projects/skiffcluster.html
The iPAQ has Linux 2.4.16/glibc 2.2.4 with Ocaml 3.04
let main () =
let x = 5.2 in
let y = 6.3 in
let z = x +. y in
print_float x;
print_string " + ";
print_float y;
print_string "=";
print_float z;
print_string "\n";;
main();;
In the native ocamlopt compiled version
you get the expected result. But in the
bytecode version here is what you get :
-9.25596534328e+61 + 4.66726164528e-62=-9.25596534328e+61
Thanks
The text was updated successfully, but these errors were encountered: