Scott Russell wrote:
> Can you give me the original equation and then how do you make an
> inverse of the equation ?
In J, f ^:_1 gives you the inverse of f . This only works for
certain well behaved functions.
In Henry's previous expression:
(1.10 * 50 -~ ])^:3 ^:_1 (1000)
the f being inverted would be (1.10 * 50 -~ ])^:3
This f is functionally equivalent to
F=: verb :'g g g y'
G=: verb :'1.10 * y - 50'
(But F can't be inverted using ^:_1)
Note that Henry's expression requires j6 to work properly -- this
would be a syntax error in J5.
Note also that in J6, the system predefines inv=:^:_1
So a more slightly concise expression would be
(1.10 * 50 -~ ])^:3 inv 1000
(This gets rid of the parenthesis which are required for proper
parsing when the trailing edge of a function definition is
numeric, and the right argument is numeric.)
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm