🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.tcl
Article #574

Re: Q) tcl7.5a2 floating point error

#574
From: Takeshi "Ken" Yamada
Date: Sun, 10 Dec 1995 00:00
37 lines
2198 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<$NFsFs$D$G(B
>
>     Floating exception - core dumped
>     *** Error code 136
>
>   $B$H$J$j$^$9!#$I$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-point 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-point value too large to represent}}} 
>   ################################
>
>     $B0J>e59$7$/$*4j$$$7$^$9!#(B


  $B$3$l$O!"(BFreeBSD $B$NLdBj8+$?$$$G!"!"C1=c$K(Bmain() { printf ("%g\n",
pow(3.0, 1000.0)); } $B$H$7$F$b(B Floating exception $B$GMn$A$F$7$^$$(B
$B$^$9$,!"2?$,0-$$$s$G$7$g$&$+!)(Bfj.lang.tcl $B$H(B fj.os.bsd.freebsd 
$B$K%/%m%9%9%]%9%H$5$;$FD:$-$^$7$?!#(B

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

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