C++ 定点库? [英] C++ fixed point library?

查看:44
本文介绍了C++ 定点库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个免费的 C++ 定点库(主要用于嵌入式设备,而不是用于任意精度的数学).基本上,要求是:

I am looking for a free C++ fixed point library (Mainly for use with embedded devices, not for arbitrary precision math). Basically, the requirements are:

  • 没有不必要的运行时开销:任何可以在编译时完成的工作,都应该在编译时完成.
  • 能够在定点和浮点之间透明地切换代码,没有固有的开销.
  • 定点数学函数.如果您需要来回转换以求平方根,那么使用不动点就没有多大意义了.
  • 占地面积小.

有什么建议吗?

推荐答案

有一个开源定点数学库项目,可以通过以下链接找到:

There is an open-source fixed point math library project which can be found by following the links below:

它是一个 C 静态库,为 C++ 用户提供 C++ 类接口,它实现了以下功能:触发.函数:sin、cos、tan、asin、acos、atan、atan2饱和算术:sadd、ssub、smul、sdiv其他函数:sqrt、exp

It is a C static library with a C++ class interface for C++ users, it implements the following functionality: Trig. Functions: sin, cos, tan, asin, acos, atan, atan2 Saturated Arithmetic: sadd, ssub, smul, sdiv Other Functions: sqrt, exp

它仅支持 16.16 定点数据类型.

这是一个积极开发的开源项目(寻找感兴趣的开发人员).

It is an actively developed open-source project (looking for interested developers).

这篇关于C++ 定点库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