caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alain Frisch <alain.frisch@lexifi.com>
To: caml-list <caml-list@inria.fr>
Subject: Behavior of %F
Date: Mon, 08 Jun 2009 13:19:41 +0200	[thread overview]
Message-ID: <4A2CF3CD.70807@lexifi.com> (raw)

Hello,

The behavior of Printf w.r.t. %F changed recently.

Before (OCaml 3.10.0, and presumably 3.11.0):

# Printf.sprintf "%F" 1.;;
- : string = "1."


Now (OCaml 3.11.1+rc1):

# Printf.sprintf "%F" 1.;;
- : string = "1.000000"


This change comes from:

http://camlcvs.inria.fr/cgi-bin/cvsweb/ocaml/stdlib/printf.ml.diff?r1=1.58.2.1;r2=1.58.2.2;f=h


Is the new behavior intentional? The manual says:

========
F: convert a floating-point argument to Caml syntax (dddd.  or dddd.ddd 
or d.ddd e+-dd).
========

but it seems the new implementation never produces the form dddd.


-- Alain


             reply	other threads:[~2009-06-08 11:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-08 11:19 Alain Frisch [this message]
2009-06-08 16:25 ` Godi & tcl/tk Eliot Handelman

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=4A2CF3CD.70807@lexifi.com \
    --to=alain.frisch@lexifi.com \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).