Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006727OCamlstandard librarypublic2014-12-19 15:112014-12-24 20:58
ReporterVassili Karpov 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformAnyOSAnyOS Version
Product Version4.02.1 
Target VersionFixed in Version4.02.2+dev / +rc1 
Summary0006727: Printf.sprintf "%F" misbehavior
Description# let t = 1000001. in t, float_of_string (Printf.sprintf "%F" t);;
- : float * float = (1000001., 1000000.)

This used to work properly before GADT implementation of formatting.
Steps To Reproducelet t = 1000001. in t, float_of_string (Printf.sprintf "%F" t);;
in repl
TagsNo tags attached.
Attached Filesdiff file icon patch-format-Float_F.diff [^] (1,138 bytes) 2014-12-19 16:35 [Show Content]

- Relationships

-  Notes
(0012894)
bvaugon (developer)
2014-12-19 16:35

Ok, the problem is that, when using %F in a format, the float was originaly printed with 12 significant digits, and now with 6.

I attach a patch that restore the legacy behaviour.
(0012986)
doligez (administrator)
2014-12-24 20:58

patch applied to 4.02 (rev 15745) and trunk (rev 15746)

- Issue History
Date Modified Username Field Change
2014-12-19 15:11 Vassili Karpov New Issue
2014-12-19 16:35 bvaugon Note Added: 0012894
2014-12-19 16:35 bvaugon File Added: patch-format-Float_F.diff
2014-12-24 20:58 doligez Note Added: 0012986
2014-12-24 20:58 doligez Status new => closed
2014-12-24 20:58 doligez Resolution open => fixed
2014-12-24 20:58 doligez Fixed in Version => 4.02.2+dev / +rc1
2017-02-23 16:43 doligez Category OCaml standard library => standard library


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker