Boost logo

Boost :

Subject: Re: [boost] Support for fixed point arithmetic in Boost?
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2016-11-08 05:31:08


> -----Original Message-----
> From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Michael Marcin
> Sent: 08 November 2016 05:59
> To: boost_at_[hidden]
> Subject: Re: [boost] Support for fixed point arithmetic in Boost?
>
> On 11/7/2016 12:51 PM, Juan Dent wrote:
> > Hi,
> >
> > Sorry if this is a dumb question but I have been looking for fixed point
> > types in Boost and not found any...
> >
> > Yet I feel there must be...
> >
> > Thanks for any help
>
> There was in fact just recently discussion of 2 fixed-point libraries on
> this mailing list.
>
> https://github.com/BoostGSoC15/fixed_point
> https://github.com/johnmcfarlane/fixed_point

You can also see a pdf version of Christopher Kormanyos's fixed-point library at
https://dl.dropboxusercontent.com/u/43940943/modular-boost/libs/fixed_point/doc/fixed_point.pdf

Chris has produced a rather different concept of a fixed point library from John Macfarlane, starting with Lawrence Crowl's paper,
fixing the size of the underlying integral type and not allowing 'automatic' expansion on overflow. Using multiprecision integral
types allows some really high precision computations, if that's what you need, but you need to decide the size at compile-time.

He has also fully implemented the C math functions so that most existing code using floating-point can be run without modification.
Some amusing working examples are given.

These rather different proposals focus on different uses, Chris's on embedded and IoT devices where the key advantage of fixed-point
appears to me, to my surprise, to be lower power consumption, and speed.

Paul

---
Paul A. Bristow
Prizet Farmhouse
Kendal UK LA8 8AB
+44 (0) 1539 561830

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk