Hello, On Sat, Nov 12, 2011 at 03:20:19AM +0100, Ralf Vogler wrote: > I'm trying to reproduce double rounding problems like shown here: > http://www.exploringbinary.com/double-rounding-errors-in-floating-point-conversions/ > For that I need to know the full value of long double literals.
I do not understand exactly what you are trying to achieve. Reproducing these results using CIL instead of gcc directly should work, since CIL will strive to preserve the original representation of the constant (see below). > Problem: > > > Because CIL uses 64-bit floating point numbers in its internal > > representation of floating point numbers, long double constants are > > parsed as if they weredouble constants. Yes, using float_of_string (grep CReal in src/frontc/cabs2cil.ml if you need more details). > Cil.CReal also has a string representation of the constant, but I don't > know how to parse it. Why do you need to parse it? It will be used in the final output if present, and gcc will get the exact same constant as if you did not use CIL. > OCaml's arbitrary-precision module accepts only strings in the form of > "123/123". > Any ideas? It really depends on what you want to do (which I fail to understand). Writing your own parser should not be very hard if you can explain it precisely. Best, -- Gabriel ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ CIL-users mailing list CIL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cil-users