> My idea system would work like this. You have some floating point code
> that you annotate, then pass it through a float-fixed compiler/parser.
> The code might look like:
>
> {
> FIXED a,b; /* fixed: Q3.13 */
> FIXED c; /* fixed: Q12.15, instrument */
>
> c=a*b /* fixed: saturate */
> }
I could go for _Pragma and __attribute__ on a float, telling
the compiler things like:
a. range
b. maximum additive error in positive direction
c. maximum additive error in negative direction
d. maximum additive error in toward-zero direction
e. maximum additive error in away-from-zero direction
f. maximum multiplicative error in positive direction
g. maximum multiplicative error in negative direction
h. maximum multiplicative error in toward-zero direction
i. maximum multiplicative error in away-from-zero direction
j. the need to accept and/or generate NaN, Inf, -0.0, etc.
Any float that escapes from the compilation unit would
need to be in standard IEEE form. For those that don't,
the compiler can split them as it pleases, using strange
fixed-point formats that are never exposed to compiler users.
Distinct fields of floats, with oddball sizes, can get
handled separately, with all the normal instruction scheduling.
Of course it's all fantasy, but maybe somebody wants to
make a name for himself as a compiler hacker. I can dream.
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Freetel-codec2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freetel-codec2