reature request: fixed point

kov_serg kov_serg at freemail.ru
Sat Mar 1 13:37:58 PST 2008


Is it possible to add to "Basic Data Types" one more type?

fixed point type is intermediate type between fload and integer. Build in support of fixed point type will great help in realtime signal and image processing. 32 bit fixed point with 16bit for integer part and 16 bit of fraction is very easy implemented on any 32bit CPU and have good performance. Especially if CPU has no FPU.

fixed x; // 32bit min=-0x8000.0000 max=0x7FFF.FFFF
...
fixed a=3.14, b=2.3, c=-5.3;
fixed d=a*b/c;

What you think about including "fixed" type in D 2.0?



More information about the Digitalmars-d mailing list