cross compile windows 32 to windows 64 extended floating point type gets double lazarus / 67-Windows ---------------------------------------------------------------------- beepee · 2020-12-25 20:34 The cross compiler ppcrossx64 -Twin64 does revert the extended real type to double real type. As far as I know, the extended type *is* available for 64 bits programs on Intel/AMD processors as it is available for 32 bits programs Is this a known issue? ---------------------------------------------------------------------- lucamar · 2020-12-25 20:55 It's both known and on purpose. IIRC, it's a gimmick of how Windows itself either uses or sets up the processor (don't remember which) which makes it forego the use of extended in favor of some other feature (SSE? AVX? ???). The point is that on Windows 64bit you can't use Extended (at least not easily) so by default it's aliased to Double. ---------------------------------------------------------------------- beepee · 2020-12-25 21:09 Thanks, and: Ahh, just found out is the same at Delphi, see this link: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Delphi_Consideratio ns_for_Multi-Device_Applications#The_Extended_Data_Type_Is_2_Bytes_Sma ller_on_64-bit_Windows_Systems However I am still not amused the type is not available for 64 bits programs ---------------------------------------------------------------------- lucamar · 2020-12-25 21:41 Quote from: beepee on December 25, 2020, 10:09:21 pmHowever I am still not amused the type is not available for 64 bits programs Why? Do you a explicit, specific need for the 80 bit Extended? Note that Intel has always said that Extended was intended for intermediate, internal calculations and that it shouldn't be generally used unles strictely needed, so it "dissapearance" shouldn't come as a surprise. Granted, it would be nicer if it were there when absolutely needed, but since it isn't ... ---------------------------------------------------------------------- PascalDragon · 2020-12-26 09:55 Quote from: beepee on December 25, 2020, 09:34:14 pmAs far as I know, the extended type *is* available for 64 bits programs on Intel/AMD processors as it is available for 32 bits programs Is this a known issue? This is because Microsoft considers the 80-bit types as deprecated for Win64 and strongly suggests programs not to use it. For any other x64 platform the 80-bit type is available. However it isn't available for any non-x86 platform anyway. ---------------------------------------------------------------------- beepee · 2020-12-26 15:25 Quote from: lucamar on December 25, 2020, 10:41:16 pmWhy? Do you a explicit, specific need for the 80 bit Extended? Note that Intel has always said that Extended was intended for intermediate, internal calculations and that it shouldn't be generally used unles strictely needed, so it "dissapearance" shouldn't come as a surprise. When doing high precision searches, like finding small differences between sums of square-roots, extra bits help for pre-selections (see e.g. https://topp.openproblem.net/master.pdf problem 33 or search for "Erik D Demaine open problems problem 33') Puzzle: Which one is bigger: a) sqrt(13274) +sqrt(26086) +sqrt(37407) + sqrt(95*95) b) sqrt(24417) +sqrt(35473) +sqrt(48634) (hint: extended type will not help here) However, I am rewriting my arbitrary fixed point unit to work with doubles and it seems to run faster, especially on an AMD Ryzen processor, not that much difference on an Intel Core-I7.