Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2002-09-03
04:50 • Ticket [473262ffff] Patch for math errors (Borland) status still Closed with... artifact: afbed51039 user: hgiese
04:38 • Closed ticket [473262ffff]. artifact: 9c2135a018 user: hobbs
04:22 • Ticket [473262ffff]: 4 changes artifact: 2fd3eb3677 user: hgiese
03:55 • Ticket [473262ffff]: 4 changes artifact: 8fc35d39ae user: hobbs
2002-06-07
17:53 • Ticket [473262ffff]: 1 change artifact: 4e2884df14 user: dkf
2001-10-22
20:08 • Ticket [473262ffff]: 2 changes artifact: b033df07b7 user: dkf
20:07 • Ticket [473262ffff]: 1 change artifact: e7c99fa58b user: dkf
20:03 • Ticket [473262ffff]: 5 changes artifact: 42a169c337 user: dkf
2001-10-20
21:32 • New ticket [473262ffff]. artifact: b80187b066 user: nobody

Patch for math errors (Borland)

Closed / Fixed473262ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 24 years ago
Descriptionplain2001-10-20 21:32:25
Borland (for whatever reasons) limits the input value to the sin function to some 9.0e+16. This 
in itself does not present a big problem but Tcl produces an exception in this case - and this is 
always bad.
I modified tclWinMtherr.c to get rid of the exception. Now the user gets a domain error. Diff file is 
enclosed.

This has no relation to the 64 bit version of Tcl, it was just discovered in this context. It will affect 
any Borland generated version.

Best regards
Helmut
dkfplain2001-10-22 20:03:55
Logged In: YES 
user_id=79902

Patch submitted by Helmut Giese <[email protected]>
dkf Ticket [473262ffff]: 1 change [History diff]2001-10-22 20:07:53
dkf Ticket [473262ffff]: 2 changes [History diff]2001-10-22 20:08:34
dkf Ticket [473262ffff]: 1 change [History diff]2002-06-07 17:53:10
hobbsplain2002-09-03 03:55:14
Logged In: YES 
user_id=72656

there is no patch here ??
hgieseplain2002-09-03 04:22:35
Logged In: YES 
user_id=522169

Hello Jeffrey,
seems like the patch is already done:
The sources in Tcl 8341 say
    if ((xPtr->type == DOMAIN) || (xPtr->type == SING)) {
errno = EDOM;
while those from 84b1 say
    if ((xPtr->type == DOMAIN)
#ifdef __BORLANDC__
    || (xPtr->type == TLOSS)
#endif
    || (xPtr->type == SING)) {
errno = EDOM;

I don't quite remember whether this was my fix or not - but
then, who else should have discovered and fixed it?

I'd suggest to leave it at that.
Best regards
Helmut
hobbs Closed ticket [473262ffff]. [History diff]2002-09-03 04:38:31
hgieseplain2002-09-03 04:50:33
Logged In: YES 
user_id=522169

 this should explain it:
             --------------------
Envelope-to: [email protected]
Delivery-date: Mon, 22 Oct 2001 16:58:22 +0200
From: "Donal K. Fellows" <[email protected]>
To: [email protected]
      [snip]
Helmut Giese <[email protected]>
> *** tclwinmtherr.cSat Oct 20 20:55:12 2001
> --- tclwinmtherr.corgFri Apr 16 00:48:08 1999
> ***************
> *** 43,53 ****
>       if (!TclMathInProgress()) {
>      return 0;
>       }
> - #ifdef __BORLANDC__
> -     if ((xPtr->type == DOMAIN) || (xPtr->type == SING)
|| (xPtr->type == TLOSS)) {
> - #else
>       if ((xPtr->type == DOMAIN) || (xPtr->type == SING)) {
> - #endif
>      errno = EDOM;
>       } else {
>      errno = ERANGE;

You are aware that's a backwards patch?  :^)

The change has been applied to the 64-bit branch.  I suppose
it ought
to go in the mainline too, but I'm currently operating
entirely within
the branch.  It'll make it through eventually.  :^)

Donal.
       [end of ancient email]

So that should be it.
Helmut
Log in (anonymous is fine) to add a comment.