[Jprogramming] Power for the powerless
Jon Hough
jghough at outlook.com
Tue Aug 5 06:24:15 UTC 2014
Could you not use the binomial theorem?
Where x^y =(1 +(x-1))^y
For any nonzero x and y.
Also it is suspicious that | is allowed, perhaps.
--- Original Message ---
From: "Dan Bron" <j at bron.us>
Sent: August 5, 2014 2:01 PM
To: programming at jsoftware.com
Subject: Re: [Jprogramming] Power for the powerless
That's a long page, but in brief: can you calculate the power series
without using ^ explicitly or implicitly (e.g. via t. or #: etc)? Are all
the ^s I see in those power series easily replaced by instances of
*/@:#"0 ?
In other words, does that page teach me how to do the trick when literally
the only mathematical functions in my toolbox are (dyads) + - * % and
(monad) | ?
-Dan
----- Original Message ---------------
Subject: Re: [Jprogramming] Power for the powerless
From: Roger Hui <rogerhui.canada at gmail.com>
Date: Mon, 4 Aug 2014 21:51:08 -0700
To: Programming forum <programming at jsoftware.com>
?Can you not just use power series (for both exp and ln)? See
http://www.jsoftware.com/jwiki/Essays/Extended%20Precision%20Functions .?
On Mon, Aug 4, 2014 at 9:39 PM, Dan Bron <j at bron.us> wrote:
> There's a StackExchange puzzle which challeges us to implement power (i.e.
> dyad ^) using only the simple arithmetic dyads + - * % and monad | [1]. In
> other words, we may not use ^ or ^. or variants. There are still several
> open questions on the puzzle, not least of which involves the domain of
> the inputs (can the base be negative?) and range of the outputs (how much
> precision is required?), but neverthless we can make some assumptions and
> start to sketch an approach.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list