双胞胎有溢出吗? [英] Do doubles suffer from overflow?

查看:192
本文介绍了双胞胎有溢出吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可能有一个double或float的溢出(回绕)?

Is it possible to have an overflow (wrap around) with a double or a float? What will happen if the maximum (or minimum) value is reached on x86 or x64 hardware?

推荐答案

如果在x86或x64硬件上达到最大(或最小)系统,溢出会产生一个特殊的无穷大(或负无穷大)值,超过这个值,任何进一步的增量都将无效。

On an IEEE-754 compliant system, overflow results in a special "infinity" (or "minus infinity") value, beyond which any further increment will have no effect.

这篇关于双胞胎有溢出吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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