From: John Max Skaller <skaller@ozemail.com.au>
To: Francois Thomasset <francois.thomasset@inria.fr>
Cc: "Beck01, Wolfgang" <BeckW@t-systems.com>, caml-list@inria.fr
Subject: Re: [Caml-list] string_of_float less accurate than sprintf "%f" ?
Date: Mon, 06 May 2002 03:33:09 +1000 [thread overview]
Message-ID: <3CD56CD5.7010106@ozemail.com.au> (raw)
In-Reply-To: <200205021254.g42CsZv21816@ionie.inria.fr>
Francois Thomasset wrote:
>>Beck01, Wolfgang wrote:
>>
>>There's another problem too:
>>
>># string_of_float 42.0;;
>>- : string = "42"
>>
>>The result isn't an ocaml float literal.
>>
>Is it not?
># float_of_string (string_of_float 42.0);;
>- : float = 42
>So if you know that there is a float in the string, it is a float isn't it?
>
It isn't a floating point literal, in ocaml, C, or any other language.
Floating point literals always have either a decimal indicator
or an exponent. It should return "42.0", in my opinion:
"42" is an integer.
--
John Max Skaller, mailto:skaller@ozemail.com.au
snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia.
voice:61-2-9660-0850
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2002-05-05 17:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-30 8:21 Beck01, Wolfgang
2002-05-02 12:44 ` John Max Skaller
2002-05-02 12:54 ` Francois Thomasset
2002-05-05 17:33 ` John Max Skaller [this message]
2002-05-02 13:28 ` David Chase
2002-05-05 18:19 ` John Max Skaller
2002-05-02 13:46 ` jeanmarc.eber
2002-05-03 14:41 ` Oliver Bandel
[not found] ` <Pine.LNX.3.95.1020503162341.541E-100000@first.in-berlin.de >
2002-05-03 18:28 ` David Chase
2002-05-04 8:53 ` Xavier Leroy
2002-05-05 0:31 ` David McClain
2002-05-06 14:19 ` David Chase
2002-05-06 18:21 ` David McClain
2002-05-03 19:25 David Chase
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3CD56CD5.7010106@ozemail.com.au \
--to=skaller@ozemail.com.au \
--cc=BeckW@t-systems.com \
--cc=caml-list@inria.fr \
--cc=francois.thomasset@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox