- From: Jos De_Roo <jos.deroo@agfa.com>
- Date: Fri, 5 Dec 2003 18:55:20 +0100
- To: "timbl" <timbl@w3.org>, "connolly" <connolly@w3.org>
- Cc: www-archive+n3bugs@w3.org, "Piet Dewaele" <piet.dewaele@agfa.com>
The different conclusions were found, but the bug is in euler :(
I was completely mistaken by mixing up tanh and atan and
forgot about tanh(x) = i.tan(x/i).
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;
: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 Friday, 5 December 2003 12:55:26 UTC