diff options
| author | Xavier Leroy <xavier.leroy@inria.fr> | 2015-11-19 10:37:20 +0100 |
|---|---|---|
| committer | Xavier Leroy <xavier.leroy@inria.fr> | 2015-11-19 10:37:20 +0100 |
| commit | 0c5e862a3e377d841d9e3dd222bcd350651b644f (patch) | |
| tree | acc6c93ac6c6e7632c68f198220c2b7b659f39ff /Changes | |
| parent | 2641daf1fe6150a4597e2c4ea92478b48b386b37 (diff) | |
| parent | 86d29bf2a6054d3671afdc34c8cbd820a51b1c89 (diff) | |
| download | ocaml-0c5e862a3e377d841d9e3dd222bcd350651b644f.tar.gz | |
GPR#268: Hexadecimal notation for floating-point numbers
Merge of branch 'hex-float'.
- Add support in byterun/floats.c for conversions between floats and strings in hex notation. We cannot rely on the C standard library here because Microsoft consistently fails at supporting hex notation as standardized in C99. Instead, the conversions are implemented from scratch.
- Add support in the lexer so that hex float literals are recognized in OCaml sources.
- Add support in formats. The ISO C99 format letters for hex floats are %a and %A, but %a is already taken. I chose %h and %H, which are rejected today as bad formats (hence no backward incompatibility) and don't mean anything in C either (h is a modifier, not a format letter).
- Add support in printf. All the trimmings are there in the implementation of %h and %H, including sign modifier and fixed precision.
- Benoit Vaugon contributed support in scanf.
Resolved conflicts:
boot/ocamlc
boot/ocamldep
boot/ocamllex
parsing/lexer.mll
Diffstat (limited to 'Changes')
| -rw-r--r-- | Changes | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -46,6 +46,10 @@ Language features: attribute is applied on predefined exception constructors which take an purely informational (with no stability guarantee) message. (Alain Frisch) +- GPR#268: hexadecimal notation for floating-point literals + In OCaml source code, FP literals can be written using the hexadecimal + notation 0x<mantissa in hex>p<exponent> from ISO C99. + (Xavier Leroy) - GPR#173: [@inline] and [@inlined] attributes (for function declarations and call sites respectively) to control inlining (Pierre Chambart, Mark Shinwell) @@ -156,6 +160,9 @@ Standard library: (report and fix by Jeremy Yallop) - GPR#265: new implementation of Queue avoiding Obj.magic (Jérémie Dimino) +- GPR#268: '%h' and '%H' modifiers for printf and scanf to support + floating-point numbers in hexadecimal notation + (Xavier Leroy, Benoît Vaugon) - GPR#272: Switch classify_float to [@@unboxed] (Alain Frisch) - Improve speed of classify_float by not going through fpclassify() (Alain Frisch, Xavier Leroy) |
