English 中文(简体)
在将双倍与惯性混为一谈时,究竟有什么变化?
原标题:What gets converted to what when comparing a double to an integer for identity?
最佳回答

是的,是的。

对于32个轨道,<代码>杜布尔可准确反映每个数值。 但是,如果你对64轨线作一番比较,如果该星号大于2^52,就有可能出现四舍五入错误。 您可使用<条码>长期双,但该代码至少有64条之分。

当然,最好的办法只是使用浮动点字面:1.0 或仅限1. 类型double,1.0f

问题回答

分类账翻了一番。

C++标准

如果你知道浮动点数含有准确的数值,那么你就不必担心不实际的表述。

未经签名的ger户只要符合人工授标+1轨,就可确切地作为浮动点数表示,因为其为人工授与2比特(32英寸中的负值,2<>-31除外)。

在排雷员中拥有2个权力的分裂也可以确切地代表。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签