Math.MinExtended value

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Math.MinExtended value

Bart-48
Hi,

I was playing a bit with floating point types when I noticed this discrepancy:

From math.pp

{$ifdef FPC_HAS_TYPE_EXTENDED}
    const
      MinExtended  =  3.4e-4932;
      MaxExtended  =  1.1e+4932;
{$endif FPC_HAS_TYPE_EXTENDED}

From fpc reference guide:
Extended 1.9E-4932 .. 1.1E4932

3.64519953188247460253E-4951 seems to be the lowest value I can get
while testing (Win 32 bit).

What's up with that?

Bart
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Math.MinExtended value

vojtech.cihak

Hi, it seems you are right: https://en.wikipedia.org/wiki/Extended_precision#Working_range

 

V.

______________________________________________________________
> Od: Bart <[hidden email]>
> Komu: FPC-Pascal users discussions <[hidden email]>
> Datum: 14.12.2017 23:51
> Předmět: [fpc-pascal] Math.MinExtended value
>

Hi,

I was playing a bit with floating point types when I noticed this discrepancy:

From math.pp

{$ifdef FPC_HAS_TYPE_EXTENDED}
   const
     MinExtended  =  3.4e-4932;
     MaxExtended  =  1.1e+4932;
{$endif FPC_HAS_TYPE_EXTENDED}

From fpc reference guide:
Extended 1.9E-4932 .. 1.1E4932

3.64519953188247460253E-4951 seems to be the lowest value I can get
while testing (Win 32 bit).

What's up with that?

Bart
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Math.MinExtended value

Bart-48
On Fri, Dec 15, 2017 at 1:45 AM, Vojtěch Čihák <[hidden email]> wrote:

> Hi, it seems you are right:
> https://en.wikipedia.org/wiki/Extended_precision#Working_range


From syshelph.inc:

  TExtendedHelper = Type Helper for Extended
  ...
    Epsilon           : Extended = 3.64519953188247460253e-4951;

This would be the equivalent of Math.MinExtended I guess.

Bart
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal