[Gambas-user] atanh - wrong calculation
Andreas Müller
andreas at ...2139...
Thu Apr 16 22:07:51 CEST 2009
Hello all,
first I want to thank Benoit for his wonderfull Gambas system - never
was programming easier than with this IDE!
Now my little problem. I calculated the atanh(0.5) and got:
?(Atnh(0.5))
3,162277660168
but this is wrong. The definition of atanh() should be:
atanh(x) = 0.5 * ln ((1+x)/(1-x))
which gives:
?(0.5*LOG((1+0.5)/(1-0.5)))
0,549306144334
and should be the correct value.
Those problems may have its origin in a wrong ALU unit or a wrong
implementation.
Can anybody confirm this or do I have a local problem?
system specs:
Pentium 4
Linux tax 2.6.27-11-generic #1 SMP Wed Apr 1 20:57:48 UTC 2009 i686
GNU/Linux
Ubuntu 8.10 (intrepid)
Gambas2 version 2.7
best regards and many thanks for your answers!
Andreas Mueller
More information about the User
mailing list