Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

A woman should have compassion. -- Kirk, "Catspaw", stardate 3018.2


devel / comp.lang.tcl / math error in addition

SubjectAuthor
* math error in additionYahalom Emet
+- Re: math error in additionHarald Oehlmann
+* Re: math error in additionRalf Fassel
|`- Re: math error in additionYahalom Emet
`- Re: math error in additionManuel Collado

1
math error in addition

<5989a218-0fdb-4293-b75b-b352b7d066aan@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:6214:90f:b0:67f:864b:d573 with SMTP id dj15-20020a056214090f00b0067f864bd573mr30795qvb.6.1705560000373;
Wed, 17 Jan 2024 22:40:00 -0800 (PST)
X-Received: by 2002:ac8:525a:0:b0:429:cb05:71e0 with SMTP id
y26-20020ac8525a000000b00429cb0571e0mr41766qtn.6.1705560000165; Wed, 17 Jan
2024 22:40:00 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Wed, 17 Jan 2024 22:39:59 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=145.224.124.61; posting-account=4vRTVAkAAAA565hqr_xV6tOTIITFGVnu
NNTP-Posting-Host: 145.224.124.61
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5989a218-0fdb-4293-b75b-b352b7d066aan@googlegroups.com>
Subject: math error in addition
From: yahal...@gmail.com (Yahalom Emet)
Injection-Date: Thu, 18 Jan 2024 06:40:00 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Yahalom Emet - Thu, 18 Jan 2024 06:39 UTC

What is wrong with the Tcl addition:
% clock format 1698526800
Sun Oct 29 00:00:00 IDT 2023
% expr 1698526800+86400
1698613200
% clock format 1698613200
Sun Oct 29 23:00:00 IST 2023

The addition should be 1698699600

Am I missing something?

Re: math error in addition

<uoanbs$2gthh$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!nntp.comgw.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wortka...@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: math error in addition
Date: Thu, 18 Jan 2024 09:26:37 +0100
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <uoanbs$2gthh$1@dont-email.me>
References: <5989a218-0fdb-4293-b75b-b352b7d066aan@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 18 Jan 2024 08:26:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9105ce590954b46cdee858f1650b1de9";
logging-data="2651697"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18qP6hHm4RtZ29oQOp7jSKQ"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:5ZY4GZTt1AIQQ5PLfeGpryJ2sGc=
Content-Language: en-GB
In-Reply-To: <5989a218-0fdb-4293-b75b-b352b7d066aan@googlegroups.com>
 by: Harald Oehlmann - Thu, 18 Jan 2024 08:26 UTC

Am 18.01.2024 um 07:39 schrieb Yahalom Emet:
> What is wrong with the Tcl addition:
> % clock format 1698526800
> Sun Oct 29 00:00:00 IDT 2023
> % expr 1698526800+86400
> 1698613200
> % clock format 1698613200
> Sun Oct 29 23:00:00 IST 2023
>
> The addition should be 1698699600
>
> Am I missing something?

Quickly looking at your example:

expr 1698526800+86400

1698526800
+ 86400
= 1698526800
+ 400
+ 6000
+ 80000
= 1698527200
+ 6000
+ 80000
= 1698533200
+ 80000
= 1698623200
----------

I come to the same result as expr. Am I missing something?
About clock, it is always good to also specify the time.

Take care,
Harald

Re: math error in addition

<ygajzo6oqv7.fsf@panther.akutech-local.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!rocksolid2!news.neodome.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralf...@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: Re: math error in addition
Date: Thu, 18 Jan 2024 11:52:44 +0100
Lines: 20
Message-ID: <ygajzo6oqv7.fsf@panther.akutech-local.de>
References: <5989a218-0fdb-4293-b75b-b352b7d066aan@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net 5+erzPGI2eu3THFdX94cdQR7/FSsmkglgCNnPSrZHYFgA+Uio=
Cancel-Lock: sha1:7eYMoIcTgj4s4Dbm96ylFO5YvBg= sha1:oUWSry/NLtHz4EQoNYtjzgH/NwQ= sha256:zvHjC7T7bKGdhZZdHoZPGowD2hvWjm/vurUuONVLuPM=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
 by: Ralf Fassel - Thu, 18 Jan 2024 10:52 UTC

