From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,def7fa127a74c721,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-21 16:35:23 PST Path: newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cs.utexas.edu!geraldo.cc.utexas.edu!not-for-mail From: "Bobby D. Bryant" Newsgroups: comp.lang.ada Subject: Sign of tanh ??? Date: Sat, 21 Apr 2001 17:35:26 +0600 Organization: (I do not speak for) The University of Texas at Austin (nor they for me). Message-ID: <3AE1707E.BB379E3E@mail.utexas.edu> NNTP-Posting-Host: dial-97-13.ots.utexas.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: geraldo.cc.utexas.edu 987895909 13264 128.83.249.109 (21 Apr 2001 23:31:49 GMT) X-Complaints-To: abuse@cc.utexas.edu NNTP-Posting-Date: 21 Apr 2001 23:31:49 GMT X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.3-ac9 i686) X-Accept-Language: en,fr,de Xref: newsfeed.google.com comp.lang.ada:6832 Date: 2001-04-21T23:31:49+00:00 List-Id: Isn't tanh supposed to preserve the sign of its argument? ---8<------- with Ada.Float_Text_IO, Ada.Numerics.Elementary_Functions; use Ada.Float_Text_IO, Ada.Numerics.Elementary_Functions; procedure Test is begin Put( Tanh( 0.5 ), Fore => 3, Exp => 0 ); Put( Tanh( -0.5 ), Fore => 3, Exp => 0 ); end Test; ---8<------- % gnatmake test gnatgcc -c test.adb gnatbind -x test.ali gnatlink test.ali gnatlink: warning: executable name "test" may conflict with existing command % ./test 0.46212 0.46212 % rpm -q gnat gnat-3.13p-5 Thanks, Bobby Bryant Austin, Texas