[Gambas-user] atanh - wrong calculation

Benoît Minisini gambas at ...1...
Wed Apr 22 10:57:58 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
>

Bug fixed in revision 1930 & 1931!

Thanks for the report.

-- 
Benoît




More information about the User mailing list