我该怎么办64位运算在Perl? [英] How can I do 64-bit arithmetic in Perl?

查看:231
本文介绍了我该怎么办64位运算在Perl?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个Perl的新手,

I am a perl newbie,

我可以简单地使用64位运算在Perl?

Can I simply use 64-bit arithmetic in Perl?

例如

$operand1 = 0xFFFFFFFFFFFF;   # 48 bit value
$operand2 = 0xFFFFFFFFFFFF;   # 48 bit value

$Result = $operand1 * $operand2;

  • 我基本上找 替代Perl中的int64_t。
  • 有什么办法说,如果 变量符号或无符号?
    • I am basically looking for a replacement for the int64_t in perl.
    • Is there any way to mention, if the variable is signed or unsigned?
    • 推荐答案

      是的,但你需要有Perl,以支持64位编译。

      Yes, however you need to have Perl compiled with 64-bit support.

      这篇关于我该怎么办64位运算在Perl?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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