* Yahalom Emet <yahalome@gmail.com>
| What is wrong with the Tcl addition:
| % clock format 1698526800
| Sun Oct 29 00:00:00 IDT 2023
| % expr 1698526800+86400
| 1698613200
| % clock format 1698613200
| Sun Oct 29 23:00:00 IST 2023
>
| The addition should be 1698699600
>
| Am I missing something?

To explain why you expect the addition to give a clearly wrong result?
....800 + ...400 can't result in ...600, it needs to result in ...200.

Did you miss the transition from DST no non-DST indicated by the time
zones?

R'

Re: math error in addition

<uob0oj$2if28$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mcollado...@gmail.com (Manuel Collado)
Newsgroups: comp.lang.tcl
Subject: Re: math error in addition
Date: Thu, 18 Jan 2024 12:06:58 +0100
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <uob0oj$2if28$1@dont-email.me>
References: <5989a218-0fdb-4293-b75b-b352b7d066aan@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 18 Jan 2024 11:06:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="095e7acb8ca750cfd27128901e3f3404";
logging-data="2702408"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/lXsAJ6dHxFeQ5yf6ExrKMEmJF5anYzow="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:VDnBNApvCh9Z51ZaMVW0v8ydmsQ=
In-Reply-To: <5989a218-0fdb-4293-b75b-b352b7d066aan@googlegroups.com>
Content-Language: en-US, es-ES
 by: Manuel Collado - Thu, 18 Jan 2024 11:06 UTC

El 18/1/24 a las 7:39, Yahalom Emet escribió:
> What is wrong with the Tcl addition:
> % clock format 1698526800
> Sun Oct 29 00:00:00 IDT 2023
> % expr 1698526800+86400
> 1698613200
> % clock format 1698613200
> Sun Oct 29 23:00:00 IST 2023
>
> The addition should be 1698699600

Nope. It should be 1698613200

>
> Am I missing something?

Ability to manually do numeric addition ? :-)

Re: math error in addition

<b5399132-f571-4fe4-acc2-29377a61f838n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:6214:90f:b0:67f:864b:d573 with SMTP id dj15-20020a056214090f00b0067f864bd573mr82419qvb.6.1705584741812;
Thu, 18 Jan 2024 05:32:21 -0800 (PST)
X-Received: by 2002:a05:622a:1708:b0:429:d347:9a2e with SMTP id
h8-20020a05622a170800b00429d3479a2emr75899qtk.2.1705584741490; Thu, 18 Jan
2024 05:32:21 -0800 (PST)
Path: i2pn2.org!rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Thu, 18 Jan 2024 05:32:21 -0800 (PST)
In-Reply-To: <ygajzo6oqv7.fsf@panther.akutech-local.de>
Injection-Info: google-groups.googlegroups.com; posting-host=145.224.124.61; posting-account=4vRTVAkAAAA565hqr_xV6tOTIITFGVnu
NNTP-Posting-Host: 145.224.124.61
References: <5989a218-0fdb-4293-b75b-b352b7d066aan@googlegroups.com> <ygajzo6oqv7.fsf@panther.akutech-local.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b5399132-f571-4fe4-acc2-29377a61f838n@googlegroups.com>
Subject: Re: math error in addition
From: yahal...@gmail.com (Yahalom Emet)
Injection-Date: Thu, 18 Jan 2024 13:32:21 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Yahalom Emet - Thu, 18 Jan 2024 13:32 UTC

On Thursday 18 January 2024 at 11:52:49 UTC+1, Ralf Fassel wrote:
> * Yahalom Emet <yaha...@gmail.com>
> | What is wrong with the Tcl addition:
> | % clock format 1698526800
> | Sun Oct 29 00:00:00 IDT 2023
> | % expr 1698526800+86400
> | 1698613200
> | % clock format 1698613200
> | Sun Oct 29 23:00:00 IST 2023
> >
> | The addition should be 1698699600
> >
> | Am I missing something?
> To explain why you expect the addition to give a clearly wrong result?
> ...800 + ...400 can't result in ...600, it needs to result in ...200.
>
> Did you miss the transition from DST no non-DST indicated by the time
> zones?
>
> R'
Yes, I missed the IDT IST conversion, great tip and interesting thing to consider when doing simple aritmetic for a day instead of using the proper 'clock' methods.
Thanks

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor