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 14168 invoked from network); 24 Mar 2021 21:55:12 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 24 Mar 2021 21:55:12 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1616622912; b=E75Cw+ZBd04Boxy2AUlKDReWXaSqKQ/J5Z4yljNc2fzeDnl1csKnVdlrzaJtIL+ninXaQSomkC e1q6aKEF2xiKvDeoCpuEwjrdnXl4JRHOeT3FnigM9GNRwzm3/sEOgQQzmj+aJ4VWhcMPTnz4JT ifa1Q1I+kOmOu0lpMgwxklbyIgz2Rqi6NHwrZVX8BLEEX07iL7wheZJsmvS+kX2D+t/kakGtq7 iB1P3s6QNTuht/0NG5p47S0hkOeivAAMCPMxLXrQkXKcjuppqmrRGF0Aet18RHL9a1wkFOiMLh 3RrvQNDIzEn+RQh1IGFco7uLeEWOUTmXc0mMjxt4hbb/6w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-io1-f51.google.com) smtp.remote-ip=209.85.166.51; 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=1616622912; bh=okuIhYVP9iCZ9NkXg3ga3P5GScaY6lQJPqAzxByNIQk=; 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=VPkn4qkbkxQfGPtVFefByqGNO+ll/F+zbTnr9oVR2La9/I2G+ljUh274F/4eoYD3uSdMm7JBj9 krqEwAgf6xBHvRQMIlyOwayP8EaDAY1y2FoAyzseleflpx1QrIQ6EruqHpNI8NSfzaRYc3I/JU HsqcA5w6IvDYYwtpbAO0V9xUG8Zg9j7Fdq7u/JEST1bycCNODtZcGZxFvTpK/CBRPkU6ZxQ+O1 DBkNjV84n/4+tJDZmCd8Ii/WvfZP0fnlc+4sONEcQfQo7QQff7D0F0EiIryHXp82Daco1xHNU1 gtL35Gr1l7CUvXBqeqZkZ1FmbdY+PzAL6zURe2xcVbSjzw==; 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=J4of7sJevw9grNIL9lVYCE0UXfEwF03OBW8Tt3bN7js=; b=QJI++Z0dGsh4yxPgqxkFwPavL/ HvVi0J3OvW7I8EMBYXbJjeeDyodKWVKeN1rWTsvP0W6PQ/+/W81GWR4iuTcGR6g3bLbwaQ7nJ97ZH uEXu1x0dc+WosalyRPHLgfRCS3j3n+w3+u556tFbA7bTt9z3LnTjrXEJQbsj7red0EJSEkqcjS3s4 oZ6Y/fwA58NYhVxiLIXYlAks8g3WZRG79csq2L6w5fdfgo9vhfdba7Z3Y9atG+kv12/BUhz3kABLI NRIsenyhKGnjEE59uW8bx/Q0/62buIwNCtyn+jn5/J10XvlIUcysrjp1OHdSt6dqEFm6GhMa5QY5+ ZkUa3Gcg==; Received: from authenticated user by zero.zsh.org with local id 1lPBT5-0007vi-S5; Wed, 24 Mar 2021 21:55:11 +0000 Authentication-Results: zsh.org; iprev=pass (mail-io1-f51.google.com) smtp.remote-ip=209.85.166.51; 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-f51.google.com ([209.85.166.51]:44557) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lPBSj-0007Xt-3G; Wed, 24 Mar 2021 21:54:50 +0000 Received: by mail-io1-f51.google.com with SMTP id v26so23146520iox.11 for ; Wed, 24 Mar 2021 14:54:49 -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=J4of7sJevw9grNIL9lVYCE0UXfEwF03OBW8Tt3bN7js=; b=c9rVrnqVxVNcn/iq8VaFfFZMKYCeYd65d7fMU860SLxNzc3upAv2rFoo+jR4RL6zzd f75RFMwJ8UxGGNPLtbhZCnTQJxtsuz9uCfxm6A9MKzEsgC1W4cWEACBoYsWzKvrsoYwK zxZeSXUA5lMxnrH/SXaMwR8sp2y49gIcwEamNHp4XThx8W919OTIcdcbGuC1B38fB2yy JJ5B4k4bLqf6fYbOQPoT2p1uh6iX78yapshvvMEIWS/FiLCncVCDWWUNLw4hkiFxa4Bp dbVPvRnRV6/oi2gX3UjkXreaXpoITs+/GEXWmlHxqsdE1cUw84A8G9p0BY+NIStUQLsE 9gkA== 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=J4of7sJevw9grNIL9lVYCE0UXfEwF03OBW8Tt3bN7js=; b=SSm3K0lrVbNw4y4Pqm9hUX9iAi7XATm4pWaUwSfHDuJFo42InQM20bpN/Xw3R3rlYv 9JdeD0knjI2UCmRfEsiOrqiqhAJp8MIlVUdpjqIu6PH/i/zQnYv6mtY5CWlfRRXiiNhi RdPGAnxImGltGK4XSQU7y0phoiZwhfLNnAlxQ+pk953/UKt+c6qqg1IOEjO7LrbOq7ss gnkuYvOXwLi9oWl31JuIVdIJtL+yyhje5xsXlFOPl4gBzPdO6Iyg1gQRxZP1FONbBhsD 0t8AIkqGhhhdVr5F1vS1z9WWaP7oSm0YFsuWVGpAKM6ECQ6R//zCdPO5S0n7eRfGCh9q Bzpw== X-Gm-Message-State: AOAM531S+kCwyQV5HJYrji7a7YJISKyYX8iTTfZKTD38geWvcOweZ0b1 M3l2tvNqs1axvIJ4C+LOms7cNrmP/3hMfNsBBPo= X-Google-Smtp-Source: ABdhPJwT8VACJoTvoQwAHF0SRth5HNAK8uHEALFue0AftfT+YUEUeyco3LLdk/UQz3LDvyKItiVjov9jmkMJ2LF1cME= X-Received: by 2002:a5d:9eca:: with SMTP id a10mr4032425ioe.142.1616622887877; Wed, 24 Mar 2021 14:54:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Wed, 24 Mar 2021 22:54:36 +0100 Message-ID: Subject: Re: forcing float arithmetic. To: Ray Andrews Cc: Zsh Users Content-Type: multipart/alternative; boundary="000000000000f7be7605be4f5815" X-Seq: 26593 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: --000000000000f7be7605be4f5815 Content-Type: text/plain; charset="UTF-8" On Wed, Mar 24, 2021 at 10:51 PM Ray Andrews wrote: > On 2021-03-24 10:56 a.m., Bart Schaefer wrote: > > On Wed, Mar 24, 2021 at 10:20 AM Ray Andrews > wrote: > >> Why are answers dumbed down like that? > > Every subexpression is considered independently, so float conversion > > doesn't take place until the assignment is evaluated. The type of the > > lvalue does not propagate across every rvalue. > > > So it's procedural rather than deliberate/designed. It's not hard to > cope with > still I'd vote to correct it -- one of those things where a look ahead > could > sorta say that if the lvalue is float, then all subsequent arithmetic > will be > float. Or not worth the trouble, it's easy enough to work around. > The behavior of zsh in this regard is consistent with C and all languages inspired by it (C++, Java, C# and many, many others). This is really working as intended. Roman. --000000000000f7be7605be4f5815 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Mar 24, 2021 at 10:51 PM Ray Andr= ews <rayandrews@eastlink.ca> wrote:
On 2021-03-24 10:56 a.m., Bart Schaefer wrote:
> On Wed, Mar 24, 2021 at 10:20 AM Ray Andrews <
rayandrews@eastlink.ca> wrote= :
>> Why are answers dumbed down like that?
> Every subexpression is considered independently, so float conversion > doesn't take place until the assignment is evaluated.=C2=A0 The ty= pe of the
> lvalue does not propagate across every rvalue.
>
So it's procedural rather than deliberate/designed.=C2=A0 It's not = hard to
cope with
still I'd vote to correct it -- one of those things where a look ahead =
could
sorta say that if the lvalue is float, then all subsequent arithmetic
will be
float.=C2=A0 Or not worth the trouble, it's easy enough to work around.=

The behavior of zsh in this regard is = consistent with C and all languages inspired by it (C++, Java, C# and many,= many others). This is really working as intended.

Roman.=C2=A0
--000000000000f7be7605be4f5815--