[Jprogramming] Taylor expansion of sin(sin(x))

Roger Hui rhui000 at shaw.ca
Mon May 10 08:40:40 HKT 2010


1&o.^:2 t. signals domain error because
u t. does a table look-up and 1&o.^:2 is not
in the table.

Are you claiming that if f t. and g t. both
work then f at g t. should work?



----- Original Message -----
From: Bo Jacoby <bojacoby at yahoo.dk>
Date: Sunday, May 9, 2010 3:45
Subject: [Jprogramming]  Taylor expansion of sin(sin(x))
To: Programming forum <programming at jsoftware.com>

>    1&o.t.i.10 NB. The sine function is taylor 
> expanded   
> 0 1 0 _0.166667 0 0.00833333 0 _0.000198413 0 2.75573e_6
>    1&o.t.i.10x NB. exactly 
> 0 1 0 _1r6 0 1r120 0 _1r5040 0 1r362880
>    1&o.^:2 t.i.10x NB. Why does sin sin x produces an 
> error message?
> |domain error
> |       1&o.^:2 t.i.10
>   (1&o.t.i.10)&p.^:2 t.i.10 NB. this trick works around the bug
> 0 1 0 _1r3 0 1r10 0 _8r315 0 13r2520


More information about the Programming mailing list