Re: Condition for pure functions

*To*: mathgroup at smc.vnet.net*Subject*: [mg60292] Re: Condition for pure functions*From*: Misa <misa at hol.gr>*Date*: Sat, 10 Sep 2005 06:46:41 -0400 (EDT)*References*: <de9dbs$qa3$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Wonseok Shin wrote: > Hello everyone, > > Suppose that f[x] is defined as: > > f[x_ /; x > 0] := Sin[x]; > f[x_ /; x <= 0] := Tan[x]; > > How can transform the above definition into a pure function? > > I know > > f = Which[# > 0, Sin[#], # <= 0, Tan[#]] & > > is a one solution. But is there any clever way to use Condition (/;) > instead of Which[...] ? > does anybody have some informations of Lobachevski. if yes then please contact me

**Follow-Ups**:**Re: Re: Condition for pure functions***From:*Andrzej Kozlowski <akozlowski@gmail.com>