Path: ...!feeds.phibee-telecom.net!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: BGB Newsgroups: comp.arch Subject: Re: Misc: Applications of small floating point formats. Date: Fri, 2 Aug 2024 01:27:29 -0500 Organization: A noiseless patient Spider Lines: 55 Message-ID: References: <61e1f6f5f04ad043966b326d99e38928@www.novabbs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 02 Aug 2024 08:27:34 +0200 (CEST) Injection-Info: dont-email.me; posting-host="5eb2aa78dfaec7a21255f347fde6502e"; logging-data="2823730"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1tYGrG51PgPd/90Ytb2VctixSJ+oW+Bo=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:VB++HIiIYIloJkxGwK6usTpmTRk= In-Reply-To: Content-Language: en-US Bytes: 3021 On 8/2/2024 12:53 AM, Thomas Koenig wrote: > EricP schrieb: > >> With FP128 will there again be a significant difference in speed to >> FP62 or FP32 (including transcendentals)? Seems there would be because not >> every HW implementation is going to implement a full width multiplier. > > The only major architecture I'm aware of that uses FP128, POWER, > chose to use their decimal FP unit do do it on the side. > > This makes multiplication _really_ slow, unfortunately. FWIW: It is sufficiently overkill for most purposes, and sufficiently rarely used, that there isn't a strong reason not to just do Binary128 or similar in software. Except maybe in some special case one actually needs fast 128-bit floating point. For most things though, Binary64 is sufficient (and many use-cases exist where Binary32 is not sufficient, so Binary64 seems mostly necessary for "general use"). At one point, some years back, I had looked into whether to do Binary128 or to do something like the .NET Decimal format. IIRC, .NET's format was something like: Three 32-bit words each holding 9 decimal digits; Another 32-bit word with an exponent. Each 32-bit word representing a value as a linear integer between 000000000 and 999999999. In my evaluation, Binary128 won (both more accurate and faster for general computation). Granted, both seem likely to be faster than a software implementation of Decimal128. .... In my evaluations, I ended up prioritizing 128-bit integers: Cheaper to implement in hardware; Can be used to make 128-bit floating point faster; More often to be useful. Though, the use of 128-bit integers is hindered for portable code, given seemingly none of the major compilers support them "in general". ....