🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.tcl
Article #575

Q) tcl7.5a2 floating point error

#575
From: Takeshi "Ken" Yamada
Date: Sun, 10 Dec 1995 00:00
32 lines
1618 bytes
  $B;3ED!wD.ED;T$G$9!#(B

  FreeBSD2.1R $B$G(B tcl7.5a2 $B$r:n$C$?$N$G$9$,!"(Bmake test $B$G!"(B
expr.test $B$N2<$NFs$D$G(B

  Floating exception - core dumped
  *** Error code 136

$B$H$J$j$^$9!#$I$J$?$+!"BP:vJ}K!$r$4B8CN$G$7$?$?$i!"65$($F$/$@$5$$!#(B
$BC1=c$K!"(B
# tclsh <cr>
% expr pow (3, 1000) $B$H$+(B
% expr exp(1000)
$B$G$b!"(BFloating exception (core dumped) $B$H$J$C$F$7$^$&$N$G$9$,!"!"!#(B

########## expr.test ###########
test expr-34.11 {errors in math functions} { 
    list [catch {expr pow(3, 1000001)} msg] $msg $errorCode 
} {1 {floating-point value too large to represent} {ARITH OVERFLOW {floating-poi
nt value too large to represent}}} 

test expr-34.12 {errors in math functions} { 
    list [catch {expr -14.0*exp(100000)} msg] $msg $errorCode  
} {1 {floating-point value too large to represent} {ARITH OVERFLOW {floating-poi
nt value too large to represent}}} 
################################

  $B0J>e59$7$/$*4j$$$7$^$9!#(B

                                 ken@tydfam.iijnet.or.jp
                                 PED00213@niftyserve.or.jp
                                 Takeshi "Ken" Yamada ($B;3ED(B $B7r(B)
Technical Details
Message-ID: <vt20qdh3dl.fsf@tyd1.tydfam.iijnet.or.jp>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: 15a83d,749592675d49ca81
X-Google-Attributes: gid15a83d,public
From: ken@tydfam.iijnet.or.jp (Takeshi "Ken" Yamada)
Subject: Q) tcl7.5a2 floating point error
Date: 1995/12/10
Message-ID: <vt20qdh3dl.fsf@tyd1.tydfam.iijnet.or.jp>
X-Deja-AN: 121606041
sender: ken@tyd1.tydfam.iijnet.or.jp
organization: Takeshi "Ken" Yamada Family Net
newsgroups: fj.lang.tcl