Re: Floating point: sine, cosine etc.

From: Rhialto <rhialto_at_falu.nl>
Date: Sat, 15 Oct 2022 22:54:04 +0200
Message-ID: <Y0sd7L07bsr1CBYI_at_falu.nl>
On Thu 13 Oct 2022 at 04:59:58 +0200, Jesus Cea wrote:
> On 24/9/22 15:10, Rhialto wrote:
> > The algorithm I had before required 64-bit floats (long
> > double) and somebody complained that those are (strangely!) not
> > supported by the Apple M1 compilers.
> 
> Uhm?. In current computers, in C language using IEEE-754, float is 32 bits
> and double is 64 bits. Long double is not standard AFAIK, but it is usually
> 80 bits in x86 CPUs.
> 
> https://en.wikipedia.org/wiki/Long_double
> 
> Maybe you mean 64 bit mantissa?

Yes, indeed, that is what I meant. For the case that I needed, 56 bits
would even be enough but a double doesn't provide that many.

PDP-11 has doubles that are 64 bits, but the number of bits for the
exponent is only 7 (not 10 like with IEEE-754) and with 1 sign bit, that
leaves 56 bits for the mantissa.

-Olaf.
-- 
___ "Buying carbon credits is a bit like a serial killer paying someone else to
\X/  have kids to make his activity cost neutral." -The BOFH    falu.nl_at_rhialto


Received on 2022-10-15 23:00:04

Archive generated by hypermail 2.3.0.