# cwm's tanh builtin

```The different conclusions were found, but the bug is in euler :(
I was completely mistaken by mixing up tanh and atan and

Sorry for the confusion :)

--
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/
----- Forwarded by Jos De_Roo/AMDUS/MOR/Agfa-NV/BE/BAYER on 2003-12-05
06:43 PM -----

Jos De_Roo
To:       timbl@w3.org@internet, connolly@w3.org@internet
2003-12-02 02:09         cc:       www-archive+n3bugs@w3.org, Piet Dewaele/AMEGE/MOR/Agfa-NV/BE/BAYER@AGFA
PM                       Subject:  cwm's tanh builtin

Tim, Dan,

While doing some tests with angle measurements I found
different conclusions with cwm than I found with euler.
I simplified the case to a simpler one:

###################################################
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix : <testP#>.

:M :ratio 1.
{:M :ratio ?R. ?R math:tanh ?A} => {:M :angle_rad ?A}.
{:M :angle_rad ?A. ?A math:degrees ?D} => {:M :angle_deg ?D}.
#############################################################

and cwm thought

:M     :angle_deg 43.636130838093536;
:ratio 1 .

but euler got

:M :angle_deg [iw:Variable "_:X_2"; = 45.0].

I experimented a bit and got a likewise result with a change
in cwm_trigo.py
__cvsid__ = '\$Id: cwm_trigo.py,v 1.10 2003/10/20 17:31:54 timbl Exp \$'

line 123
return tanh(numeric(subj_py))
^^^^atan

i.e. cwm then thought

:M     :angle_deg 45.0;