From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4859 invoked from network); 26 Mar 2021 10:36:18 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 26 Mar 2021 10:36:18 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1616754978; b=m3ZizneBNiPxtjz57Z75fxM30N5fH2uqjPNPoS5JDe9lb7VAX+kh5IG7LajscwkgTJHX/2L1Kb 54HrTT9KztfabpbeqJoJWukLB814+otki1S2lKaGjmJd1EWup/igveRTJnc9pWQtygEnOBNlj4 Z8mmSLEiDYQxgO+2GVbceQUnKiA9sdUvhcrn07YYe+7uBFO4V0CFSktEcOzs4sRcZ6jFDQUH30 8nGWC2ATPpUELMqpWjtIfXrIcmMe3jH2C8EFP6VENgOduCFMaY0iPK5sI0PxlQiF6cc1EwTLxz keaLzmJWa1d8SCmt/NrE6ODwaPSP3zs9mQrIT7Huw88yxg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-io1-f44.google.com) smtp.remote-ip=209.85.166.44; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1616754978; bh=Ns1mdN3UZp7wR21qh9F2xgVZ/x5lcFOOquxXYXho4DE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=dlyZK04eqj6fmKwhwH+JRGgVuFiNVaSt01g1M3D7F1qKWnlwOYrJXrp+ZQvFc8lPoK7XIMpNRw zK2ARxKth3VHLwdQJi33YCIeddZGEpWRhUQK+R0dSOXp0+kRXaGdmFuxQvjyXPOHjGJ7IZXqOV YqmRFj9BMKwGr4MrwPBzQZk9ZqZsLFsLybd5W4e9jBuJn7VXDpS7O/q2bNuB9bYtK4hjayOxrp WXBOWGiNvEqzEcJbzic3vouLzG2EjWptEU2fQAlsYAU+4NUga1pe2wCMmj+UJ8dKg9WAmDdcya MPxl82LTY1ierkgblqWA3S3ueizvhnKj07NJCq4miXuSOg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Ns1mdN3UZp7wR21qh9F2xgVZ/x5lcFOOquxXYXho4DE=; b=r367wwYWpHUlpidMhCl5eZCQNW ZvUhdUKjmFV2a4+F9Rq7TdDfA/5jT4CaOb5j0Eyzw9ri8Xm9ZW95ZdooLQdfrPqJev5nZ04JI6lZm 0MRRDHOIgcTi9jmYdQvicwrX9TItSVkulM+nZoZc6YS6VbwubivBrcNH/sD+0tSdPQYTaJF+Z/c8e UueHZDvfuU3LnlA1zeSkWmAtCY9XI8PtK8aNaw6NfsBhe1F4HV2QSI+rDu1k3TFByYPH/W/PsnlIW Fst3LvKkWP42m46OU3dn2v9LS4G+o2tRzyJN2mhPOmANzVhKYgRthxQyFnn/DMIHhPTKGFSX0LvIH PohOleuQ==; Received: from authenticated user by zero.zsh.org with local id 1lPjpA-000BnO-Cg; Fri, 26 Mar 2021 10:36:16 +0000 Authentication-Results: zsh.org; iprev=pass (mail-io1-f44.google.com) smtp.remote-ip=209.85.166.44; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-io1-f44.google.com ([209.85.166.44]:35769) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lPjoT-000BQO-Cy; Fri, 26 Mar 2021 10:35:35 +0000 Received: by mail-io1-f44.google.com with SMTP id x17so4899829iog.2 for ; Fri, 26 Mar 2021 03:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ns1mdN3UZp7wR21qh9F2xgVZ/x5lcFOOquxXYXho4DE=; b=UDx7kcdnRa1k8LfqiLsa0ggEhPJczaSWeBaEVMBAJSZki6cz0P0IzQX/Gxz7RlCbMx JQyg68j2ehWfLz1JFF+pfo9qMhUAfjpXkXgk5g+QtZQSjk4/IeGpjdhOQzGA29U56K0T gptZhpiXoxFeAZC/s7M3oJ2FNd7vApNstTK7QxcEKBas82nCLrVT3c+YZnHPky+XchP5 Vat8iDLWMSBjyA9nGUC1LLOEKAKKuJ0iE7N7x12PcrYv4DthUvQV7LNwwxQiqbLqNBEZ cTzW/EZ6MuNCUz274oWU3mTtCz/QEp1XGebY/35uoeaxsUbH8436iBxD+q3pHGwq3TuR CAHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ns1mdN3UZp7wR21qh9F2xgVZ/x5lcFOOquxXYXho4DE=; b=YJEtYxwD8gGqnv5amfxqlgyJaqU9+U0cNaSAR6ha21v4FSrv5xV14It4uFRf7SVaNM eeESq4zAvQCoXSPaXEIt58juAFPPPzXyWQYVZpkElSVP0TdowBfucea9SnnuT4yviVFp B8OBu9tpBBedfuqN64745QudmqDG0Nn1lFXL9zy1xl0REfmYbuk5dW7ioUonXEVVD1a2 kFbYfnwsm+G6RnnI5SCg8fKyAEIkcV6Fj0l2a3L4Brpf7eV5LnMeRU6a0ORJ+JJgc3B2 Mtmg88zTaS7sy4LdK55y+MYzz+lgQUKXLpG7xYsL+Uaeb653zw7Czv+kdxRm78jetPlm me+Q== X-Gm-Message-State: AOAM533grsKU2Aytxhtj67LQd+kTJ8AYAto8B79EvoNRp0Fv5YldwM0d R1gf8Y9UhqThY6o0KGU/+J3eBsNGRSx5cKg9/XM= X-Google-Smtp-Source: ABdhPJwGKAa0HJ2vjjy6d6goUcMAJrFW2WozyCa7Zhz0GTgqjO6d7XRJUs6MP53TzM6nUvpX4HlhcJoNuugvAy6GTNw= X-Received: by 2002:a6b:b2cd:: with SMTP id b196mr9922295iof.67.1616754932246; Fri, 26 Mar 2021 03:35:32 -0700 (PDT) MIME-Version: 1.0 References: <0227b30d-4f09-2c8b-1248-557859d875ce@eastlink.ca> <91303-1616717760.288585@Iyj2.F9RA.VD0P> In-Reply-To: From: Roman Perepelitsa Date: Fri, 26 Mar 2021 11:35:21 +0100 Message-ID: Subject: Re: arithmetic anomaly To: Ray Andrews Cc: Zsh Users Content-Type: multipart/alternative; boundary="0000000000006ceabb05be6e1707" X-Seq: 26608 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: --0000000000006ceabb05be6e1707 Content-Type: text/plain; charset="UTF-8" On Fri, Mar 26, 2021 at 1:38 AM Ray Andrews wrote: > On 2021-03-25 5:16 p.m., Oliver Kiddle wrote: > > but floats are what we have. > But why do we let them spew out garbage? > Maybe this will help: https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html Understanding how floating point numbers work is very useful. It's virtually mandatory when writing numerical computation code. None of this is specific to zsh. Roman. --0000000000006ceabb05be6e1707 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Mar 26, 2021 at 1:38 AM Ray Andre= ws <rayandrews@eastlink.ca= > wrote:
On 2021-03-25 5:16 p.m., Oliver Kiddle wrote:
>= ; but floats are what we have.
But why do we let them spew out garbage?

Maybe this will help:=C2=A0https://docs.oracle.com/cd/E19957-01/806-3568= /ncg_goldberg.html

Understanding how floating = point numbers work is very useful. It's virtually mandatory when writin= g numerical computation code. None of this is specific to zsh.
Roman.=C2=A0
--0000000000006ceabb05be6e1707--