Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++ Subject: Re: How to get mantissa of long double? Date: Tue, 05 Oct 2021 09:04:21 -0700 Organization: None to speak of Lines: 34 Message-ID: <87r1cz8nlm.fsf@nosuchdomain.example.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="96fd2c4aa8876f2cf843b5bf82d8783f"; logging-data="19773"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18M5YGloRoYZrt45qFZvuY9" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:LRh1aOyusnS57XkGMlHoyjYhDgs= sha1:+Apyx3Vk+u5lRV/G/wT557xmR2s= Xref: csiph.com comp.lang.c++:81862 David Brown writes: > On 05/10/2021 07:12, Bonita Montero wrote: >> Am 04.10.2021 um 20:04 schrieb David Brown: >> >>> MSVC for ARM has 64-bit "long doubles" even on 64-bit ARM, other 64-bit >>> ARM targets have 128-bit (I don't know off-hand if they are IEEE quad >>> precision).  For RISC-V, even 32-bit targets have 128-bit "long double". >> >> There isn't any ARM-implementation with 128 bit FP. > > And you know that because ... what? Because you are confusing hardware > floating point with floating point in general? $ uname -m aarch64 $ cat c.c #include #include #include int main(void) { printf("sizeof (long double) = %zu (%zu bits), LDBL_DIG = %d\n", sizeof (long double), CHAR_BIT * sizeof (long double), LDBL_DIG); } $ gcc c.c -o c && ./c sizeof (long double) = 16 (128 bits), LDBL_DIG = 33 $ -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips void Void(void) { Void(); } /* The recursive call of the void */