Re: What value can cause this error?

Liste des GroupesRevenir à cl tcl 
Sujet : Re: What value can cause this error?
De : rich (at) *nospam* example.invalid (Rich)
Groupes : comp.lang.tcl
Date : 17. Sep 2024, 22:49:46
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vccthq$3n4sm$1@dont-email.me>
References : 1
User-Agent : tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
alexandru <alexandru.dadalau@meshparts.de> wrote:
I got this error message from a customer and no further information is
available.
What could have caused this error?
 
integer value too large to represent
   while executing
"expr {round($val*(10.0**($decimals+3)))/(10.0**$decimals)}"
 
I know that "val" is a proper number and that "decimals" is 6.
 
I tried to run this expression with very high "val" values and could not
reproduce the error.

Are you *absolutely* sure that decimals is 6, because I can generate
the error via a smallish change to decimals:

    $ rlwrap tclsh
    % set val 123
    123
    % set decimals 999
    999
    % expr {round($val*(10.0**($decimals+3)))/(10.0**$decimals)}
    integer value too large to represent
    % set tcl_patchLevel
    8.6.12

Date Sujet#  Auteur
17 Sep 24 * What value can cause this error?7alexandru
17 Sep 24 `* Re: What value can cause this error?6Rich
18 Sep 24  `* Re: What value can cause this error?5alexandru
18 Sep 24   `* Re: What value can cause this error?4Rich
18 Sep 24    `* Re: What value can cause this error?3alexandru
18 Sep 24     `* Re: What value can cause this error?2Christian Gollwitzer
20 Sep 24      `- Re: What value can cause this error?1alexandru

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal