comp.lang.ada
 help / color / mirror / Atom feed
* Sign of tanh ???
@ 2001-04-21 11:35 Bobby D. Bryant
  2001-04-22 14:56 ` Wilhelm Spickermann
  0 siblings, 1 reply; 3+ messages in thread
From: Bobby D. Bryant @ 2001-04-21 11:35 UTC (permalink / raw)


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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-04-22 14:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-21 11:35 Sign of tanh ??? Bobby D. Bryant
2001-04-22 14:56 ` Wilhelm Spickermann
2001-04-22  7:12   ` Bobby D. Bryant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox