.NET是“双重”的算术独立的平台/体系结构? [英] Is .NET “double” arithmetic independent of platform/architecture?

查看:132
本文介绍了.NET是“双重”的算术独立的平台/体系结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我运行一个复杂的计算,涉及 System.Double 在.NET的Windows(x86和x64)下,然后在Mono(LINUX,UNIX,等等),我是绝对保证的获得的完全的同样的结果在所有情况下,还是在规范允许在计算一些回旋余地?

If I run a complex calculation involving System.Double on .NET under Windows (x86 and x64) and then on Mono (Linux, Unix, whatever), am I absolutely guaranteed to get exactly the same result in all cases, or does the specification allow for some leeway in the calculation?

推荐答案

从的 MSDN

在另外的precision损失   而导致的算术,   分配,和解析操作   双值可能相差   平台。例如,结果   分配一个字Double值可能   不同的32位和64位   .NET Framework的版本

In addition, the loss of precision that results from arithmetic, assignment, and parsing operations with Double values may differ by platform. For example, the result of assigning a literal Double value may differ in the 32-bit and 64-bit versions of the .NET Framework

希望有所帮助。

这篇关于.NET是“双重”的算术独立的平台/体系结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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