From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 8A770BC37 for ; Mon, 8 Jun 2009 13:20:03 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ak0EADqRLErB/BYfZmdsb2JhbACYKA0LCAgTA7E2hAoF X-IronPort-AV: E=Sophos;i="4.41,324,1241388000"; d="scan'208";a="29071862" Received: from smtp20.orange.fr ([193.252.22.31]) by mail3-smtp-sop.national.inria.fr with ESMTP; 08 Jun 2009 13:19:43 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2023.orange.fr (SMTP Server) with ESMTP id 106AE2000062 for ; Mon, 8 Jun 2009 13:19:43 +0200 (CEST) Received: from [192.168.1.66] (APuteaux-154-1-57-159.w81-249.abo.wanadoo.fr [81.249.64.159]) by mwinf2023.orange.fr (SMTP Server) with ESMTP id CC11B200011C for ; Mon, 8 Jun 2009 13:19:40 +0200 (CEST) X-ME-UUID: 20090608111940835.CC11B200011C@mwinf2023.orange.fr Message-ID: <4A2CF3CD.70807@lexifi.com> Date: Mon, 08 Jun 2009 13:19:41 +0200 From: Alain Frisch User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: caml-list Subject: Behavior of %F Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; frisch:01 frisch:01 lexifi:01 printf:01 ocaml:01 printf:01 sprintf:01 ocaml:01 sprintf:01 camlcvs:01 cvsweb:01 stdlib:01 intentional:01 syntax:01 alain:01 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