# Write a fixed-point library for CrossWorks [Imported Thread]

Planned**Idea originally posted by: Jonathan Elliott 21/04/2009**

Floating point is great but potentially slow; fixed point is much faster in general, and I could really do with a fast, clean fixed-point library.

**Comments**

06/04/2014 Nick Jensen

TI just released QMathLib & IQMathLib that implement 16bit & 32bit fixed point as CCS & IAR libraries. They seem very complete and relatively easy to use. Obviously very fast. Is there a way to import either one of those libraries into Crossworks??

13/06/2010 Darcy

64 bit would be fantastic!

29/06/2009 Jonathan Elliott **(Admin)**

There is an extension to ISO C for frac and accum types. I don't think we'll support these directly. And no, "frac" is not the underlying type for floating point, IEEE floating point is quite different, the rounding requirements are completely different.

28/06/2009 microbit

Ideally I would like to see this implemented as an optional data type. A few years ago I briefly used the Z8 Encore C IDE, where they implemented the type "frac" (albeit somewhat clunky :-) Correct me if I'm wrong, but I thought that this data type (potentially) is merely the lowest layer of the float library, before normalising and so on. In practice, this would provide a fixed point number between (+/-) 0 and 0.99999, great when your app only needs trig functions or similar where the app only works with a fractional number between 0 and 1. (1 bit for sig and 15/31 bits for the fraction ?) Thus, the option to use instead of : float my_var; this frac my_var; would be great - much faster when you only need fractional math !!

Please sign in to leave a comment.

## Comments

0 comments