|
[Date Index]
[Thread Index]
[Author Index]
Re: Condition for pure functions
- To: mathgroup at smc.vnet.net
- Subject: [mg60309] Re: Condition for pure functions
- From: Peter Pein <petsie at dordos.net>
- Date: Sat, 10 Sep 2005 22:36:30 -0400 (EDT)
- References: <de9dbs$qa3$1@smc.vnet.net> <dfue4l$1sb$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Misa schrieb:
> 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
>
The articles in WikiPedia
http://en.wikipedia.org/wiki/Special:Search?search=Lobachevski&go=Go
are not enough?
The 10^5 entries in google http://www.google.gr/search?&q=Lobachevsky
should be sufficient....
--
Peter Pein, Berlin
GnuPG Key ID: 0xA34C5A82
http://people.freenet.de/Peter_Berlin/
Prev by Date:
Re: Timed Notebooks for Student Take-home examinations
Next by Date:
smooth eigenvalues and eigenvectors as a function of frequency
Previous by thread:
Re: Re: Condition for pure functions
Next by thread:
Timed Notebooks for Student Take-home examinations
|