• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: long double data type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: long double data type


  • Subject: Re: long double data type
  • From: Ian Kemmish <email@hidden>
  • Date: Tue, 15 Jun 2010 21:06:10 +0100


On 15 Jun 2010, at 08:26, Luigi Castelli <email@hidden> wrote:


However, I've also been told that internally the floating-point unit of my processor only uses the first 80 bits.

Nobody from Apple seems to have answered yet, so I'll weigh in.

The original 8087 FPU for Intel CPUs promoted doubles from (32 or) 64 bits to 80 bits when loading from memory into registers, and then truncated or rounded them back to 64 bits when storing them back into memory. This meant you could carry intermediate results to 80 bits.

This, of course, was not IEEE compliant, and made a lot of people quite cross.

The original FP instructions are still there (they are the ones that operate on the FP register "stack"), and still do this, but all of the SSE floating point instructions are IEE compliant, and don't promote 32 or 64 bit values when you load them from memory into registers (unless you tell them to).

All FP instructions emitted by Apple's compilers use the IEE compliant SSE instructions, for both vector and scalar calculations.

Last time I checked, no Intel CPUs had hardware support for 128 bit floating point numbers.

So to answer your questions:

1). There are no 80 bit floating point data types.

2) 3) and 4) N/A

5) Software emulation.

If you really do need very long numbers, you may be better off using 128 bit integers (which I reckon give you a dynamic range of 382dB) and synthesising 128 bit instructions using add-with-carry and/or the vector units. There may even be suitable routines in Apple's Accelerate framework.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ian Kemmish 18 Durham Close, Biggleswade, Beds SG18 8HZ
email@hidden Tel: +44 1767 601361 Mob: +44 7952 854387
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: long double data type
  • Next by Date: Re: How to write to the file instead of sending data(music) to the speaker
  • Previous by thread: Re: long double data type
  • Next by thread: Re: long double data type
  • Index(es):
    • Date
    • Thread