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;
         :angle_rad 0.76159415595576485;
         :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;
         :angle_rad 0.78539816339744828;
         :ratio 1 .

This was with Python 2.2.1 - the is running quite well :)

--
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/

Received on Tuesday, 2 December 2003 08:09:18 UTC