Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Delta: We're Amtrak with wings. -- David Letterman


devel / comp.lang.python / Re: on floating-point numbers

SubjectAuthor
o Re: on floating-point numbersGrant Edwards

1
Re: on floating-point numbers

<mailman.708.1631464818.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15133&group=comp.lang.python#15133

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: grant.b....@gmail.com (Grant Edwards)
Newsgroups: comp.lang.python
Subject: Re: on floating-point numbers
Date: Sat, 11 Sep 2021 17:01:15 -0000 (UTC)
Lines: 22
Message-ID: <mailman.708.1631464818.4164.python-list@python.org>
References: <YTVCefNu9aDgq0g2@hjp.at>
<479224BA-0EFA-4DC3-893B-EBF1ED4C3CD1@damon-family.org>
<YTzF4YM0ApZtu7P8@hjp.at>
<CAPTjJmruBj+z6xW3vmebsfLp1W_ir1W9P+2cntkSAYUNs0OFeQ@mail.gmail.com>
<shincr$gnb$1@ciao.gmane.io>
X-Trace: news.uni-berlin.de ZTtgyLhwTHAwPUDq5IqptQ1Ps2cvfzLz16qU8MZXJT8Q==
Return-Path: <python-python-list@m.gmane-mx.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.006
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'angelico': 0.09; 'message-
id:@ciao.gmane.io': 0.09; 'received:ciao.gmane.io': 0.09;
'received:gmane.io': 0.09; 'received:list': 0.09; 'smaller': 0.09;
'subject:numbers': 0.09; 'tasks,': 0.09; 'memory': 0.15; 'be,':
0.16; 'from:addr:grant.b.edwards': 0.16; 'from:name:grant
edwards': 0.16; 'received:116.202': 0.16; 'received:116.202.254':
0.16; 'received:116.202.254.214': 0.16; 'tasks.': 0.16; 'wider':
0.16; 'wrote:': 0.16; 'python': 0.16; 'grant': 0.17; 'probably':
0.17; "aren't": 0.19; 'to:addr:python-list': 0.20; 'code': 0.23;
'suspect': 0.26; 'chris': 0.28; 'expect': 0.28; 'fact': 0.28;
'header:User-Agent:1': 0.30; 'takes': 0.31; 'format,': 0.32;
'half': 0.32; 'there': 0.33; 'from:addr:gmail.com': 0.35;
'people': 0.36; 'necessarily': 0.37; 'using': 0.37; 'way': 0.38;
'use': 0.39; "there's": 0.61; 'internal': 0.63; 'once': 0.63;
'received:116': 0.64; 'benefit': 0.65; 'accept': 0.67;
'performance': 0.71; 'little': 0.73; 'reliable': 0.74; 'spent':
0.81; 'subject:point': 0.91; 'soft': 0.93
X-Injected-Via-Gmane: http://gmane.org/
User-Agent: slrn/1.0.3 (Linux)
X-Mailman-Approved-At: Sun, 12 Sep 2021 12:40:17 -0400
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <shincr$gnb$1@ciao.gmane.io>
X-Mailman-Original-References: <YTVCefNu9aDgq0g2@hjp.at>
<479224BA-0EFA-4DC3-893B-EBF1ED4C3CD1@damon-family.org>
<YTzF4YM0ApZtu7P8@hjp.at>
<CAPTjJmruBj+z6xW3vmebsfLp1W_ir1W9P+2cntkSAYUNs0OFeQ@mail.gmail.com>
 by: Grant Edwards - Sat, 11 Sep 2021 17:01 UTC

On 2021-09-11, Chris Angelico <rosuav@gmail.com> wrote:

> Once you accept that "perfectly representable numbers" aren't
> necessarily the ones you expect them to be, 64-bit floats become
> adequate for a huge number of tasks. Even 32-bit floats are pretty
> reliable for most tasks, although I suspect that there's little reason
> to use them now - would be curious to see if there's any performance
> benefit from restricting to the smaller format, given that most FPUs
> probably have 80-bit or wider internal registers.

Not all CPUs have FPUs. Most of my development time is spent writing
code for processors without FPUs. A soft implementation of 32-bit FP
on a 32-bit processors is way, way faster than for 64-bit FP. Not to
mention the fact that 32-bit FP data takes up half the memory of
64-bit.

There are probably not many people using Python on 32-bit CPUs w/o FP.

--
Grant

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor