[Gambas-user] atanh - wrong calculation

Jussi Lahtinen jussi.lahtinen at ...626...
Fri Apr 17 00:02:51 CEST 2009


Confirmed.

Regards,
Jussi



On Thu, Apr 16, 2009 at 23:07, Andreas Müller <andreas at ...2139...> wrote:
> 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
>
>
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list