GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
Diese Seite auf deutsch

Mail #12985

Back to main page of archive

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  

From: Mirsad Todorovac
Subject: Math functions and Floating point types
Date: 29 Nov 2005, 14:10:26



On Tue, 29 Nov 2005 lanceboyle@bluebottle.com wrote:

> Now, I'm saying this:
>
> But isn't there potentially a difference between the longest 
> _natively_supported_ float per hardware, and the longest float, which might 
> be partially software-implemented? For speed, it would still seem like a good 
> idea to have a type which defaults to the longest natively supported length.
>
> Sorry if this is beating the subject to death.

I think going to manual brings us to the fact (LongestReal:: in index):

      type
        LongestReal = LongReal;  { might get bigger than LongReal someday }

while on the Real Types page we read:

|   Note that not all machines support longer floating point types, so
| `LongReal' is the same as `Real' on these machines. Also, some machines
| may support a longer type, but not do all arithmetic operations (e.g.
| the `Sin' function, *Note Sin::) in a precision higher than that of
| `Real'. If you need higher precision, you can look at the `GMP' unit
| (*note GMP::) which provides rational and real numbers with arbitrary
| precision, but their usage is different from normal real types.
|
|   The following real types are guaranteed to be compatible to the real
| types of GNU C. The sizes given, however, are _not_ guaranteed.  They
| are just typical values used on any IEEE compatible floating point
| hardware, but they may be different on some machines.
|
| type name    alternative name    GNU C equivalent    size in bits 
| (typically)
| ShortReal    Single              float               32
| Real         Double              double              64
| LongReal     Extended            long double         80

So, essentially this means that GPC will support hardware supported types 
with GPC native types, while for software extended precision GMP (or 
other) library is required.

My $0.02

Regards,
Mirsad

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  


In reply to

Author Subject Date
lanceboyle@bluebottle.com Math functions and Floating point types 28 Nov 2005, 20:14:47
Frank Heckenbach Math functions and Floating point types 29 Nov 2005, 04:27:13
Adriaan van Os Math functions and Floating point types 29 Nov 2005, 08:49:17
lanceboyle@bluebottle.com Math functions and Floating point types 29 Nov 2005, 01:12:56
Frank Heckenbach Math functions and Floating point types 29 Nov 2005, 10:29:15
lanceboyle@bluebottle.com Math functions and Floating point types 29 Nov 2005, 02:55:47

Back to main page of archive


Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.

Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.


This page was created by Crystal 0.999 (Linux 2.4.27/i686).