Boost logo

Boost Users :

Subject: Re: [Boost-users] [karma] auto_ + default floating point precisions
From: Michael Caisse (boost_at_[hidden])
Date: 2011-04-15 18:30:18

On 04/15/2011 01:08 PM, Brian Budge wrote:
> Hi all -
> I'm using boost karma to generically generate strings from many
> different types use auto_. I've noticed that if I specify some double
> precision numbers like 1.123456, I will only get "1.123" out as a
> string. While looking around the documentation, it seems that it is
> possible to specify the precision up to numeric_limits<real>::digits10
> + 1. I couldn't find an example for how to do this with double_ let
> alone auto_. Can anyone point me in the right direction? Is there
> documentation that google couldn't find for me?
> Thanks,
> Brian
> _______________________________________________

Hi Brian -

The important parts are here:

That little example shows you how to customize the real number
formatting to have whatever policies you want. The policy of interest to
you is precision as listed in the table below the example.


Michael Caisse
Object Modeling Designs

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at