Recent

Author Topic: MAXEXTENDED and win64 target  (Read 1733 times)

BOSHU

  • New member
  • *
  • Posts: 8
MAXEXTENDED and win64 target
« on: September 27, 2019, 10:49:30 am »
As I've read here(https://forum.lazarus.freepascal.org/index.php?topic=29678.0), extended type should be an alias to double type when targeting win64.
When I'm trying to build an app crosscompilling from linux64 to win64, I get an error saying "Error: Identifier not found "MAXEXTENDED"". MaxSingle, MaxDouble and MaxExtended are declared within the math unit.
When targeting win64, shouldn't maxextended be an alias for maxdouble(and minextended an alias for mindouble), too?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11453
  • FPC developer.
Re: MAXEXTENDED and win64 target
« Reply #1 on: September 27, 2019, 11:26:25 am »
Delphi seems to define maxextended in win64 mode, so please file a bug noting that fact.

BOSHU

  • New member
  • *
  • Posts: 8
Re: MAXEXTENDED and win64 target
« Reply #2 on: September 27, 2019, 02:19:47 pm »
Delphi seems to define maxextended in win64 mode, so please file a bug noting that fact.
Done.
https://bugs.freepascal.org/view.php?id=36108

BOSHU

  • New member
  • *
  • Posts: 8
Re: MAXEXTENDED and win64 target
« Reply #3 on: October 02, 2019, 10:23:28 am »
Let's assume that a target processor supports single and doesn't support double and extended types.
In this Delphi scenario, would MaxExtended become equal to MaxSingle? Also, would Delphi consider MaxDouble to be equal with MaxSingle?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11453
  • FPC developer.
Re: MAXEXTENDED and win64 target
« Reply #4 on: October 02, 2019, 04:16:21 pm »
In general, avoid extended in the first place.


Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: MAXEXTENDED and win64 target
« Reply #5 on: October 02, 2019, 05:19:51 pm »
In general, avoid extended in the first place.
Why?
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11453
  • FPC developer.
Re: MAXEXTENDED and win64 target
« Reply #6 on: October 02, 2019, 08:39:04 pm »
In general, avoid extended in the first place.
Why?

It's 32-bit x87 only and isn't defined in most ABIs. Moreover there is not much point to it anyway, as it is not a fully compatible IEEE type.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5481
  • Compiler Developer
Re: MAXEXTENDED and win64 target
« Reply #7 on: October 03, 2019, 11:58:31 am »
Let's assume that a target processor supports single and doesn't support double and extended types.
In this Delphi scenario, would MaxExtended become equal to MaxSingle? Also, would Delphi consider MaxDouble to be equal with MaxSingle?
We can't know what Delphi does, because Delphi supports no processors that don't support at least Double. But for what it's worth FPC provides software floating point for such targets, thus both Single and Double are available.

 

TinyPortal © 2005-2018