64-bit

Arithmetic error when adding two double values [duplicate]

隐身守侯 提交于 2020-01-15 11:14:39
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Floating point inaccuracy examples double arithmetic and equality in Java I caught this issue while trying to debug a sorting routine that checked if two values were equal. Getting the values was simply doing some addition on two double variables: 0.31 + 0.27. When the sort compared the sum of those two against the some of another objects, whose sum also equaled 0.58, it told me the comparison was not equal.

Arithmetic error when adding two double values [duplicate]

こ雲淡風輕ζ 提交于 2020-01-15 11:13:53
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Floating point inaccuracy examples double arithmetic and equality in Java I caught this issue while trying to debug a sorting routine that checked if two values were equal. Getting the values was simply doing some addition on two double variables: 0.31 + 0.27. When the sort compared the sum of those two against the some of another objects, whose sum also equaled 0.58, it told me the comparison was not equal.

Exceptions ignored in form_load for x64

删除回忆录丶 提交于 2020-01-15 06:56:06
问题 When I throw an exception from form_load in my C# application it doesn't work when the platform is x64. (it acts as expected for x86) When I step through the code, I get to the line where the exception it thrown, then it immediately jumps to timer_Tick. When I create a new project and add this line to form_load: throw new System.Exception("oops!"); For x86 it crashes as expected. For x64 it doesn't crash. Is there some way to get an application to actually throw from form_load on 64-bit? 回答1:

64 Bit P/Invoke Idiosyncrasy

情到浓时终转凉″ 提交于 2020-01-15 04:18:06
问题 I am trying to properly Marshal some structs for a P/Invoke, but am finding strange behavior when testing on a 64 bit OS. I have a struct defined as: /// <summary>http://msdn.microsoft.com/en-us/library/aa366870(v=VS.85).aspx</summary> [StructLayout(LayoutKind.Sequential)] private struct MIB_IPNETTABLE { [MarshalAs(UnmanagedType.U4)] public UInt32 dwNumEntries; public IntPtr table; //MIB_IPNETROW[] } Now, to get the address of the table, I would like to do a Marshal.OffsetOf() call like so:

C++ 64-bit Excel add-in (XLL) is not loading correctly in 64-bit Excel

帅比萌擦擦* 提交于 2020-01-14 19:25:20
问题 I have a piece of C++ code, which creates a XLL (Excel add-in). It can be successfully loaded by Excel, and works perfectly. Then, I switched to 64-bit Excel, and the code stopped working. So I have recompiled the code in Visual Studio using x64 platform settings. The compilation went error free. Now when I try to load it in 64-bit Excel, Excel does not recognize the file extension: It complains showing "The file format and extension of 'MyAddin.xll' don't match.", and gives me the follwoing

gdb - nop with extra data, why?

天大地大妈咪最大 提交于 2020-01-14 08:58:08
问题 I am currently writing simple tests to understand how gdb compiles from C++ to asm using extern "C" and option -O0 and my asm object is compiled with nasm -g -f elf64 Here is my disassembled concerned stack frame: 0x0000000000400570 <+0>: push rbp 0x0000000000400571 <+1>: mov rbp,rsp 0x0000000000400574 <+4>: push r10 => 0x0000000000400576 <+6>: mov r10,QWORD PTR [rbp-0x8] 0x000000000040057a <+10>: pop r10 0x000000000040057c <+12>: mov rsp,rbp 0x000000000040057f <+15>: pop rbp

Getting the new Squeak 5 to run on 64 bit Linux

余生颓废 提交于 2020-01-14 05:32:29
问题 In short: how do I get Squeak 5 to run on x64 Linux? I dont care whether the executable is 32 or 64 bit as long as it runs and opens the Squeak 5 image. Here is what I tried: When I try to run the executables from the Squeak 5 package i get: Running 32-bit Squeak on a 64-bit System. install-libs32 may install them - tried that. Wasn't found. Then I went looking for a 64 bit executable. There are some from Squeak 4 but they can't open Squeak 5 images. Looking through the Squeak 5 package: The

Assembly - How to set graphics mode in UEFI (No VGA, No BIOS, Nothing deprecated)

五迷三道 提交于 2020-01-14 03:13:17
问题 Tools I'm using: nasm, qemu-system-x86_64. Operating System I'm on: Windows 10. So I checked out the "Real Mode OS Warning" at https://wiki.osdev.org/Real_Mode_OS_Warning What the article seems to imply is that everything can be done without using BIOS interrupts whatsoever. I know how to load Long Mode, and so I've done this, but now I am stuck because BIOS interrupts were all I knew until now. I want to do something like set the graphics mode to full-memory-access-mode (might sound familiar

How to make COM ActiveX object work in IE 64 bit?

旧街凉风 提交于 2020-01-14 01:38:28
问题 I have a COM object embeded in ASP.NET page using <object classid="clsid:XXX..."> . It works in IE 32 bit, but does not work in IE 64 bit - can't access its functions. There are no error messages, no event logs where I can get some information. The dll is in C#, includes COM visible class, compiled for Any CPU (though I also tried x86), and registered during client installation by executing regasm. This creates registry keys, well everything works fine except for IE 64. I searched internet

How to install sqlite or postgresql on windows 8 for a ruby on rails setup?

对着背影说爱祢 提交于 2020-01-13 16:30:31
问题 I've been trying to install a database as part of my ruby on rails setup. I'm running a 64 bit windows 8, a x64 based machine. My ruby version is 2.1.3p242, rails version is 4.0.0, sqlite3 version is 3.8.6 and postgresql version is 9.3 I first tried to install sqlite3 by following the steps given in this SO answer but I get this error `require': Could not load 'active_record/connection_adapters/sqlite3_adapter'. Make sure that the adapter in config/database.yml is valid. My database.yml has