Why free pascal suppress the "extended" floating point type on win64 platform? lazarus / 67-Windows ---------------------------------------------------------------------- photor · 2014-05-29 15:19 Then how to achieve high precision floating point operation on win64 platform? ---------------------------------------------------------------------- photor · 2025-02-09 03:23 No one knows? ---------------------------------------------------------------------- ccrause · 2025-02-09 08:03 To answer the subject question: https://forum.lazarus.freepascal.org/index.php?action=post;quote=38854 4;topic=52648.0;last_msg=388569 https://learn.microsoft.com/en-us/windows/win32/dxtecharts/sixty-four- bit-programming-for-game-developers#porting-applications-to-64-bit- platforms Quote from: photor on May 29, 2014, 05:19:43 pmThen how to achieve high precision floating point operation on win64 platform? Can you be more specific? Do you need 32/64/80/128/arbitrary bit precision? ---------------------------------------------------------------------- runewalsh · 2025-02-09 08:22 I don’t understand myself. Microsoft proclaimed x87 80-bit extended “deprecated” but it is de-facto fully supported and will be supported for the indefinite future, the 64-bit Windows application could “just” use FPU with its 80-bit types the usual way. Not that you’ll want to do it, though. 80-bit extendeds have a nice property of fitting signed 64-bit values losslessly but are otherwise more useless than one might think. And you’ve had 11 years to realize it yourself... ---------------------------------------------------------------------- DragoRosso · 2025-02-09 13:27 Look this:   https://forum.lazarus.freepascal.org/index.php/topic,62198.msg470222 .html#msg470222 They told that there is a possibility to use extended precision. But this is not a standard, although that doesn't mind that you cannot use it. ---------------------------------------------------------------------- nanobit · 2025-02-09 15:35 The term "deprecated" (for x87) was officially written in context of MSVC, and has a longer history: MSVC was already without float80 (except in x87 asm) on win32. For MSVC users, x87 float80 asm has been rare since win32, thus Microsoft can simply say: The x87 support in MSVC, just needed for float80 in asm (not cross- platform), is overly expensive, and unrequired in the longer term. For all compilers, SSE (float32, float64) is preferred, so float80 needs a separate implementation (x87 FPU or different). The general plan is that compilers implement float80, float128 to be cross-platform. With FPC,  this currently means (untested by me): softfpu.pp for basic arithmetic (overloaded operators in ufloatx80), and external library for other math functions. ---------------------------------------------------------------------- BrunoK · 2025-02-09 18:11 Quote from: DragoRosso on February 09, 2025, 02:27:04 pmLook this:   https://forum.lazarus.freepascal.org/index.php/topic,62198.msg470222 .html#msg470222 They told that there is a possibility to use extended precision. But this is not a standard, although that doesn't mind that you cannot use it. The link is https://forum.lazarus.freepascal.org/index.php/topic,62198.0.html? If you need 80 bit extended on X86-64, throw out Microsoft windows and go Linux ! You'll also get functional multiplication with Currency type, quite a bonus. ---------------------------------------------------------------------- nanobit · 2025-02-09 18:27 Quote from: BrunoK on February 09, 2025, 07:11:29 pmIf you need 80 bit extended on X86-64, throw out Microsoft windows and go Linux ! Hmm? https://gs.statcounter.com/os-market-share/desktop/worldwide ---------------------------------------------------------------------- dsiders · 2025-02-09 18:46 Quote from: nanobit on February 09, 2025, 07:27:44 pmQuote from: BrunoK on February 09, 2025, 07:11:29 pmIf you need 80 bit extended on X86-64, throw out Microsoft windows and go Linux ! Hmm? https://gs.statcounter.com/os-market-share/desktop/worldwide That's a bogus number.  When they force you to have a Windows license for every PC sold, even if it is not used, the numbers do not represent actual usage. ---------------------------------------------------------------------- LV · 2025-02-09 19:32 Quote from: photor on May 29, 2014, 05:19:43 pmThen how to achieve high precision floating point operation on win64 platform? Use https://www.mpfr.org/ MPFR allows you to specify arbitrary precision (e.g. 128 bits). ---------------------------------------------------------------------- Martin_fr · 2025-02-09 19:42 Afaik / IIRC something like Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses ufloatx80, sfpux80;type  TSoftExtended = floatx80;  May or may not require fpc fixes or trunk... Not sure. ---------------------------------------------------------------------- dseligo · 2025-02-09 20:05 Quote from: dsiders on February 09, 2025, 07:46:29 pmWhen they force you to have a Windows license for every PC sold Who forces you? ---------------------------------------------------------------------- dsiders · 2025-02-09 20:39 Quote from: dseligo on February 09, 2025, 09:05:43 pmQuote from: dsiders on February 09, 2025, 07:46:29 pmWhen they force you to have a Windows license for every PC sold Who forces you? Go buy a laptop. ---------------------------------------------------------------------- dseligo · 2025-02-09 21:09 Quote from: dsiders on February 09, 2025, 09:39:39 pmQuote from: dseligo on February 09, 2025, 09:05:43 pmQuote from: dsiders on February 09, 2025, 07:46:29 pmWhen they force you to have a Windows license for every PC sold Who forces you? Go buy a laptop. In your place you can't buy laptop if there is no MS Windows on it? https://www.links.hr/hr/laptop-hp-pavilion-15-eh3025nm-9j528ea- ryzen-7-7730u-16gb-512gb-ssd-amd-radeon-graphics-156-fhd-ips-bez-os- srebrni-0101011807 "bez OS" means "no OS". https://www.mikronis.hr/Proizvod/dell- vostro-3530-n1227-15-6-fullhd-120hz-intel-core-i5-1334u-16gb-512gb- ssd-ubuntu-intel-iris-xe-graphics/46630 This one has Linux. There are bunch of them without Windows. Sometimes I have to buy Windows separately if store doesn't have model I want with Windows. ---------------------------------------------------------------------- Martin_fr · 2025-02-09 22:07 Quote from: dsiders on February 09, 2025, 09:39:39 pmGo buy a laptop. I did. Several times in the past 1 to 2 decades => always without OS. Yes well, you can opt out from Windows easy enough, but choice gets limited if you want Linux pre installed. Anyway, installing Linux never had been an issue. (runs out of the box) ---------------------------------------------------------------------- dsiders · 2025-02-10 01:11 Quote from: Martin_fr on February 09, 2025, 11:07:45 pmQuote from: dsiders on February 09, 2025, 09:39:39 pmGo buy a laptop. I did. Several times in the past 1 to 2 decades => always without OS. Yes well, you can opt out from Windows easy enough, but choice gets limited if you want Linux pre installed. Anyway, installing Linux never had been an issue. (runs out of the box) You choosing to not use Windows does not mean that HP (or Dell or Lenovo) hasn't already recorded that as a Windows license sale. Thus the skewed numbers... and the power of monopoly. ---------------------------------------------------------------------- tetrastes · 2025-02-10 07:55 Quote from: dsiders on February 10, 2025, 02:11:32 amYou choosing to not use Windows does not mean that HP (or Dell or Lenovo) hasn't already recorded that as a Windows license sale. Thus the skewed numbers... and the power of monopoly. You want to say that you may install windows on these without buying a license? ---------------------------------------------------------------------- DragoRosso · 2025-02-10 08:12 We are a bit OT, but I still believe that the distribution of laptops with Linux included will never become a widespread standard, following the known problems of Linux with new hardware. Manufacturers do not invest much in Linux drivers and therefore a Linux distribution on new laptops will always be difficult to find. Manufacturers are investing more in Windows ARM than in anything else (this is my feeling, I have no numbers to propose). ---------------------------------------------------------------------- H₂SO₄ · 2025-02-10 08:27 Quote from: tetrastes on February 10, 2025, 08:55:23 amYou want to say that you may install windows on these without buying a license? @dsiders  said that from the perspective of manufacturers selling laptops with Windows pre-installed, each sale implies that Windows just increased its userbase - regardless of whether the buyer actually uses the pre-installed OS. Even if you immediately install Linux, you still artificially inflated Windows' market share, strengthening Microsoft's monopoly on desktop operating systems (at least on paper, which can still influence developers - after all, why wouldn't you choose the OS running on 73% of all desktops as your target?) ---------------------------------------------------------------------- 440bx · 2025-02-10 08:52 Quote from: Khrys on February 10, 2025, 09:27:26 amafter all, why wouldn't you choose the OS running on 73% of all desktops as your target?) I doubt that the relatively few machines that are sold as a Windows machine having it removed to install Linux makes much of a difference in the percentage. Linux/unix is significant in the server market, in the desktop market it's little more than a "curiousity". ---------------------------------------------------------------------- tetrastes · 2025-02-10 09:20 Quote from: Khrys on February 10, 2025, 09:27:26 amQuote from: tetrastes on February 10, 2025, 08:55:23 amYou want to say that you may install windows on these without buying a license? @dsiders  said that from the perspective of manufacturers selling laptops with Windows pre-installed, each sale implies that Windows just increased its userbase - regardless of whether the buyer actually uses the pre-installed OS. The talk was about laptops without preinstalled OS: Quote from: dsiders on February 10, 2025, 02:11:32 amQuote from: Martin_fr on February 09, 2025, 11:07:45 pmQuote from: dsiders on February 09, 2025, 09:39:39 pmGo buy a laptop. I did. Several times in the past 1 to 2 decades => always without OS. Yes well, you can opt out from Windows easy enough, but choice gets limited if you want Linux pre installed. Anyway, installing Linux never had been an issue. (runs out of the box) You choosing to not use Windows does not mean that HP (or Dell or Lenovo) hasn't already recorded that as a Windows license sale. Thus the skewed numbers... and the power of monopoly. ---------------------------------------------------------------------- photor · 2025-02-11 15:22 Quote from: ccrause on February 09, 2025, 09:03:48 amTo answer the subject question: https://forum.lazarus.freepascal.org/index.php?action=post;quote=38854 4;topic=52648.0;last_msg=388569 https://learn.microsoft.com/en-us/windows/win32/dxtecharts/sixty-four- bit-programming-for-game-developers#porting-applications-to-64-bit- platforms Quote from: photor on May 29, 2014, 05:19:43 pmThen how to achieve high precision floating point operation on win64 platform? Can you be more specific? Do you need 32/64/80/128/arbitrary bit precision? I just need something more precise than 64bit and not too much slower than 64bit. ---------------------------------------------------------------------- photor · 2025-02-11 15:28 Quote from: LV on February 09, 2025, 08:32:10 pmQuote from: photor on May 29, 2014, 05:19:43 pmThen how to achieve high precision floating point operation on win64 platform? Use https://www.mpfr.org/ MPFR allows you to specify arbitrary precision (e.g. 128 bits). No, it is supposed to be much, much slower than Extended, because it is not based on hardware support. ---------------------------------------------------------------------- tetrastes · 2025-02-11 20:14 https://forum.lazarus.freepascal.org/index.php/topic,43878.msg307985.h tml#msg307985