Boost logo

Boost :

Subject: Re: [boost] GSOC 2013
From: Christopher Kormanyos (e_float_at_[hidden])
Date: 2013-04-24 18:00:11


> Sure I had necro'd a thread a while back but it probably
> got missed. Reposting:

>> I think fixed-point is a very worthwhile thing although in past
>> discussions it seems like the functionality that everyone agrees upon is
>> a very small subset of what people need in their fixed point types.

I remember the thread.

Fixed-point is one of those things where everyone
rolls their own.

A reference implementation in Boost would be key.

Fixed-point is a tough one, depending on how you do the
decimal split, and how much precision should be supported
via width of the fractional and integer parts,
and how many transcendental functions should be
in the mix.

I rolled one here:

https://github.com/ckormanyos/real-time-cpp/tree/master/ref_app/src/math/fixed_point

It comes from my research with C++ on hard real-time systems.

This implementation is simplistic, but may have ideas.
Basically, it splits a signed integer (8, 16, 32, or 64 bit)
down the middle. There is support for a variety of elementary
transcendental functions. It might be of interest
when pursuing fixed-point.

I favor polynomial expansion based on least squares fit
over CORDIC.

Sincerely, Chris.


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