是否有可能创建c自宽度的整数? [英] Is it possible to create custom-width integers in C?

查看:150
本文介绍了是否有可能创建c自宽度的整数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C标准和C编译器来固定宽度的整数类型,如 uint8_t有 int16_t 等。

The C standard and C compilers come with fixed width integer types, such as uint8_t, int16_t, etc.

有没有用C定义一个128位的整数的方式,将使用相同​​的语义现有固定宽度的整数在code可用?

Is there a way of defining a 128-bit integer in C that would be useable in code using the same semantics as the existing fixed-width integers?

推荐答案

您需要像GMP:

  • http://gmplib.org/

您不会得到精确的语义。

You won't get the "exact" semantics.

这篇关于是否有可能创建c自宽度的整数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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